Revert "wrap system-user-interruption in its own fence block"
This reverts commit d5dea4446d.
This commit is contained in:
parent
10cd007d90
commit
4dfa6a55d5
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue