tweak wording
This commit is contained in:
parent
8c076ef959
commit
c39cebe971
3 changed files with 5 additions and 5 deletions
|
|
@ -90,8 +90,8 @@ export namespace Truncate {
|
||||||
await Bun.write(Bun.file(filepath), text)
|
await Bun.write(Bun.file(filepath), text)
|
||||||
|
|
||||||
const hint = hasTaskTool(agent)
|
const hint = hasTaskTool(agent)
|
||||||
? `Full output written to: ${filepath} (read-only)\nIMPORTANT: Use the Task tool to have a subagent process this file with Grep and Read (with offset/limit). Do NOT read the full file yourself - delegate to save context.`
|
? `The tool output was too large, the full output was written to the following file: ${filepath}\nIMPORTANT: Use the Task tool to have a subagent process this file with Grep and Read (with offset/limit). Do NOT read the full file yourself - delegate to save context.`
|
||||||
: `Full output written to: ${filepath} (read-only)\nUse Grep to search the full content or Read with offset/limit to read specific sections.`
|
: `The tool output was too large, the full output was written to the following file: ${filepath}\nUse Grep to search the full content or Read with offset/limit to read specific sections.`
|
||||||
const message =
|
const message =
|
||||||
direction === "head"
|
direction === "head"
|
||||||
? `${preview}\n\n...${removed} ${unit} truncated...\n\n${hint}`
|
? `${preview}\n\n...${removed} ${unit} truncated...\n\n${hint}`
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ describe("tool.bash truncation", () => {
|
||||||
)
|
)
|
||||||
expect((result.metadata as any).truncated).toBe(true)
|
expect((result.metadata as any).truncated).toBe(true)
|
||||||
expect(result.output).toContain("truncated")
|
expect(result.output).toContain("truncated")
|
||||||
expect(result.output).toContain("Full output written to:")
|
expect(result.output).toContain("The tool output was too large")
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
@ -268,7 +268,7 @@ describe("tool.bash truncation", () => {
|
||||||
)
|
)
|
||||||
expect((result.metadata as any).truncated).toBe(true)
|
expect((result.metadata as any).truncated).toBe(true)
|
||||||
expect(result.output).toContain("truncated")
|
expect(result.output).toContain("truncated")
|
||||||
expect(result.output).toContain("Full output written to:")
|
expect(result.output).toContain("The tool output was too large")
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ describe("Truncate", () => {
|
||||||
expect(result.truncated).toBe(true)
|
expect(result.truncated).toBe(true)
|
||||||
expect(result.outputPath).toBeDefined()
|
expect(result.outputPath).toBeDefined()
|
||||||
expect(result.outputPath).toContain("tool_")
|
expect(result.outputPath).toContain("tool_")
|
||||||
expect(result.content).toContain("Full output written to:")
|
expect(result.content).toContain("The tool output was too large")
|
||||||
expect(result.content).toContain("Grep")
|
expect(result.content).toContain("Grep")
|
||||||
|
|
||||||
const written = await Bun.file(result.outputPath!).text()
|
const written = await Bun.file(result.outputPath!).text()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue