Reconcile the original notification fix with the integrated main snapshot. Group notification settings and simplify localized copy and documentation. Preserve permission opt-out and notification click routing across app transitions. Suppress late completion notifications for discarded temporary chats and align notification settings skeletons with the loaded layout.
43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
import type { SettingsPayload } from "@/lib/types";
|
|
|
|
export type SettingsExitGuard = (leave: () => void) => void;
|
|
|
|
export type SettingsSectionKey =
|
|
| "overview"
|
|
| "about"
|
|
| "appearance"
|
|
| "notifications"
|
|
| "models"
|
|
| "capabilities"
|
|
| "image"
|
|
| "voice"
|
|
| "browser"
|
|
| "channels"
|
|
| "apps"
|
|
| "automations"
|
|
| "memory"
|
|
| "skills"
|
|
| "runtime"
|
|
| "advanced";
|
|
|
|
export function isCapabilitySection(section: SettingsSectionKey): boolean {
|
|
return ["capabilities", "image", "voice", "browser", "memory"].includes(section);
|
|
}
|
|
|
|
type PendingRestartSection = "runtime" | "browser" | "image";
|
|
export type PendingRestartSections = Record<PendingRestartSection, boolean>;
|
|
|
|
export type RestartAwarePayload = {
|
|
requires_restart?: boolean;
|
|
surface?: SettingsPayload["surface"];
|
|
runtime_surface?: SettingsPayload["runtime_surface"];
|
|
runtime_capabilities?: SettingsPayload["runtime_capabilities"];
|
|
};
|
|
|
|
export type ApplySettingsPayload = (
|
|
payload: SettingsPayload,
|
|
options?: { preserveAgentForm?: boolean; preserveCapabilityForms?: boolean },
|
|
) => void;
|
|
|
|
export type MaybeRestartHostEngine = (payload: RestartAwarePayload) => Promise<void>;
|