Skip to content

Feat/codemap pr - #565

Merged
sng-asyncfunc merged 112 commits into
AsyncFuncAI:mainfrom
GdoongMathew:feat/codemap_pr
Jul 30, 2026
Merged

Feat/codemap pr#565
sng-asyncfunc merged 112 commits into
AsyncFuncAI:mainfrom
GdoongMathew:feat/codemap_pr

Conversation

@GdoongMathew

@GdoongMathew GdoongMathew commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Features

Codemap Generation (AI genrated) (fix #396)

image
  • Adds a third mode (Fast / Deep Research / CodeMap), switched via a dropdown.
  • Split the progress into three parts, analyzing code -> generating initial codemap -> generating diagrams & guides, each streamed as NDJSON events.
  • Code-Viewer: auto opens at the first citation, syntax-highlights, and scrolls to the highlighted lines.
  • Streaming transport — /ws/codemap (WebSocket) and POST /codemap/stream (NDJSON HTTP fallback); GET /codemap/file serves source files with path-traversal guarding
  • New LineTrackingTextSplitter : attaches correct start -> end line to each chunk.

    ⚠️ Delete stale ~/.adalflow/databases/*.pkl so repos re-index with line numbers.

  • New schemas: CodeMap, CodeMapSection, CodeMapStep, CodeMapCitation, CodeMapRequest
  • New prompts: CODEMAP_SKELETON_PROMPT and CODEMAP_ENRICH_PROMPT
  • Fontend: new CodeMap.tsx, CodeViewer.tsx and the /api/repo/prepare route; Ask.tsx gains a handleCodemapAsk flow and an onOpenCodeViewer citation-click hook.

Fixes

  • Prevent large repo indexing timeout: indexing large repos used to block the request/WebSocket until the frontend proxy timeout and killed the connection
    • Added a dedicated POST /repo/prepare endpoint that indexes the repo up-front and stream the server event. Should emit a heartbeat every 10 seconds while indexing a repo.
    • Added a cheap GET /repo/index/status readiness probe so the frontend can poll instead of holding the prepare stream open.
  • Fix traditional Chinese detection logic. (related to fix: fix language detection GdoongMathew/deepwiki-open#14)

Changes

Miscellaneous

GdoongMathew and others added 30 commits July 18, 2026 12:01
* refactor chat streaming

* update `_is_token_limit_error` logic

* test: add chat provider unittests

* move `_is_token_limit_error` to module level

* remove unnecessary TYPE_CHECKING

* add EOF

* update prompt function
* patch: patch adalflow OllamaClient to support batch embedding api.

related to SylphAI-Inc/AdalFlow#496

* remove `OllamaDocumentProcessor`
* refactor chat streaming

* update `_is_token_limit_error` logic

* test: add chat provider unittests

* move `_is_token_limit_error` to module level

* remove unnecessary TYPE_CHECKING

* add EOF

* update prompt function

* refactor `websocket_wiki.py` using `ChatStreamer`

* remove unnecessary imports

* add litellm test

* update kwargs in `GoogleGenerativeChatStreamer`
# Conflicts:
#	api/websocket_wiki.py
# Conflicts:
#	api/chat/_stream.py
#	api/config.py
#	api/simple_chat.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…nk to share the same page without overlapping each other.
* refactor: add Repo type

* add repo schema

* fix: fix import path

* add prepare_index in frontend. (ai generated)

* update preparing indexing in different languages. (ai generated)

* update preparing indexing in different languages. (ai generated)

* update preparing indexing in different languages. (ai generated)
* fix frontend parsing generated wiki.

* fix frontend parsing generated wiki.
# Conflicts:
#	api/chat/_stream.py
#	api/chat_model.py
#	api/clients/__init__.py
#	api/clients/litellm.py
#	api/config.py
#	api/data_pipeline.py
#	api/poetry.lock
#	api/rag.py
#	api/simple_chat.py
#	api/websocket_wiki.py
#	src/components/Ask.tsx
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@GdoongMathew

Copy link
Copy Markdown
Collaborator Author

Hi @sng-asyncfunc,

Heads-up that this PR is fairly large — it bundles the new Codemap feature together with a broader backend refactor and a few fixes, so it may feel a bit overwhelming to review in one pass.

Any feedback is very welcome ~

@sng-asyncfunc
sng-asyncfunc merged commit b5e7666 into AsyncFuncAI:main Jul 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security: CVE-2025-66478 (React2Shell) RCE in Dependencies Any plans to support Codemap like DeepWiki?

2 participants