Skip to content

Commit 5d19019

Browse files
committed
remove dead code
1 parent 2e47af8 commit 5d19019

File tree

6 files changed

+9
-30
lines changed

6 files changed

+9
-30
lines changed

templates/components/engines/typescript/agent/tools/interpreter.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -167,18 +167,8 @@ export class InterpreterTool implements BaseTool<InterpreterParameter> {
167167
}
168168
return path.join(this.outputDir, filename);
169169
}
170-
<<<<<<< HEAD
171-
<<<<<<< HEAD
172170

173171
private getFileUrl(filename: string): string {
174172
return `${this.fileServerURLPrefix}/${this.outputDir}/${filename}`;
175173
}
176-
=======
177-
>>>>>>> 54f971e (build tool system prompt)
178-
=======
179-
180-
private getFileUrl(filename: string): string {
181-
return `${this.fileSystemOrigin}/api/tool-output/${filename}`;
182-
}
183-
>>>>>>> 5aaeee0 (refactor: use local file system, use absolute resource url)
184-
}
174+
}

templates/types/streaming/fastapi/gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

templates/types/streaming/nextjs/app/api/files/[...slug]/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ export async function GET(
4242
console.error(error);
4343
return NextResponse.json({ detail: "File not found" }, { status: 404 });
4444
}
45-
}
45+
}

templates/types/streaming/nextjs/app/components/ui/chat/chat-message.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { ChatEvents } from "./chat-events";
88
import { ChatImage } from "./chat-image";
99
import { ChatSources } from "./chat-sources";
1010
import ChatTools from "./chat-tools";
11+
import CsvContent from "./csv-content";
1112
import {
1213
AnnotationData,
1314
CsvData,
@@ -20,7 +21,6 @@ import {
2021
} from "./index";
2122
import Markdown from "./markdown";
2223
import { useCopyToClipboard } from "./use-copy-to-clipboard";
23-
import CsvContent from "./csv-content";
2424

2525
type ContentDisplayConfig = {
2626
order: number;

templates/types/streaming/nextjs/app/components/ui/chat/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ export type ToolData = {
5151
};
5252
};
5353

54-
export type AnnotationData = ImageData | CsvData | SourceData | EventData | ToolData;
54+
export type AnnotationData =
55+
| ImageData
56+
| CsvData
57+
| SourceData
58+
| EventData
59+
| ToolData;
5560

5661
export type MessageAnnotation = {
5762
type: MessageAnnotationType;

templates/types/streaming/nextjs/app/components/ui/lib/url.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,3 @@ export const getStaticFileDataUrl = (filePath: string) => {
99
}
1010
return fileUrl;
1111
};
12-
13-
// replace all attachment:// url with /api/data/
14-
export const replaceAttachmentUrl = (content: string) => {
15-
const isUsingBackend = !!process.env.NEXT_PUBLIC_CHAT_API;
16-
if (isUsingBackend) {
17-
const backendOrigin = new URL(process.env.NEXT_PUBLIC_CHAT_API!).origin;
18-
return content.replace(
19-
/attachment:\/\//g,
20-
`${backendOrigin}/api/${STORAGE_FOLDER}/`,
21-
);
22-
}
23-
return content.replace(/attachment:\/\//g, `/api/${STORAGE_FOLDER}/`);
24-
};

0 commit comments

Comments
 (0)