Revert "wrap system-user-interruption in its own fence block"

This reverts commit d5dea4446d.
This commit is contained in:
Ollie Agent 2026-08-03 00:39:29 +02:00
parent 10cd007d90
commit 4dfa6a55d5
1 changed files with 2 additions and 6 deletions

View File

@ -341,7 +341,7 @@ func run(ctx context.Context, cfg agentConfig, state state) error {
result = "error: tool execution interrupted by user"
if cfg.PopInject != nil {
if injected := cfg.PopInject(); injected != "" {
result += "\n```\n\n<system-user-interruption>\n" + injected + "\n</system-user-interruption>\n```\n"
result += "\n\n<system-user-interruption>\n" + injected + "\n</system-user-interruption>"
}
}
emit(cfg, Event{Role: "tool", Name: tc.Name, Content: result, OutputFormat: toolOutputFormat(cfg, tc.Name)})
@ -377,11 +377,7 @@ func run(ctx context.Context, cfg agentConfig, state state) error {
}
if cfg.PopInject != nil {
if injected := cfg.PopInject(); injected != "" {
fmt := toolOutputFormat(cfg, tc.Name)
if fmt != "" {
fmt = " " + fmt
}
suffix += "\n```\n\n<system-user-interruption>\n" + injected + "\n</system-user-interruption>\n```" + fmt + "\n"
suffix += "\n\n<system-user-interruption>\n" + injected + "\n</system-user-interruption>"
}
}
result += suffix