mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-25 03:34:22 +01:00
fix init command and escape to cancel
This commit is contained in:
@@ -644,7 +644,7 @@ export namespace Session {
|
||||
tools[key] = item
|
||||
}
|
||||
|
||||
const result = streamText({
|
||||
const stream = streamText({
|
||||
onError() {},
|
||||
maxRetries: 10,
|
||||
maxOutputTokens: outputLimit,
|
||||
@@ -677,7 +677,8 @@ export namespace Session {
|
||||
],
|
||||
}),
|
||||
})
|
||||
return processStream(assistantMsg, model.info, result)
|
||||
const result = await processStream(assistantMsg, model.info, stream)
|
||||
return result
|
||||
}
|
||||
|
||||
async function processStream(
|
||||
@@ -979,7 +980,7 @@ export namespace Session {
|
||||
}
|
||||
await updateMessage(next)
|
||||
|
||||
const result = streamText({
|
||||
const stream = streamText({
|
||||
abortSignal: abort.signal,
|
||||
model: model.language,
|
||||
messages: [
|
||||
@@ -1002,7 +1003,8 @@ export namespace Session {
|
||||
],
|
||||
})
|
||||
|
||||
return processStream(next, model.info, result)
|
||||
const result = await processStream(next, model.info, stream)
|
||||
return result
|
||||
}
|
||||
|
||||
function lock(sessionID: string) {
|
||||
|
||||
Reference in New Issue
Block a user