mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-24 03:00:28 -05:00
Compare commits
9 Commits
chore/reac
...
fix/ui-for
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78baf1857b | ||
|
|
d08d5dd052 | ||
|
|
1bed2a2916 | ||
|
|
ef42b17e3b | ||
|
|
04dc25f110 | ||
|
|
0c0bd2ccb6 | ||
|
|
9a048b9caf | ||
|
|
5a3e33745e | ||
|
|
8ef89ac937 |
@@ -501,27 +501,79 @@ function getFileAccordionData(
|
||||
"path",
|
||||
"pattern",
|
||||
) ?? "File";
|
||||
const content = getStringField(output, "content", "text", "_raw");
|
||||
const content = getStringField(
|
||||
output,
|
||||
"content",
|
||||
"text",
|
||||
"preview",
|
||||
"content_preview",
|
||||
"_raw",
|
||||
);
|
||||
const message = getStringField(output, "message");
|
||||
|
||||
// Handle base64 content from workspace files
|
||||
let displayContent = content;
|
||||
if (output.content_base64 && typeof output.content_base64 === "string") {
|
||||
try {
|
||||
const bytes = Uint8Array.from(atob(output.content_base64), (c) =>
|
||||
c.charCodeAt(0),
|
||||
);
|
||||
displayContent = new TextDecoder().decode(bytes);
|
||||
} catch {
|
||||
displayContent = "[Binary content]";
|
||||
}
|
||||
}
|
||||
|
||||
// Handle MCP-style content blocks from SDK tools (Read, Glob, Grep, Edit)
|
||||
if (!displayContent) {
|
||||
displayContent = extractMcpText(output);
|
||||
}
|
||||
|
||||
// For Glob/list results, try to show file list
|
||||
const files = Array.isArray(output.files)
|
||||
? output.files.filter((f: unknown): f is string => typeof f === "string")
|
||||
: null;
|
||||
// Files can be either strings (from Glob) or objects (from list_workspace_files)
|
||||
const files = Array.isArray(output.files) ? output.files : null;
|
||||
|
||||
// Format file list for display
|
||||
let fileListText: string | null = null;
|
||||
if (files && files.length > 0) {
|
||||
const fileLines = files.map((f: unknown) => {
|
||||
if (typeof f === "string") {
|
||||
return f;
|
||||
}
|
||||
if (typeof f === "object" && f !== null) {
|
||||
const fileObj = f as Record<string, unknown>;
|
||||
// Workspace file format: path (size, mime_type)
|
||||
const filePath =
|
||||
typeof fileObj.path === "string"
|
||||
? fileObj.path
|
||||
: typeof fileObj.name === "string"
|
||||
? fileObj.name
|
||||
: "unknown";
|
||||
const mimeType =
|
||||
typeof fileObj.mime_type === "string" ? fileObj.mime_type : "unknown";
|
||||
const size =
|
||||
typeof fileObj.size_bytes === "number"
|
||||
? ` (${(fileObj.size_bytes / 1024).toFixed(1)} KB, ${mimeType})`
|
||||
: "";
|
||||
return `${filePath}${size}`;
|
||||
}
|
||||
return String(f);
|
||||
});
|
||||
fileListText = fileLines.join("\n");
|
||||
}
|
||||
|
||||
return {
|
||||
title: message ?? "File output",
|
||||
description: truncate(filePath, 80),
|
||||
content: (
|
||||
<div className="space-y-2">
|
||||
{content && (
|
||||
<ContentCodeBlock>{truncate(content, 2000)}</ContentCodeBlock>
|
||||
{displayContent && (
|
||||
<ContentCodeBlock>{truncate(displayContent, 2000)}</ContentCodeBlock>
|
||||
)}
|
||||
{files && files.length > 0 && (
|
||||
<ContentCodeBlock>
|
||||
{truncate(files.join("\n"), 2000)}
|
||||
</ContentCodeBlock>
|
||||
{fileListText && (
|
||||
<ContentCodeBlock>{truncate(fileListText, 2000)}</ContentCodeBlock>
|
||||
)}
|
||||
{!content && !files && message && (
|
||||
{!displayContent && !fileListText && message && (
|
||||
<ContentMessage>{message}</ContentMessage>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -218,6 +218,17 @@ If you initially installed Docker with Hyper-V, you **don’t need to reinstall*
|
||||
|
||||
For more details, refer to [Docker's official documentation](https://docs.docker.com/desktop/windows/wsl/).
|
||||
|
||||
### ⚠️ Podman Not Supported
|
||||
|
||||
AutoGPT requires **Docker** (Docker Desktop or Docker Engine). **Podman and podman-compose are not supported** and may cause path resolution issues, particularly on Windows.
|
||||
|
||||
If you see errors like:
|
||||
```text
|
||||
Error: the specified Containerfile or Dockerfile does not exist, ..\..\autogpt_platform\backend\Dockerfile
|
||||
```
|
||||
|
||||
This indicates you're using Podman instead of Docker. Please install [Docker Desktop](https://docs.docker.com/desktop/) and use `docker compose` instead of `podman-compose`.
|
||||
|
||||
|
||||
## Development
|
||||
|
||||
|
||||
Reference in New Issue
Block a user