增加语音对话功能

This commit is contained in:
yhy
2026-08-29 22:13:55 +08:00
parent 1ffa069151
commit 3a2438f566
51 changed files with 6207 additions and 3 deletions
+31
View File
@@ -23,10 +23,13 @@ declare const Zotero_Tabs: {
declare const PathUtils: {
join: (...parts: string[]) => string;
parent: (path: string) => string;
tempDir: string;
};
declare const IOUtils: {
exists: (path: string) => Promise<boolean>;
read: (path: string) => Promise<Uint8Array>;
readUTF8: (path: string) => Promise<string>;
writeUTF8: (path: string, data: string) => Promise<void>;
remove: (path: string) => Promise<void>;
@@ -34,4 +37,32 @@ declare const IOUtils: {
path: string,
options?: { createAncestors?: boolean; ignoreExisting?: boolean },
) => Promise<void>;
stat: (path: string) => Promise<{ size: number }>;
};
declare const Services: {
appinfo: {
OS: string;
};
};
declare const Components: {
classes: Record<string, { createInstance: (iface: unknown) => unknown }>;
interfaces: { nsIProcess: unknown };
utils: {
isDeadWrapper: (obj: unknown) => boolean;
};
};
interface MozNsIFile {
exists: () => boolean;
isExecutable?: () => boolean;
}
interface MozNsIProcess {
init: (file: MozNsIFile) => void;
run: (blocking: boolean, args: string[], count: number) => void;
runw: (blocking: boolean, args: string[], count: number) => void;
exitValue: number;
startHidden: boolean;
}
+39
View File
@@ -34,9 +34,41 @@ export type FluentMessageId =
| 'cite-style'
| 'item-section-chat-head'
| 'item-section-chat-sidenav'
| 'item-section-lecture-head'
| 'item-section-lecture-sidenav'
| 'itemmenu-chat'
| 'itemmenu-compare'
| 'itemmenu-label'
| 'lecture-attach-error'
| 'lecture-beat-list-title'
| 'lecture-beat-tts-failed'
| 'lecture-beat-tts-pending'
| 'lecture-empty-desc'
| 'lecture-empty-title'
| 'lecture-loading'
| 'lecture-mode-label'
| 'lecture-mount-error'
| 'lecture-no-pdf'
| 'lecture-platform-hint-mac'
| 'lecture-platform-hint-other'
| 'lecture-platform-hint-win'
| 'lecture-play-complete'
| 'lecture-play-next'
| 'lecture-play-pause'
| 'lecture-play-prev'
| 'lecture-play-start'
| 'lecture-reprepare'
| 'lecture-start'
| 'lecture-status-failed'
| 'lecture-status-idle'
| 'lecture-status-preparing'
| 'lecture-status-ready'
| 'lecture-status-ready-phase1'
| 'lecture-status-ready-step1'
| 'lecture-tts-provider'
| 'lecture-tts-test'
| 'lecture-tts-test-done'
| 'lecture-tts-testing'
| 'multi-add-none'
| 'multi-add-paper'
| 'multi-close'
@@ -65,16 +97,20 @@ export type FluentMessageId =
| 'prefs-hint-openrouter'
| 'prefs-max-context'
| 'prefs-max-tokens'
| 'prefs-mineru-path'
| 'prefs-model'
| 'prefs-models-empty'
| 'prefs-models-pick'
| 'prefs-openrouter-referer'
| 'prefs-openrouter-title'
| 'prefs-piper-model'
| 'prefs-piper-path'
| 'prefs-privacy'
| 'prefs-provider'
| 'prefs-refresh-models'
| 'prefs-reset'
| 'prefs-section-generation'
| 'prefs-section-lecture'
| 'prefs-section-openrouter'
| 'prefs-section-prompts'
| 'prefs-section-provider'
@@ -84,5 +120,8 @@ export type FluentMessageId =
| 'prefs-temperature'
| 'prefs-timeout'
| 'prefs-title'
| 'prefs-tts-hint-empty'
| 'prefs-tts-provider'
| 'prefs-tts-voice'
| 'startup-begin'
| 'startup-finish';
+7
View File
@@ -22,6 +22,13 @@ declare namespace _ZoteroTypes {
"summaryPrompt": string;
"sendMetadata": boolean;
"verboseLog": boolean;
"ttsProvider": string;
"ttsApiKey": string;
"ttsVoice": string;
"lectureTeacherStyle": string;
"mineruPath": string;
"piperPath": string;
"piperModelPath": string;
};
}
}