File tree 6 files changed +9
-30
lines changed
components/engines/typescript/agent/tools
6 files changed +9
-30
lines changed Original file line number Diff line number Diff line change @@ -167,18 +167,8 @@ export class InterpreterTool implements BaseTool<InterpreterParameter> {
167
167
}
168
168
return path . join ( this . outputDir , filename ) ;
169
169
}
170
- < << << << HEAD
171
- < < << << < HEAD
172
170
173
171
private getFileUrl ( filename : string ) : string {
174
172
return `${ this . fileServerURLPrefix } /${ this . outputDir } /${ filename } ` ;
175
173
}
176
- === === =
177
- >>> >>> > 54 f971e ( build tool system prompt )
178
- = === ===
179
-
180
- private getFileUrl ( filename : string ) : string {
181
- return `${ this . fileSystemOrigin } /api/tool-output/${ filename } ` ;
182
- }
183
- > >>> >>> 5 aaeee0 ( refactor : use local file system , use absolute resource url )
184
- }
174
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -42,4 +42,4 @@ export async function GET(
42
42
console . error ( error ) ;
43
43
return NextResponse . json ( { detail : "File not found" } , { status : 404 } ) ;
44
44
}
45
- }
45
+ }
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { ChatEvents } from "./chat-events";
8
8
import { ChatImage } from "./chat-image" ;
9
9
import { ChatSources } from "./chat-sources" ;
10
10
import ChatTools from "./chat-tools" ;
11
+ import CsvContent from "./csv-content" ;
11
12
import {
12
13
AnnotationData ,
13
14
CsvData ,
@@ -20,7 +21,6 @@ import {
20
21
} from "./index" ;
21
22
import Markdown from "./markdown" ;
22
23
import { useCopyToClipboard } from "./use-copy-to-clipboard" ;
23
- import CsvContent from "./csv-content" ;
24
24
25
25
type ContentDisplayConfig = {
26
26
order : number ;
Original file line number Diff line number Diff line change @@ -51,7 +51,12 @@ export type ToolData = {
51
51
} ;
52
52
} ;
53
53
54
- export type AnnotationData = ImageData | CsvData | SourceData | EventData | ToolData ;
54
+ export type AnnotationData =
55
+ | ImageData
56
+ | CsvData
57
+ | SourceData
58
+ | EventData
59
+ | ToolData ;
55
60
56
61
export type MessageAnnotation = {
57
62
type : MessageAnnotationType ;
Original file line number Diff line number Diff line change @@ -9,16 +9,3 @@ export const getStaticFileDataUrl = (filePath: string) => {
9
9
}
10
10
return fileUrl ;
11
11
} ;
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
- / a t t a c h m e n t : \/ \/ / g,
20
- `${ backendOrigin } /api/${ STORAGE_FOLDER } /` ,
21
- ) ;
22
- }
23
- return content . replace ( / a t t a c h m e n t : \/ \/ / g, `/api/${ STORAGE_FOLDER } /` ) ;
24
- } ;
You can’t perform that action at this time.
0 commit comments