feat(ai): add system message schema and include it in messageSchema union

This commit is contained in:
can1357
2026-06-27 02:07:14 +02:00
parent 9ee8a582ed
commit adcb951d5d
2 changed files with 11 additions and 2 deletions
@@ -135,12 +135,17 @@ export const userMessageSchema = type({
content: type("string").or(userContentBlockSchema.array()),
});
export const systemMessageSchema = type({
role: "'system'",
content: type("string").or(systemBlockSchema.array()),
});
export const assistantMessageSchema = type({
role: "'assistant'",
content: type("string").or(assistantContentBlockSchema.array()),
});
export const messageSchema = userMessageSchema.or(assistantMessageSchema);
export const messageSchema = userMessageSchema.or(assistantMessageSchema).or(systemMessageSchema);
// ─── Tools ─────────────────────────────────────────────────────────────────
@@ -112,7 +112,11 @@ describe("Warp terminal capabilities", () => {
});
it("resolves the process-wide Warp terminal id and image protocol from TERM_PROGRAM", async () => {
const env: Record<string, string | undefined> = { ...Bun.env, TERM_PROGRAM: "WarpTerminal", COLORTERM: "truecolor" };
const env: Record<string, string | undefined> = {
...Bun.env,
TERM_PROGRAM: "WarpTerminal",
COLORTERM: "truecolor",
};
for (const key of [
"PI_FORCE_IMAGE_PROTOCOL",
"WSL_DISTRO_NAME",