-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: task-relevant code summaries with Turso vector search #3185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
e86e901
1daa128
04997c4
fc84601
3ffa386
77b17c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -125,6 +125,7 @@ import { | |
| loadProjectContextFiles as loadContextFilesInternal, | ||
| } from "./system-prompt"; | ||
| import { AgentOutputManager } from "./task/output-manager"; | ||
| import { resolveCodemap } from "./task-context"; | ||
| import { | ||
| AUTO_THINKING, | ||
| type ConfiguredThinkingLevel, | ||
|
|
@@ -2195,6 +2196,7 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {} | |
| secretsEnabled, | ||
| workspaceTree: workspaceTreePromise, | ||
| memoryRootEnabled: memoryBackend.id === "local", | ||
| codemapEnabled: settings.get("codemap.enabled"), | ||
| model: settings.get("includeModelInPrompt") ? getActiveModelString() : undefined, | ||
| personality: agentKind === "sub" ? "none" : settings.get("personality"), | ||
| }); | ||
|
|
@@ -2806,6 +2808,19 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {} | |
| void logger.time("startMemoryStartupTask", startMemoryBackend); | ||
| } | ||
|
|
||
| // Initialize codemap (code summaries) if enabled. Distinct from the memory | ||
| // backend — runs independently of memory.backend. Opens the Turso/libSQL DB, | ||
| // runs auto-provisioning if configured, and stores session state. Non-blocking | ||
| // so the session starts without waiting for DB init; the first-turn injection | ||
| // in #buildSystemPromptForAgentStart handles a not-yet-ready state gracefully. | ||
| void (async () => { | ||
|
Comment on lines
+2811
to
+2816
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. blocking: first-turn auto-injection races this fire-and-forget initialization. |
||
| try { | ||
| await resolveCodemap(session, settings); | ||
|
Comment on lines
+2816
to
+2818
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Starting Useful? React with 👍 / 👎. |
||
| } catch (error) { | ||
| logger.debug("codemap: initialization failed", { error: String(error) }); | ||
| } | ||
| })(); | ||
|
|
||
| // Wire MCP manager callbacks to session for reactive tool updates. | ||
| // Skip when reusing a parent's manager — the parent owns the callbacks. | ||
| if (mcpManager && !options.mcpManager) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
tools.discoveryModeisall, the codemap tools are marked discoverable and the initial-tool filter removes non-essential discoverable built-ins unless they were explicitly requested. This block is gated only oncodemap.enabled, so it can tell the model to callget_task_contextandset_file_summaryeven though those tool schemas are absent from the active tool list; gate the guidance on the active tool names or force these tools active whenever this guidance is rendered.Useful? React with 👍 / 👎.