🩹 fix chat.jsonl logging
This commit is contained in:
parent
ff3fe74f13
commit
4053f1ad60
3 changed files with 10 additions and 5 deletions
|
|
@ -71,10 +71,12 @@ export class VsCodeWebviewProtocol {
|
|||
response &&
|
||||
typeof response[Symbol.asyncIterator] === "function"
|
||||
) {
|
||||
for await (const update of response) {
|
||||
respond(update);
|
||||
let next = await response.next();
|
||||
while (!next.done) {
|
||||
respond(next.value);
|
||||
next = await response.next();
|
||||
}
|
||||
respond({ done: true });
|
||||
respond({ done: true, content: next.value.content });
|
||||
} else {
|
||||
respond(response || {});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2348,7 +2348,7 @@ core-util-is@1.0.2:
|
|||
integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==
|
||||
|
||||
"core@file:../../core":
|
||||
version "1.0.4"
|
||||
version "1.0.6"
|
||||
resolved "file:../../core"
|
||||
dependencies:
|
||||
"@mozilla/readability" "^0.5.0"
|
||||
|
|
|
|||
|
|
@ -170,7 +170,10 @@ export async function* llmStreamChat(
|
|||
yield { role: "user", content: next.value };
|
||||
next = await gen.next();
|
||||
}
|
||||
return { prompt: next.value?.prompt, completion: next.value?.completion };
|
||||
return {
|
||||
prompt: next.value.content?.prompt,
|
||||
completion: next.value.content?.completion,
|
||||
};
|
||||
}
|
||||
|
||||
export function appendText(text: string) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue