Commit Graph

3697 Commits

Author SHA1 Message Date
can1357 266d3b0453 chore: bump version to 14.7.5 2026-05-07 18:10:14 +02:00
can1357 cfa8e84298 feat(ai): added configurable multi-system prompts in OpenAI compat
- Added `supportsMultipleSystemMessages?: boolean` to `OpenAICompat` for configurable multi-system handling.
- Added OpenAI-compat host detection, allowing per-host multiple-system defaults and explicit override control.
- Updated `convertMessages` to merge system prompts when disabled, while preserving separate system messages when enabled.
- Added tests for merged-vs-split system prompts, MiniMax/Qwen strict-template behavior, and override defaults.
2026-05-07 18:09:59 +02:00
can1357 903b8f03a5 fix(utils): scrubbed macOS malloc logging env vars at startup
- Added a new `scrubProcessEnv` helper in `procmgr` to remove macOS malloc logging variables from `process.env` before spawning.
- Invoked the helper at coding-agent CLI startup so bun sub-processes no longer inherit the problematic environment.
- This prevented the recurring `MallocStackLogging` warning from appearing in child process stderr output.
2026-05-07 15:45:44 +02:00
can1357 9943a280db feat(coding-agent): added /loop count/duration arg parsing and budgeting
- Added optional `/loop` `count|duration` command arguments and wired `command.args` into loop handling.
- Implemented `loop-limit` parsing and runtime types/helpers for iteration and duration budget limits with validation.
- Updated interactive mode to enforce loop limits per iteration, check duration expiry, and clear budget state on disable.
- Added loop-limit parse/runtime tests and fixed `/loop` arg errors plus macOS `MallocStackLogging` environment leakage.
2026-05-07 15:40:45 +02:00
can1357 2740ef65a0 fix(tests): removing useless tests 2026-05-07 09:33:50 +02:00
can1357 3d07607415 chore: bump version to 14.7.4 2026-05-07 09:27:14 +02:00
can1357 bba2243a85 fix(coding-agent): moved colored diff before hidden lines indicator
- Rendered diff content before the truncation notice instead of after.
- Updated hidden lines label to show count with "+" prefix.
- Added fallback label when no lines are hidden.
2026-05-07 09:26:42 +02:00
can1357 fdc3fe1196 refactor(coding-agent): removed configurable read timeout and standardized URL fetch timeout
- Removed the read CLI argument and tool schema field so read requests no longer accept custom timeouts.
- Updated URL read handling to stop forwarding timeout values and execute URL reads without a timeout parameter.
- Standardized URL read fetching to a fixed 30-second timeout and dropped timeout metadata from URL call rendering.
2026-05-07 05:39:22 +02:00
can1357 5df31b37d1 docs(coding-agent/prompts): closed unclosed system reminder tag in eager todo prompt
- Added a missing </system-reminder> tag to the eager-todo system prompt to complete the instruction block.
2026-05-07 05:11:23 +02:00
can1357 1aa1c83958 docs(coding-agent/prompts): refined system prompt wording to avoid unnecessary blocker stops
- Removed [blocked]-focused instructions from failure handling and pre-yield checks in the system prompt.
- Eliminated the separate completion-honesty block and folded stronger end-to-end-completion language into the contract sections.
- Reworded output and critical-response guidance to focus on continuous progress and completion-only yielding.
2026-05-07 05:08:54 +02:00
can1357 9238a15d5b feat(coding-agent/tools): added intent text generation to WriteTool
- Added a readonly intent property to the write tool implementation.
- The intent now returned a contextual message using `args.path` when available, otherwise a generic "writing" label.
2026-05-07 05:06:43 +02:00
can1357 052a8bd10c feat(coding-agent): added hashline section-diff API for external use
- Exported hashline section interfaces and helpers, including a new section-diff API for external callers.
- Refactored `computeHashlineDiff` to split input sections, propagate split errors, and delegate each section via helper.
- Added context-highlight caching and batched highlighting for unchanged lines, with `replaceTabs` fallback on unknown files.
- Fixed hashline streaming preview so completed sections stay visible when a new `@PATH` header appears mid-stream.
- Added hashline streaming tests for section persistence, malformed trailing `+ 7`, and dual sections.
2026-05-07 05:03:49 +02:00
can1357 bef44b9cce feat(coding-agent/tools): added syntax highlighting and line numbers to streaming preview
- Adjusted streaming preview formatting to render the tail section using a computed start index and hidden-line count.
- Passed language into streaming formatting to syntax-highlight visible lines and include aligned line-number gutters.
- Updated the hidden-lines notice to handle singular vs plural earlier-line counts correctly.
2026-05-07 04:56:08 +02:00
can1357 77682eac93 feat(coding-agent): added orchestrate command prompt and registered in embedded commands
- Added a new `orchestrate.md` prompt under `src/prompts/commands` defining an orchestrator workflow, verification gates, and anti-patterns.
- Imported and rendered the prompt in `src/task/commands.ts` as `orchestrateMd`.
- Appended the new prompt to `EMBEDDED_COMMANDS` so it is registered with existing embedded command templates.
2026-05-07 04:55:57 +02:00
can1357 16ddd1d9d6 docs(coding-agent/prompts): clarified hashline replacement range anchor guidance
- Updated the hashline prompt to require replacement ranges to cover entire statements or expressions, preventing broken syntax when applying changes.
- This clarified how replacement anchors should be chosen for function calls, literals, blocks, and control-flow branches.
2026-05-07 04:36:45 +02:00
can1357 8f9b7d51e5 feat(coding-agent/tools): enhanced write tool preview with line numbers and syntax highlighting
- Updated the write tool preview renderer to syntax-highlight visible lines and annotate them with line-number gutters.
- Changed the file metadata output to an inline line-count suffix on the header and removed the separate metadata row.
- Adjusted preview truncation to show the first lines first while preserving hidden-line hints for collapsed output.
2026-05-07 04:27:10 +02:00
can1357 ad5a1eff07 docs(coding-agent/prompts): added completion-honesty guidance to the system prompt
- Added a new completion-honesty section to the coding-agent system prompt with stricter delivery constraints.
- The prompt now requires all acceptance criteria to be met before completion, prohibits scope reduction without approval, and forbids delivering stubs, placeholders, or fake implementations as finished work.
- Verification language was tightened so completion claims must reflect actual verification and not be inflated by partial checks.
2026-05-07 04:26:35 +02:00
can1357 cbfdc0a212 feat(coding-agent): added notebook-aware .ipynb edit/read path helpers
- Added `.ipynb` detection and editable-cell conversion utilities, including merge/serialize helpers in `edit/notebook`.
- Rerouted hashline, patch, and replace edit flows, plus read/write paths, through notebook-aware helpers before persistence.
- Removed the dedicated `notebook` tool, its schema flags, renderer, and built-in registration/settings checks.
- Updated notebook read behavior, docs, and tests so `.ipynb` reads return editable `# %%` cells and edits reserialize to JSON.
2026-05-07 04:16:11 +02:00
can1357 2c307e51f4 refactor(prompts): simplified wording across all agent and tool prompts
- Removed persona preambles ("You are an expert...") in favor of direct imperatives.
- Stripped redundant MUST/SHOULD modals where plain prose suffices.
- Condensed multi-sentence instructions into tighter single-line equivalents.
2026-05-07 04:12:01 +02:00
can1357 5f2c47ed85 docs: condensed AGENTS.md 2026-05-07 02:03:56 +02:00
can1357 0acd9660a6 chore: bump version to 14.7.3 2026-05-07 00:34:52 +02:00
can1357 8fe938042d docs(coding-agent/prompts): clarified todo-write init and append op semantics
- Updated the `init` operation to require a `list: [{phase, items: string[]}]` payload and to replace any existing list.
- Updated the `append` operation description to state tasks are appended to a given `phase` and that the phase is lazily created.
2026-05-07 00:32:41 +02:00
can1357 0988ad2763 fix(ai): removed streaming throttles for immediate assistant delta delivery
- Removed delta-event throttling and merge logic so AssistantMessageEventStream now enqueues assistant deltas without batching.
- Stopped debouncing preview-diff generation in ToolExecutionComponent so apply_patch argument updates trigger immediate preview refresh.
- Added tests covering immediate delta queueing and confirming streaming arg updates no longer schedule setTimeout callbacks.
2026-05-06 21:42:10 +02:00
can1357 6dedfda999 chore: bump version to 14.7.2 2026-05-06 20:36:24 +02:00
can1357 d3e4ab0b5d fix: todo_write pending op guidance
Fixes #924
2026-05-06 20:36:03 +02:00
can1357 071f15895a fix: enable ollama cloud cache metadata
fixes #937
2026-05-06 20:32:17 +02:00
can1357 f4732522cd fix(interactive-mode): cleared spinner when extension command skips model turn
- Stopped the loading animation and cleared optimistic state in `finishPendingSubmission` when no streaming session was started. Fixes #927.
2026-05-06 20:32:07 +02:00
can1357 9b7843821a fix(coding-agent): honor authHeader provider overrides
Fixes #929
2026-05-06 20:31:47 +02:00
can1357 2f871b6d23 feat(coding-agent): added loadMode and summary to AgentTool discovery
- Added optional `loadMode` and `summary` fields to `AgentTool` and related type declarations.
- Added `loadMode` and `summary` metadata to built-in tool classes for discoverable/essential behavior.
- Replaced `BUILTIN_TOOL_METADATA` with per-tool fields in discovery code paths.
- Updated `search_tool_bm25` and discovery indexing to use each tool's `summary` text.
- Updated discovery tests to validate tool `loadMode` and summary completeness.
2026-05-06 19:14:39 +02:00
can1357 a2d3821ee6 test(coding-agent): avoid global discovery mock 2026-05-06 19:01:21 +02:00
can1357 a6c95b952c chore: reformat 2026-05-06 18:55:19 +02:00
Can Bölük 60126c9318 Merge pull request #916 from HabibPro1999/feat/tool-discovery
feat(coding-agent): tools.discoveryMode with built-in tool discovery
2026-05-06 18:54:36 +02:00
Can Bölük 26829c780a Merge pull request #934 from phanthh/feat/plan-mode-enabled-setting
feat: add plan.enabled setting to toggle plan mode
2026-05-06 18:54:32 +02:00
Can Bölük dd6a9b4e54 Merge pull request #933 from Parsifa1/fix-python-gateway
fix(coding-agent): fix share lib error for python gateway
2026-05-06 18:54:28 +02:00
Can Bölük 935e5b9a29 Merge pull request #923 from hansihe/add-retry-slash-command
feat(coding-agent/slash-commands): add /retry command
2026-05-06 18:54:25 +02:00
Can Bölük 9d9f9d4dc6 Merge pull request #921 from tycronk20/codex/fix-extension-dashboard-toggle
fix extension dashboard toggles
2026-05-06 18:54:22 +02:00
Can Bölük d3663fa645 Merge pull request #913 from mouyase/fix/searxng-basic-auth-env-docs
Improve SearXNG Basic auth configuration
2026-05-06 18:54:18 +02:00
Can Bölük 34371a5d89 Merge branch 'main' into fix/claude-plugin-roots-test-isolation 2026-05-06 18:49:50 +02:00
can1357 094040e957 fix(coding-agent): wire builtin discovery prompt gating 2026-05-06 18:17:38 +02:00
can1357 5aea7ee9e7 Fix extension dashboard shadowed toggle state 2026-05-06 18:16:02 +02:00
can1357 f2684b7a18 fix: harden plan enabled toggle 2026-05-06 18:16:01 +02:00
can1357 fb02729b74 test(coding-agent): cover manual retry slash command 2026-05-06 18:15:48 +02:00
can1357 3f40cb0570 fix(coding-agent): isolate python gateway state 2026-05-06 18:14:00 +02:00
can1357 a5f253950e fix(coding-agent): align SearXNG settings label with schema UI 2026-05-06 18:11:37 +02:00
HabibPro1999 9c89b2f22b fix(coding-agent): preserve BUILTIN_TOOLS factory map and legacy MCP discovery shapes
Restore BUILTIN_TOOLS to Record<string, ToolFactory> so external SDK callers can
still invoke BUILTIN_TOOLS.read(session) directly, and move per-tool discovery
metadata (loadMode, summary) into a dedicated BUILTIN_TOOL_METADATA map. All
internal callers (computeEssentialBuiltinNames, getBuiltinDiscoverableEntries,
createTools, sdk.ts initial-tool filter, agent-session built-in collection) now
read metadata through the new map.

Restore the legacy MCP discovery API on AgentSession: getDiscoverableMCPTools()
returns DiscoverableMCPTool[] with description, and getDiscoverableMCPSearchIndex()
returns the legacy DiscoverableMCPSearchIndex whose documents expose
tool.description while remaining usable by searchDiscoverableTools (summary is
populated from description so the BM25 corpus still scores correctly). Generic
discovery via getDiscoverableTools / getDiscoverableToolSearchIndex is unchanged.

Centralize discovery cache invalidation in #invalidateDiscoveryCaches and call it
from #applyActiveToolsByName, refreshMCPTools, and refreshRpcHostTools so the
generic search index can no longer return tools that have already been activated
or registry entries that have been replaced.

Restrict #collectDiscoverableBuiltinTools to entries whose
BUILTIN_TOOL_METADATA[name].loadMode === "discoverable", which keeps hidden
tools (resolve, yield, exit_plan_mode, report_finding, report_tool_issue) and
unknown extension/custom registry entries out of the discovery corpus.

Tests: add coverage for callable BUILTIN_TOOLS factories, legacy MCP description
shape on getDiscoverableMCPTools / getDiscoverableMCPSearchIndex, stale-index
invalidation on setActiveToolsByName, and hidden-tool exclusion from
getDiscoverableTools({ source: "builtin" }).
2026-05-06 18:10:54 +02:00
某亚瑟 2c65320512 docs(coding-agent): record SearXNG auth hardening 2026-05-06 18:10:19 +02:00
HabibPro1999 2fbb5f10de feat(coding-agent): hid discoverable built-in tools when tools.discoveryMode is "all"
Wired the generic discovery methods on AgentSession into the tool
factory session, resolved the effective discovery mode (tools.discovery
Mode wins; mcp.discoveryMode as back-compat alias for "mcp-only"),
and threaded the resulting flag into rebuildSystemPrompt so the prompt
template fires the discovery hint for both legacy and new modes.

Added the load-bearing filter in createAgentSession: when the
effective mode is "all", drop any built-in tool whose loadMode is
"discoverable" from the initial tool set unless it is essential per
computeEssentialBuiltinNames, was explicitly listed via
options.toolNames, or was restored from persistence. The model finds
hidden tools via search_tool_bm25 and activates them on demand.

Built-in activation persistence is intentionally limited to the
existing MCP persistence store for this PR; full discovered-tool
persistence is a follow-up.
2026-05-06 18:10:16 +02:00
某亚瑟 55ed29f9c7 docs(coding-agent): clarify SearXNG auth configuration 2026-05-06 18:09:52 +02:00
HabibPro1999 2f4c44fe83 feat(coding-agent): generalized search_tool_bm25 to discover any tool source
The internal class is now SearchToolsTool but the wire name stays
"search_tool_bm25" so persisted MCP selections in user session files
continue to resolve correctly.

The BM25 corpus is now drawn from the generic DiscoverableTool list
(built-ins, MCP, extension, custom) rather than only MCP tools.
createIf fires when either tools.discoveryMode !== "off" or the
legacy mcp.discoveryMode is true.

AgentSession gains generic discovery methods (isToolDiscoveryEnabled,
getDiscoverableTools, getDiscoverableToolSearchIndex,
getSelectedDiscoveredToolNames, activateDiscoveredTools). The existing
MCP-named methods are kept as thin shims that filter by
source === "mcp" so existing callers continue to work.

Updated the tool's prompt copy to advertise discovery across all
sources rather than MCP only. Tests extended for the new shape.
2026-05-06 18:09:52 +02:00
HabibPro1999 b7e4cb614f feat(coding-agent): added tool-discovery settings and built-in tool metadata
Added two settings:
- tools.discoveryMode ("off" | "mcp-only" | "all", default "off")
- tools.essentialOverride (string[], default empty)

Converted BUILTIN_TOOLS from Record<string, ToolFactory> to
Record<string, BuiltinEntry> with a per-tool loadMode ("essential"
or "discoverable") and an optional summary used as the BM25 corpus
entry when discovery hides the tool.

Marked read, bash, edit as essential. Marked the remaining 24 built-in
tools as discoverable with hand-written summaries. search_tool_bm25
stays essential (always loaded when discovery is on; gated separately
by isToolAllowed).

Added DEFAULT_ESSENTIAL_TOOL_NAMES, computeEssentialBuiltinNames
(reads tools.essentialOverride with a default fallback), and
getBuiltinDiscoverableEntries (used by the search tool to build the
BM25 corpus).

mcp.discoveryMode is preserved as a back-compat alias for "mcp-only".
2026-05-06 18:09:52 +02:00