summaryrefslogtreecommitdiffhomepage
path: root/internal/llm/tools/bash.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/llm/tools/bash.go')
-rw-r--r--internal/llm/tools/bash.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/llm/tools/bash.go b/internal/llm/tools/bash.go
index 0cea20878..c7c970e5a 100644
--- a/internal/llm/tools/bash.go
+++ b/internal/llm/tools/bash.go
@@ -23,7 +23,8 @@ type BashPermissionsParams struct {
}
type BashResponseMetadata struct {
- Took int64 `json:"took"`
+ StartTime int64 `json:"start_time"`
+ EndTime int64 `json:"end_time"`
}
type bashTool struct {
permissions permission.Service
@@ -282,7 +283,6 @@ func (b *bashTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
if err != nil {
return ToolResponse{}, fmt.Errorf("error executing command: %w", err)
}
- took := time.Since(startTime).Milliseconds()
stdout = truncateOutput(stdout)
stderr = truncateOutput(stderr)
@@ -311,7 +311,8 @@ func (b *bashTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
}
metadata := BashResponseMetadata{
- Took: took,
+ StartTime: startTime.UnixMilli(),
+ EndTime: time.Now().UnixMilli(),
}
if stdout == "" {
return WithResponseMetadata(NewTextResponse("no output"), metadata), nil