Commit Graph

16 Commits

Author SHA1 Message Date
MertSoylu 30f92ad986 fix(coding-agent): keep the system prompt byte-stable across date/cwd changes
Move the per-request date/cwd line out of the system prompt into a
first-turn system-reminder so open-weight providers keep their tool-schema
prefix cache; the reminder refreshes itself at midnight. Closes #7404.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-08-14 13:16:54 +03:00
can1357 a872d77068 chore: cleanup dumb tests 2026-08-02 20:39:23 +02:00
roboomp c0966d0f64 fix(prompting): preserved absolute working directory
Removed display-only home shortening from the provider-facing project prompt and covered home-relative project paths with a regression test.

Fixes #6100
2026-07-21 21:07:11 +00:00
can1357 5abe19eda1 Merge PR #3156: fix(advisor): surface nested repo context (@oldschoola)
# Conflicts:
#	packages/coding-agent/src/modes/components/status-line/component.ts
#	packages/coding-agent/src/sdk.ts
#	packages/coding-agent/src/system-prompt.ts
2026-06-27 01:40:12 +02:00
can1357 07c910210b feat(coding-agent): allowed toggling workspace tree in system prompt
- Added `includeWorkspaceTree` configuration setting to optionally render the workspace directory tree.
- Configured the system prompt template and SDK to respect this toggle, allowing users to disable the tree to prevent prompt cache invalidation.
2026-06-21 07:03:45 +02:00
oldschoola bd3a35e13d fix(advisor): surface nested repo context 2026-06-20 15:55:47 -07:00
roboomp bbbd256565 fix(prompting): preserved custom prompt project footer
Render the project footer for custom system prompts while omitting context and append text already emitted by the custom prompt template.

Fixes #3014
2026-06-19 12:09:34 +00:00
roboomp b4b11232e5 fix(prompting): preserved CLI prompt precedence over SYSTEM.md
Skip the secondary loadSystemPromptFiles capability walk when the caller already controls block 0 via customPrompt/resolvedCustomPrompt, so project/user SYSTEM.md cannot silently augment a CLI --system-prompt override.

Fixes #3014
2026-06-19 12:00:46 +00:00
roboomp 21f3496976 fix(prompting): preserved resolved system prompt text
Bypass path resolution when session startup has already loaded SYSTEM.md or APPEND_SYSTEM.md contents.

Fixes #3014
2026-06-19 11:57:16 +00:00
roboomp e2da0c5458 fix(prompting): rendered system prompt template for system md
Route resolved SYSTEM.md content through the custom prompt template path instead of replacing the fully rendered default prompt block.

Fixes #3014
2026-06-19 11:50:45 +00:00
roboomp 063ce1ba00 fix(coding-agent): loaded github instruction rules
Added GitHub Copilot instruction-file discovery to the github rule provider path, mapping applyTo frontmatter into always-apply or glob-scoped rules and avoiding duplicate always-apply prompt content when context imports the same file.\n\nFixes #2731
2026-06-16 02:30:58 +00:00
can1357 77c2b0bd8f chore: minor fixes 2026-06-02 08:27:04 +02:00
can1357 8c323666be feat: added ordered systemPrompt arrays and normalized context prompts
- Converted systemPrompt APIs and state types to ordered `string[]` across agent, AI, and coding-agent surfaces.
- Added `normalizeSystemPrompts` and applied it to context normalization before building provider request payloads.
- Updated AI providers to emit separate normalized prompt blocks/messages instead of a single merged system prompt.
- Removed dedicated `projectPrompt` state and remapped that context into system-context buckets in session, dump, and token accounting.
- Aligned tests and changelogs to pass and assert `systemPrompt` as arrays with ordered prompt semantics.
2026-05-04 15:20:26 +02:00
can1357 d24d11a274 fix: resolved AI/OAuth helper duplication via shared modules
- Standardized missing-file read errors and now return `File not found: <path>` for absent edit targets.
- Centralized AI provider, usage, and OAuth helpers into shared modules to remove duplicated logic.
- Migrated OAuth/API-key login flows to shared factory helpers and removed inline prompt/token-exchange code.
- Reused shared tools and formatter utilities for discovery, stream tails, LSP batching, and source formatting.
- Consolidated repeated test helpers and fixtures into shared modules, replacing inline helper duplicates.
2026-04-23 21:02:14 +02:00
can1357 22a876bb8f feat(coding-agent): added automatic deduplication of context files by content
- Added automatic deduplication of identical context files by content, keeping the closest (lowest depth) copy when duplicates are discovered.
- Implemented dedupeExactContextFiles() function to filter duplicate context entries in both explicit and discovered file lists.
- Added 3 test cases covering deduplication of explicit context entries, discovered context entries, and preservation of distinct entries.
2026-03-18 23:00:17 +01:00
can1357 38eeeeda1b fix: deduplicate custom SYSTEM.md in context assembly
fixes #473
2026-03-18 22:43:40 +01:00