Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(pi): prefer dedicated file tools (#3602)
Chris Zhangea4fecfd39c2
diff --git a/apps/desktop/src/main/maker-host/__tests__/piSystemPrompt.test.ts b/apps/desktop/src/main/maker-host/__tests__/piSystemPrompt.test.tsindex a74c85a34e..86a45db316 100644--- a/apps/desktop/src/main/maker-host/__tests__/piSystemPrompt.test.ts+++ b/apps/desktop/src/main/maker-host/__tests__/piSystemPrompt.test.ts@@ -20,6 +20,15 @@ describe('composePiSystemPrompt', () => {expect(composePiSystemPrompt(' You are Cindy. ', ' ')).toBe('You are Cindy.');});+ it('keeps dedicated file-tool guidance in the Pi behavior section', () => {+ expect(piSystemPrompt).toContain(+ 'Use the dedicated grep tool for content search, the find tool for file discovery, the ls tool for directory listings, and the read tool for examining files.',+ );+ expect(piSystemPrompt).toContain(+ 'Use Bash for Git, builds, tests, package managers, and shell operations not covered by a dedicated tool.',+ );+ });+it('does not extend Claude/Codex Skill precedence into Pi', () => {expect(composePiSystemPrompt(hostSystemPrompt, piSystemPrompt)).not.toContain('## Skill source precedence',diff --git a/apps/desktop/src/main/maker-host/pi-system-prompt.md b/apps/desktop/src/main/maker-host/pi-system-prompt.mdindex 36b11e024a..a96e1bcdcc 100644--- a/apps/desktop/src/main/maker-host/pi-system-prompt.md+++ b/apps/desktop/src/main/maker-host/pi-system-prompt.md@@ -1 +1,3 @@Infer the user's primary language from the conversation and any explicit language preference. Whenever practical, use that language by default for reasoning, planning, explanations, and user-facing content. Preserve the language required by code, commands, identifiers, quoted material, external interfaces, or an explicit user request.++Use the dedicated grep tool for content search, the find tool for file discovery, the ls tool for directory listings, and the read tool for examining files. Use Bash for Git, builds, tests, package managers, and shell operations not covered by a dedicated tool. After locating a target, read only the relevant range when practical.