Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/core/prompts/__tests__/system-prompt.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,11 @@ describe("SYSTEM_PROMPT", () => {
// Should contain Tool Use Guidelines section
expect(prompt).toContain("Tool Use Guidelines")

// The guidelines heading must start at column 0. A stray leading tab
// (#1415) would otherwise be sent to the model with every request.
expect(prompt).toContain("\n# Tool Use Guidelines\n")
expect(prompt).not.toContain("\t# Tool Use Guidelines")

// Should NOT contain a tool catalog / XML examples
expect(prompt).not.toContain("# Tools")
expect(prompt).not.toContain("## read_file")
Expand Down
2 changes: 1 addition & 1 deletion src/core/prompts/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ ${markdownFormattingSection()}

${getSharedToolUseSection()}${toolsCatalog}

${getToolUseGuidelinesSection()}
${getToolUseGuidelinesSection()}

${
// Forward the hub only when the mode actually exposes the MCP group, and pass the per-mode
Expand Down
Loading