tweak wording
parent
8c076ef959
commit
c39cebe971
|
|
@ -90,8 +90,8 @@ export namespace Truncate {
|
|||
await Bun.write(Bun.file(filepath), text)
|
||||
|
||||
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.`
|
||||
: `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}\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}\nUse Grep to search the full content or Read with offset/limit to read specific sections.`
|
||||
const message =
|
||||
direction === "head"
|
||||
? `${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.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.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.outputPath).toBeDefined()
|
||||
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")
|
||||
|
||||
const written = await Bun.file(result.outputPath!).text()
|
||||
|
|
|
|||
Loading…
Reference in New Issue