From 3a6a26981a8074b6ab0eaadb520db986e04799ff Mon Sep 17 00:00:00 2001 From: Kujtim Hoxha Date: Mon, 21 Apr 2025 19:48:36 +0200 Subject: init command --- internal/llm/tools/fetch.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'internal/llm/tools/fetch.go') diff --git a/internal/llm/tools/fetch.go b/internal/llm/tools/fetch.go index 827755863..47ff03e57 100644 --- a/internal/llm/tools/fetch.go +++ b/internal/llm/tools/fetch.go @@ -116,8 +116,14 @@ func (t *fetchTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error return NewTextErrorResponse("URL must start with http:// or https://"), nil } + sessionID, messageID := GetContextValues(ctx) + if sessionID == "" || messageID == "" { + return ToolResponse{}, fmt.Errorf("session ID and message ID are required for creating a new file") + } + p := t.permissions.Request( permission.CreatePermissionRequest{ + SessionID: sessionID, Path: config.WorkingDirectory(), ToolName: FetchToolName, Action: "fetch", -- cgit v1.2.3