Skip to content

Commit

Permalink
feat: ✨ enhance output handling and add model alias reset
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Jan 11, 2025
1 parent 735b68c commit 9771d16
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/core/src/promptrunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,11 @@ export async function runTemplate(
changelogs,
edits,
} = chatResult
let { annotations } = chatResult
if (chatResult.text) output.appendContent(chatResult.text)
let { text, annotations } = chatResult
const userContent = output.content
if (userContent) {
text = userContent + "\n\n" + text
}

// Reporting and tracing output
if (fences?.length)
Expand Down Expand Up @@ -324,7 +327,7 @@ export async function runTemplate(
annotations,
changelogs,
fileEdits,
text: output.content,
text,
version,
fences,
frames,
Expand Down
3 changes: 3 additions & 0 deletions packages/core/src/testhost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ export class TestHost implements RuntimeHost {
return { ok: true }
}

clearModelAlias(source: "cli" | "env" | "config" | "script"): void {
delete this.modelAliases[source]
}
setModelAlias(
source: "cli" | "env" | "config",
id: string,
Expand Down

0 comments on commit 9771d16

Please sign in to comment.