feat: add notification

This commit is contained in:
Henry Li
2026-01-31 11:08:27 +08:00
parent cb660c2643
commit 47fe2f8195
18 changed files with 482 additions and 56 deletions

View File

@@ -1,6 +1,9 @@
import type { AgentThreadContext } from "../threads";
export const DEFAULT_LOCAL_SETTINGS: LocalSettings = {
notification: {
enabled: true,
},
context: {
model_name: undefined,
mode: undefined,
@@ -13,6 +16,9 @@ export const DEFAULT_LOCAL_SETTINGS: LocalSettings = {
const LOCAL_SETTINGS_KEY = "deerflow.local-settings";
export interface LocalSettings {
notification: {
enabled: boolean;
};
context: Omit<
AgentThreadContext,
"thread_id" | "is_plan_mode" | "thinking_enabled"
@@ -42,6 +48,10 @@ export function getLocalSettings(): LocalSettings {
...DEFAULT_LOCAL_SETTINGS.layout,
...settings.layout,
},
notification: {
...DEFAULT_LOCAL_SETTINGS.notification,
...settings.notification,
},
};
return mergedSettings;
}