88 toolCallSchema ,
99 toolResultSchema ,
1010} from './types/session-state'
11- import { FileVersionSchema , ProjectFileContextSchema } from './util/file'
11+ import { ProjectFileContextSchema } from './util/file'
1212
1313export const FileChangeSchema = z . object ( {
1414 type : z . enum ( [ 'patch' , 'file' ] ) ,
@@ -96,22 +96,6 @@ export const InitResponseSchema = z
9696 )
9797export type InitResponse = z . infer < typeof InitResponseSchema >
9898
99- export const ResponseCompleteSchema = z
100- . object ( {
101- type : z . literal ( 'response-complete' ) ,
102- userInputId : z . string ( ) ,
103- response : z . string ( ) ,
104- changes : CHANGES ,
105- changesAlreadyApplied : CHANGES ,
106- addedFileVersions : z . array ( FileVersionSchema ) ,
107- resetFileVersions : z . boolean ( ) ,
108- } )
109- . merge (
110- UsageReponseSchema . omit ( {
111- type : true ,
112- } ) . partial ( ) ,
113- )
114-
11599export const MessageCostResponseSchema = z . object ( {
116100 type : z . literal ( 'message-cost-response' ) ,
117101 promptId : z . string ( ) ,
@@ -142,7 +126,6 @@ export const SERVER_ACTION_SCHEMA = z.discriminatedUnion('type', [
142126 chunk : z . string ( ) ,
143127 prompt : z . string ( ) . optional ( ) ,
144128 } ) ,
145- ResponseCompleteSchema ,
146129 PromptResponseSchema ,
147130 z . object ( {
148131 type : z . literal ( 'read-files' ) ,
@@ -157,26 +140,6 @@ export const SERVER_ACTION_SCHEMA = z.discriminatedUnion('type', [
157140 args : z . record ( z . any ( ) ) ,
158141 timeout : z . number ( ) . optional ( ) ,
159142 } ) ,
160- z . object ( {
161- type : z . literal ( 'tool-call' ) ,
162- userInputId : z . string ( ) ,
163- response : z . string ( ) ,
164- data : toolCallSchema ,
165- changes : CHANGES ,
166- changesAlreadyApplied : CHANGES ,
167- addedFileVersions : z . array ( FileVersionSchema ) ,
168- resetFileVersions : z . boolean ( ) ,
169- } ) ,
170- z . object ( {
171- type : z . literal ( 'terminal-command-result' ) ,
172- userInputId : z . string ( ) ,
173- result : z . string ( ) ,
174- } ) ,
175- z . object ( {
176- type : z . literal ( 'npm-version-status' ) ,
177- isUpToDate : z . boolean ( ) ,
178- latestVersion : z . string ( ) ,
179- } ) ,
180143 InitResponseSchema ,
181144 UsageReponseSchema ,
182145 MessageCostResponseSchema ,
@@ -186,10 +149,6 @@ export const SERVER_ACTION_SCHEMA = z.discriminatedUnion('type', [
186149 error : z . string ( ) . optional ( ) ,
187150 remainingBalance : z . number ( ) . optional ( ) ,
188151 } ) ,
189- z . object ( {
190- type : z . literal ( 'commit-message-response' ) ,
191- commitMessage : z . string ( ) ,
192- } ) ,
193152 z . object ( {
194153 // The server is imminently going to shutdown, and the client should reconnect
195154 type : z . literal ( 'request-reconnect' ) ,
0 commit comments