Port assistant integration (with cloud AIs) to iOS

This commit is contained in:
James Babcock committed 2026-09-19 00:02:15 -07:00
1 parent 9e18745e53
commit 617cdc39eb
25 files changed
+508 -63

No files matched your search

+2 -2
View File
@@ -1,5 +1,5 @@
import { AssistantSession, type AssistantBackendConfig, type AssistantSessionHistory } from "./session";
import { ASSISTANT_MODEL_VALUES, type AssistantModel } from "./models";
import { ASSISTANT_MODEL_VALUES, supportedAssistantModel, type AssistantModel } from "./models";
export type ReasoningLevel = "default" | "low" | "medium" | "high";
export type Conversation = {
@@ -31,7 +31,7 @@ export class AssistantConversations {
typeof record.id === "string" && ASSISTANT_MODEL_VALUES.includes(record.model) &&
["default", "low", "medium", "high"].includes(record.reasoning) &&
Array.isArray(record.history?.messages) && Array.isArray(record.history?.transcript),
).map((record) => ({ ...record, session: null }));
).map((record) => ({ ...record, model: supportedAssistantModel(record.model), session: null }));
this.selectedId = data.selectedId;
}
} catch { /* First launch or invalid saved state. */ }