feat(ai): add system message schema and include it in messageSchema union
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user