mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-10 11:12:35 -07:00
Change the type of ToolResult.responseParts (#6875)
This commit is contained in:
committed by
GitHub
parent
a1328ad60c
commit
bcd4abcbd7
@@ -495,7 +495,7 @@ describe('loggers', () => {
|
||||
},
|
||||
response: {
|
||||
callId: 'test-call-id',
|
||||
responseParts: 'test-response',
|
||||
responseParts: [{ text: 'test-response' }],
|
||||
resultDisplay: undefined,
|
||||
error: undefined,
|
||||
errorType: undefined,
|
||||
@@ -562,7 +562,7 @@ describe('loggers', () => {
|
||||
},
|
||||
response: {
|
||||
callId: 'test-call-id',
|
||||
responseParts: 'test-response',
|
||||
responseParts: [{ text: 'test-response' }],
|
||||
resultDisplay: undefined,
|
||||
error: undefined,
|
||||
errorType: undefined,
|
||||
@@ -628,7 +628,7 @@ describe('loggers', () => {
|
||||
},
|
||||
response: {
|
||||
callId: 'test-call-id',
|
||||
responseParts: 'test-response',
|
||||
responseParts: [{ text: 'test-response' }],
|
||||
resultDisplay: undefined,
|
||||
error: undefined,
|
||||
errorType: undefined,
|
||||
@@ -696,7 +696,7 @@ describe('loggers', () => {
|
||||
},
|
||||
response: {
|
||||
callId: 'test-call-id',
|
||||
responseParts: 'test-response',
|
||||
responseParts: [{ text: 'test-response' }],
|
||||
resultDisplay: undefined,
|
||||
error: undefined,
|
||||
errorType: undefined,
|
||||
@@ -762,7 +762,7 @@ describe('loggers', () => {
|
||||
},
|
||||
response: {
|
||||
callId: 'test-call-id',
|
||||
responseParts: 'test-response',
|
||||
responseParts: [{ text: 'test-response' }],
|
||||
resultDisplay: undefined,
|
||||
error: {
|
||||
name: 'test-error-type',
|
||||
|
||||
@@ -46,13 +46,15 @@ const createFakeCompletedToolCall = (
|
||||
invocation: tool.build({ param: 'test' }),
|
||||
response: {
|
||||
callId: request.callId,
|
||||
responseParts: {
|
||||
functionResponse: {
|
||||
id: request.callId,
|
||||
name,
|
||||
response: { output: 'Success!' },
|
||||
responseParts: [
|
||||
{
|
||||
functionResponse: {
|
||||
id: request.callId,
|
||||
name,
|
||||
response: { output: 'Success!' },
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
error: undefined,
|
||||
errorType: undefined,
|
||||
resultDisplay: 'Success!',
|
||||
@@ -67,13 +69,15 @@ const createFakeCompletedToolCall = (
|
||||
tool,
|
||||
response: {
|
||||
callId: request.callId,
|
||||
responseParts: {
|
||||
functionResponse: {
|
||||
id: request.callId,
|
||||
name,
|
||||
response: { error: 'Tool failed' },
|
||||
responseParts: [
|
||||
{
|
||||
functionResponse: {
|
||||
id: request.callId,
|
||||
name,
|
||||
response: { error: 'Tool failed' },
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
error: error || new Error('Tool failed'),
|
||||
errorType: ToolErrorType.UNKNOWN,
|
||||
resultDisplay: 'Failure!',
|
||||
|
||||
Reference in New Issue
Block a user