chore: update deps
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
import type { Api, Model } from "@mariozechner/pi-ai";
|
||||
|
||||
export function normalizeModelCompat(model: Model<Api>): Model<Api> {
|
||||
const isOpenAICompletionsModel = (
|
||||
candidate: Model<Api>,
|
||||
): candidate is Model<"openai-completions"> => candidate.api === "openai-completions";
|
||||
const baseUrl = model.baseUrl ?? "";
|
||||
const isZai = model.provider === "zai" || baseUrl.includes("api.z.ai");
|
||||
if (!isZai) return model;
|
||||
if (!isZai || !isOpenAICompletionsModel(model)) return model;
|
||||
|
||||
const compat = model.compat ?? {};
|
||||
if (compat.supportsDeveloperRole === false) return model;
|
||||
|
||||
@@ -192,7 +192,8 @@ export async function runTui(opts: TuiOptions) {
|
||||
const statusContainer = new Container();
|
||||
const footer = new Text("", 1, 0);
|
||||
const chatLog = new ChatLog();
|
||||
const editor = new CustomEditor(editorTheme);
|
||||
const tui = new TUI(new ProcessTerminal());
|
||||
const editor = new CustomEditor(tui, editorTheme);
|
||||
const root = new Container();
|
||||
root.addChild(header);
|
||||
root.addChild(chatLog);
|
||||
@@ -212,7 +213,6 @@ export async function runTui(opts: TuiOptions) {
|
||||
);
|
||||
};
|
||||
|
||||
const tui = new TUI(new ProcessTerminal());
|
||||
tui.addChild(root);
|
||||
tui.setFocus(editor);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user