mirror of
https://github.com/wiseguru/ReWrite-Voice-Notes.git
synced 2026-07-22 07:49:19 +00:00
This session's features: - Quick Record mode selector: third button on the floater opens a popover of templates, switchable mid-recording. Updates the controller's template in place; does not touch lastUsedTemplateId until completion. - Per-invocation destination override on the main modal: a Destination row under the template picker overrides insertMode and the new-file fields for one run, plumbed via PipelineParams.destinationOverride and shallow-merged onto a template copy before insertOutput. The template file on disk is never mutated. - Assistant prompt as a vault file: replaces the settings textarea with ReWrite/AssistantPrompt.md, loaded via src/assistant-prompt.ts and cached on plugin.assistantPrompt. AI/Agent labels standardized to "Assistant"; aiName -> assistantName; adHocInstructionsPrompt field removed. - Known Nouns list: ReWrite/KnownNouns.md with YAML guidance frontmatter and a Markdown body of nouns (optional misheard alternates after a colon). buildKnownNounsSystemPromptSection injects a "Known nouns" block into the LLM system prompt only when the list is non-empty. Frontmatter is for humans and is not sent to the LLM in v1. Cross-cutting: PipelineParams gains host: PipelineHost (narrow interface in src/types.ts) so the pipeline can read assistantPrompt and knownNouns without importing ReWritePlugin and forming a cycle. Pre-existing uncommitted work also rolled in: - Passphrase encryption for secrets.json.nosync via AES-GCM + PBKDF2 (src/secrets.ts), with PassphraseModal and a settings-tab banner/dropdown for mode selection. - WhisperHost adopt/external states + PID sidecar so an orphaned whisper-server from a previous session is adopted, and external ones are never killed by ReWrite (src/whisper-host.ts). - Whisper status bar (src/ui/whisper-status-bar.ts) and start/stop commands. - Audio persistence before transcription (src/audio-persist.ts) plus the reprocess-audio flow (src/ui/audio-source.ts, src/ui/audio-file-picker.ts). - Wake-name extraction (src/wake-name.ts). - Templates as vault Markdown files in a folder (src/templates-folder.ts). - Linux build script for whisper-server (scripts/build-whisper-linux.sh). - README, CLAUDE.md, docs/FEATURES.md, eslint.config.mts updates covering all of the above. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
92 lines
2.7 KiB
TypeScript
92 lines
2.7 KiB
TypeScript
import tseslint from 'typescript-eslint';
|
|
import obsidianmd from "eslint-plugin-obsidianmd";
|
|
import globals from "globals";
|
|
import { globalIgnores } from "eslint/config";
|
|
|
|
// Mirror the plugin's DEFAULT_BRANDS / DEFAULT_ACRONYMS (the rule replaces the
|
|
// defaults when options are passed, so we have to provide the full lists) plus
|
|
// the extras this project needs: provider names, "Web Speech", "ReWrite", "LLM".
|
|
const DEFAULT_BRANDS = [
|
|
"iOS", "iPadOS", "macOS", "Windows", "Android", "Linux",
|
|
"Obsidian", "Obsidian Sync", "Obsidian Publish",
|
|
"Google Drive", "Dropbox", "OneDrive", "iCloud Drive",
|
|
"YouTube", "Slack", "Discord", "Telegram", "WhatsApp", "Twitter", "X",
|
|
"Readwise", "Zotero",
|
|
"Excalidraw", "Mermaid",
|
|
"Markdown", "LaTeX", "JavaScript", "TypeScript", "Node.js",
|
|
"npm", "pnpm", "Yarn", "Git", "GitHub",
|
|
"GitLab", "Notion", "Evernote", "Roam Research", "Logseq", "Anki", "Reddit",
|
|
"VS Code", "Visual Studio Code", "IntelliJ IDEA", "WebStorm", "PyCharm",
|
|
];
|
|
|
|
const DEFAULT_ACRONYMS = [
|
|
"API", "HTTP", "HTTPS", "URL", "DNS", "TCP", "IP", "SSH", "TLS", "SSL", "FTP", "SFTP", "SMTP",
|
|
"JSON", "XML", "HTML", "CSS", "PDF", "CSV", "YAML", "SQL", "PNG", "JPG", "JPEG", "GIF", "SVG",
|
|
"2FA", "MFA", "OAuth", "JWT", "LDAP", "SAML",
|
|
"SDK", "IDE", "CLI", "GUI", "CRUD", "REST", "SOAP",
|
|
"CPU", "GPU", "RAM", "SSD", "USB",
|
|
"UI", "OK",
|
|
"RSS", "S3", "WebDAV",
|
|
"ID",
|
|
"UUID", "GUID", "SHA", "MD5", "ASCII", "UTF-8", "UTF-16", "DOM", "CDN", "FAQ", "AI", "ML",
|
|
];
|
|
|
|
const REWRITE_BRANDS = [
|
|
"ReWrite",
|
|
"Web Speech",
|
|
"OpenAI", "Whisper",
|
|
"Anthropic", "Claude",
|
|
"Google Gemini", "Gemini",
|
|
"Groq", "Mistral",
|
|
"Ollama", "LM Studio",
|
|
"AssemblyAI", "Deepgram", "Rev.ai",
|
|
"whisper.cpp", "whisper-server", "faster-whisper-server",
|
|
];
|
|
|
|
const REWRITE_ACRONYMS = [
|
|
"LLM", "STT", "TTS",
|
|
"OS", "PBKDF2", "AES", "GCM", "KDF",
|
|
];
|
|
|
|
const sentenceCaseOptions = {
|
|
brands: [...DEFAULT_BRANDS, ...REWRITE_BRANDS],
|
|
acronyms: [...DEFAULT_ACRONYMS, ...REWRITE_ACRONYMS],
|
|
};
|
|
|
|
export default tseslint.config(
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
},
|
|
parserOptions: {
|
|
projectService: {
|
|
allowDefaultProject: [
|
|
'eslint.config.js',
|
|
'manifest.json'
|
|
]
|
|
},
|
|
tsconfigRootDir: import.meta.dirname,
|
|
extraFileExtensions: ['.json']
|
|
},
|
|
},
|
|
},
|
|
...obsidianmd.configs.recommended,
|
|
{
|
|
plugins: { obsidianmd },
|
|
rules: {
|
|
'obsidianmd/ui/sentence-case': ['error', sentenceCaseOptions],
|
|
'obsidianmd/ui/sentence-case-json': ['error', sentenceCaseOptions],
|
|
'obsidianmd/ui/sentence-case-locale-module': ['error', sentenceCaseOptions],
|
|
},
|
|
},
|
|
globalIgnores([
|
|
"node_modules",
|
|
"dist",
|
|
"esbuild.config.mjs",
|
|
"eslint.config.js",
|
|
"version-bump.mjs",
|
|
"versions.json",
|
|
"main.js",
|
|
]),
|
|
);
|