File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
packages/opencode/src/session Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -325,7 +325,7 @@ export namespace Session {
325325 for ( const child of await children ( sessionID ) ) {
326326 await remove ( child . id )
327327 }
328- await unshare ( sessionID ) . catch ( ( ) => { } )
328+ await unshare ( sessionID ) . catch ( ( ) => { } )
329329 for ( const msg of await Storage . list ( [ "message" , sessionID ] ) ) {
330330 for ( const part of await Storage . list ( [ "part" , msg . at ( - 1 ) ! ] ) ) {
331331 await Storage . remove ( part )
@@ -428,11 +428,10 @@ export namespace Session {
428428 return value
429429 }
430430
431- const cacheWriteTokens =
432- ( input . metadata ?. [ "anthropic" ] ?. [ "cacheCreationInputTokens" ] ??
433- // @ts -expect-error
434- input . metadata ?. [ "bedrock" ] ?. [ "usage" ] ?. [ "cacheWriteInputTokens" ] ??
435- 0 ) as number
431+ const cacheWriteTokens = ( input . metadata ?. [ "anthropic" ] ?. [ "cacheCreationInputTokens" ] ??
432+ // @ts -expect-error
433+ input . metadata ?. [ "bedrock" ] ?. [ "usage" ] ?. [ "cacheWriteInputTokens" ] ??
434+ 0 ) as number
436435
437436 const tokens = {
438437 input : safe ( adjustedInputTokens ) ,
Original file line number Diff line number Diff line change @@ -342,7 +342,7 @@ export namespace SessionProcessor {
342342 message : error . data . message . includes ( "Overloaded" ) ? "Provider is overloaded" : error . data . message ,
343343 next : Date . now ( ) + delay ,
344344 } )
345- await SessionRetry . sleep ( delay , input . abort ) . catch ( ( ) => { } )
345+ await SessionRetry . sleep ( delay , input . abort ) . catch ( ( ) => { } )
346346 continue
347347 }
348348 input . assistantMessage . error = error
You can’t perform that action at this time.
0 commit comments