2.预览翻译文件时无法预览图片! 3.上传文件都要存到知识库中!可被问答 4.在SIP翻译专家agent下上传文件后默认给提示文案可直接发送
This commit is contained in:
1 parent
8c3d0ee31c
commit
90b843b4e8
9 files changed
+308
-75
No files matched your search
@@ -226,7 +226,7 @@ func TestXlsxTranslateToolEndToEndSandbox(t *testing.T) {
|
||||
store := &fakeTranslateStore{files: map[string][]byte{
|
||||
"/workspace/input/part.xlsx": buildToolFixture(t),
|
||||
}}
|
||||
tool := NewXlsxTranslateTool(store, store, nil, nil, nil, &fakeTranslateChat{})
|
||||
tool := NewXlsxTranslateTool(store, store, nil, nil, nil, nil, "", &fakeTranslateChat{})
|
||||
|
||||
args, _ := json.Marshal(XlsxTranslateInput{FilePath: "/workspace/input/part.xlsx"})
|
||||
result, err := tool.Execute(toolExecContext("sess-1", "assistant-1"), args)
|
||||
@@ -270,7 +270,7 @@ func TestXlsxTranslateToolWithoutSandbox(t *testing.T) {
|
||||
"assistant-1": {ID: "assistant-1", SessionID: "sess-1"},
|
||||
}}
|
||||
files := &fakeTranslateFileService{}
|
||||
tool := NewXlsxTranslateTool(nil, nil, tempDoc, files, sink, &fakeTranslateChat{})
|
||||
tool := NewXlsxTranslateTool(nil, nil, tempDoc, files, sink, nil, "", &fakeTranslateChat{})
|
||||
|
||||
args, _ := json.Marshal(XlsxTranslateInput{AttachmentName: "D4-A08AR12000002-A3-SIP.xlsx"})
|
||||
result, err := tool.Execute(toolExecContext("sess-1", "assistant-1"), args)
|
||||
@@ -323,7 +323,7 @@ func TestXlsxTranslateArtifactDeliveryIsIdempotent(t *testing.T) {
|
||||
"assistant-1": {ID: "assistant-1", SessionID: "sess-1"},
|
||||
}}
|
||||
files := &fakeTranslateFileService{}
|
||||
tool := NewXlsxTranslateTool(nil, nil, tempDoc, files, sink, &fakeTranslateChat{})
|
||||
tool := NewXlsxTranslateTool(nil, nil, tempDoc, files, sink, nil, "", &fakeTranslateChat{})
|
||||
args, _ := json.Marshal(XlsxTranslateInput{AttachmentName: "part.xlsx"})
|
||||
|
||||
for i := 0; i < 2; i++ {
|
||||
@@ -349,7 +349,7 @@ func TestXlsxTranslateToolSandboxReadFallsBackToAttachment(t *testing.T) {
|
||||
tempDoc.docs = append(tempDoc.docs, &types.TemporaryDocument{
|
||||
ID: "doc-1", FileName: "part.xlsx", FileType: "xlsx",
|
||||
})
|
||||
tool := NewXlsxTranslateTool(store, store, tempDoc, nil, nil, &fakeTranslateChat{})
|
||||
tool := NewXlsxTranslateTool(store, store, tempDoc, nil, nil, nil, "", &fakeTranslateChat{})
|
||||
|
||||
args, _ := json.Marshal(XlsxTranslateInput{FilePath: "/workspace/input/part.xlsx"})
|
||||
result, err := tool.Execute(toolExecContext("sess-1", "assistant-1"), args)
|
||||
@@ -368,7 +368,7 @@ func TestXlsxTranslateToolRejectsNonXlsx(t *testing.T) {
|
||||
store := &fakeTranslateStore{files: map[string][]byte{
|
||||
"/workspace/input/part.xls": {0xD0, 0xCF, 0x11, 0xE0},
|
||||
}}
|
||||
tool := NewXlsxTranslateTool(store, store, nil, nil, nil, &fakeTranslateChat{})
|
||||
tool := NewXlsxTranslateTool(store, store, nil, nil, nil, nil, "", &fakeTranslateChat{})
|
||||
|
||||
args, _ := json.Marshal(XlsxTranslateInput{FilePath: "/workspace/input/part.xls"})
|
||||
result, _ := tool.Execute(toolExecContext("sess-1", "assistant-1"), args)
|
||||
@@ -383,7 +383,7 @@ func TestXlsxTranslateToolRejectsNonXlsx(t *testing.T) {
|
||||
func TestXlsxTranslateToolMissingFile(t *testing.T) {
|
||||
store := &fakeTranslateStore{files: map[string][]byte{}}
|
||||
tempDoc := &fakeTranslateTempDoc{}
|
||||
tool := NewXlsxTranslateTool(store, store, tempDoc, nil, nil, &fakeTranslateChat{})
|
||||
tool := NewXlsxTranslateTool(store, store, tempDoc, nil, nil, nil, "", &fakeTranslateChat{})
|
||||
|
||||
args, _ := json.Marshal(XlsxTranslateInput{FilePath: "/workspace/input/missing.xlsx"})
|
||||
result, _ := tool.Execute(toolExecContext("sess-1", "assistant-1"), args)
|
||||
|
||||
Reference in new issue
Block a user