File tree Expand file tree Collapse file tree 4 files changed +16
-15
lines changed
Expand file tree Collapse file tree 4 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ import {
2222} from "./non-stream-translation"
2323import { translateChunkToAnthropicEvents } from "./stream-translation"
2424
25- // eslint-disable-next-line max-lines-per-function
2625export async function handleCompletion ( c : Context ) {
2726 await checkRateLimit ( state )
2827
Original file line number Diff line number Diff line change @@ -144,20 +144,21 @@ export function translateChunkToAnthropicEvents(
144144 state . contentBlockOpen = false
145145 }
146146
147- events . push ( {
148- type : "message_delta" ,
149- delta : {
150- stop_reason : mapOpenAIStopReasonToAnthropic ( choice . finish_reason ) ,
151- stop_sequence : null ,
147+ events . push (
148+ {
149+ type : "message_delta" ,
150+ delta : {
151+ stop_reason : mapOpenAIStopReasonToAnthropic ( choice . finish_reason ) ,
152+ stop_sequence : null ,
153+ } ,
154+ usage : {
155+ output_tokens : 1 ,
156+ } ,
152157 } ,
153- usage : {
154- output_tokens : 1 ,
158+ {
159+ type : "message_stop" ,
155160 } ,
156- } )
157-
158- events . push ( {
159- type : "message_stop" ,
160- } )
161+ )
161162 }
162163
163164 return events
Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ export async function getVSCodeVersion() {
99 try {
1010 const response = await fetch (
1111 "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=visual-studio-code-bin" ,
12- { signal : controller . signal } ,
12+ {
13+ signal : controller . signal ,
14+ } ,
1315 )
1416
1517 const pkgbuild = await response . text ( )
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ interface RunServerOptions {
2525 showToken: boolean
2626}
2727
28- // eslint-disable-next-line max-lines-per-function
2928export async function runServer ( options : RunServerOptions ) : Promise < void > {
3029 if ( options . verbose ) {
3130 consola . level = 5
You can’t perform that action at this time.
0 commit comments