[FEATURE][EPIC] Native AI features in MokoGitea via the MokoAi stack (mimic Claude functionality) #763

Open
opened 2026-07-12 22:35:49 +00:00 by jmiller · 0 comments
Owner

Feature Description

Add native AI features to MokoGitea powered by the branded MokoAi stack
(the Go gateway MokoConsulting/mokoai in front of Ollama, with the Node
mokoai-cli client). The goal is to mimic a subset of Claude / AI-assistant
functionality directly inside the Gitea UI and API, using our own
self-hosted, OpenAI-compatible control plane instead of a third-party service.

This rounds out the ecosystem: MokoGitea is both the identity/source-of-truth
(users authenticate here) and a first-class consumer of MokoAi.

Problem or Use Case

The org runs its own Git forge and its own AI gateway. Contributors currently
have no in-forge AI assistance (review, summaries, search) and would otherwise
depend on external tools. Wiring MokoGitea to MokoAi keeps everything on-prem,
branded, and governed by our own auth + policy.

Proposed Solution

Integrate MokoGitea with the MokoAi gateway (OpenAI-compatible /v1/*) and
surface AI features in the UI/API. Depends on MokoAi roadmap items, notably
MokoGitea-bridge auth (users verify with their own MokoGitea identity) and
the built-in MokoGitea MCP (tools act as the calling user).

Candidate Claude-like features (each can become its own child issue):

  • PR review assistant - summarize a diff, flag risks/bugs, suggest changes as review comments.
  • Issue triage / summarization - auto-summarize long issues, suggest labels, draft responses.
  • Commit message + changelog drafting - generate conventional-commit messages and CHANGELOG entries from a diff.
  • Repo/code chat - ask questions about a repo; answers grounded via the MokoGitea MCP tools + embeddings.
  • Semantic code/issue search - embeddings-backed search across code, issues, and wiki.
  • Release notes generation - draft notes from merged PRs between two tags.
  • Inline code explanation / docstring suggestions in the code viewer.

Implementation Details

  • Auth: reuse MokoAi MokoGitea-bridge auth so AI calls run as the requesting
    user (respecting repo permissions). No shared keys.
  • Client path: MokoGitea backend calls MokoAi /v1/chat/completions and
    /v1/embeddings; model aliases (e.g. mokoai-coder) decouple from physical models.
  • Tools: use the built-in MokoGitea MCP for repo-aware actions (read files,
    list PR diffs, post comments) as the user.
  • UI: add opt-in AI panels/actions on PR, issue, and code views; feature-flagged.
  • Config: point MokoGitea at the MokoAi base URL; per-repo/org enable switch.
  • Privacy/governance: all inference stays on the self-hosted stack.

Benefits

  • On-prem, branded AI assistance inside the forge; no third-party data egress.
  • Reuses existing identity + permissions (per-user, least privilege).
  • Completes the MokoAi <-> MokoGitea loop and rounds out the ecosystem.

Dependencies (MokoAi roadmap)

Checklist

  • Break candidate features into child issues
  • Confirm MokoAi auth + MCP dependencies land first
  • Feature-flag the UI integration
## Feature Description Add native AI features to MokoGitea powered by the branded **MokoAi** stack (the Go gateway `MokoConsulting/mokoai` in front of Ollama, with the Node `mokoai-cli` client). The goal is to mimic a subset of Claude / AI-assistant functionality directly inside the Gitea UI and API, using our own self-hosted, OpenAI-compatible control plane instead of a third-party service. This rounds out the ecosystem: MokoGitea is both the identity/source-of-truth (users authenticate here) and a first-class consumer of MokoAi. ## Problem or Use Case The org runs its own Git forge and its own AI gateway. Contributors currently have no in-forge AI assistance (review, summaries, search) and would otherwise depend on external tools. Wiring MokoGitea to MokoAi keeps everything on-prem, branded, and governed by our own auth + policy. ## Proposed Solution Integrate MokoGitea with the MokoAi gateway (OpenAI-compatible `/v1/*`) and surface AI features in the UI/API. Depends on MokoAi roadmap items, notably **MokoGitea-bridge auth** (users verify with their own MokoGitea identity) and the **built-in MokoGitea MCP** (tools act as the calling user). Candidate Claude-like features (each can become its own child issue): - **PR review assistant** - summarize a diff, flag risks/bugs, suggest changes as review comments. - **Issue triage / summarization** - auto-summarize long issues, suggest labels, draft responses. - **Commit message + changelog drafting** - generate conventional-commit messages and CHANGELOG entries from a diff. - **Repo/code chat** - ask questions about a repo; answers grounded via the MokoGitea MCP tools + embeddings. - **Semantic code/issue search** - embeddings-backed search across code, issues, and wiki. - **Release notes generation** - draft notes from merged PRs between two tags. - **Inline code explanation / docstring suggestions** in the code viewer. ## Implementation Details - **Auth:** reuse MokoAi MokoGitea-bridge auth so AI calls run as the requesting user (respecting repo permissions). No shared keys. - **Client path:** MokoGitea backend calls `MokoAi` `/v1/chat/completions` and `/v1/embeddings`; model aliases (e.g. `mokoai-coder`) decouple from physical models. - **Tools:** use the built-in MokoGitea MCP for repo-aware actions (read files, list PR diffs, post comments) as the user. - **UI:** add opt-in AI panels/actions on PR, issue, and code views; feature-flagged. - **Config:** point MokoGitea at the MokoAi base URL; per-repo/org enable switch. - **Privacy/governance:** all inference stays on the self-hosted stack. ## Benefits - On-prem, branded AI assistance inside the forge; no third-party data egress. - Reuses existing identity + permissions (per-user, least privilege). - Completes the MokoAi <-> MokoGitea loop and rounds out the ecosystem. ## Dependencies (MokoAi roadmap) - MokoConsulting/mokoai#1 - MokoGitea-bridge auth (per-user identity). - MokoConsulting/mokoai#2 - Built-in MokoGitea MCP. - MokoConsulting/mokoai#8 - /v1/embeddings (for search/RAG). - MokoConsulting/mokoai#3 - Multi-upstream routing. ## Checklist - [ ] Break candidate features into child issues - [ ] Confirm MokoAi auth + MCP dependencies land first - [ ] Feature-flag the UI integration
Sign in to join this conversation.