fix: CLI-Zugriff auf Temp-Bilder auch ohne Workspace
Read-Tool wird jetzt immer erlaubt (nicht nur mit Workspace), und /tmp/gott-cli-images/ wird als --add-dir hinzugefügt, damit gesendete Bilder von der CLI gelesen werden können. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
1c622abb37
commit
f3069cedf7
1 file changed
+13
@@ -111,6 +111,11 @@ public class ClaudeCliService
|
|||||||
// Normaler Modus mit Workspace: alle File-Tools
|
// Normaler Modus mit Workspace: alle File-Tools
|
||||||
tools.AddRange(new[] { "Bash(*)", "Read", "Write", "Edit", "Glob", "Grep" });
|
tools.AddRange(new[] { "Bash(*)", "Read", "Write", "Edit", "Glob", "Grep" });
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Kein Workspace: Read für Temp-Dateien (z.B. gesendete Bilder)
|
||||||
|
tools.Add("Read");
|
||||||
|
}
|
||||||
if (webSearch) { tools.Add("WebFetch"); tools.Add("WebSearch"); }
|
if (webSearch) { tools.Add("WebFetch"); tools.Add("WebSearch"); }
|
||||||
// MCP-Tools erlauben (wenn MCP-Config vorhanden)
|
// MCP-Tools erlauben (wenn MCP-Config vorhanden)
|
||||||
if (!string.IsNullOrEmpty(mcpConfigPath))
|
if (!string.IsNullOrEmpty(mcpConfigPath))
|
||||||
@@ -130,6 +135,14 @@ public class ClaudeCliService
|
|||||||
args.Add(workspace);
|
args.Add(workspace);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Temp-Ordner immer zugänglich machen (für gesendete Bilder etc.)
|
||||||
|
var tempImageDir = Path.Combine(Path.GetTempPath(), "gott-cli-images");
|
||||||
|
if (Directory.Exists(tempImageDir))
|
||||||
|
{
|
||||||
|
args.Add("--add-dir");
|
||||||
|
args.Add(tempImageDir);
|
||||||
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(modelId))
|
if (!string.IsNullOrEmpty(modelId))
|
||||||
{
|
{
|
||||||
args.Add("--model");
|
args.Add("--model");
|
||||||
|
|||||||
Reference in new issue
Block a user