release: витрина на трёх языках, уборка прибором, плашка слушается кнопок

This commit is contained in:
public-repo-gate
2026-09-07 00:51:22 +03:00
parent 48771cf1a8
commit e9ac41fe61
87 changed files with 99435 additions and 397 deletions
+1
View File
@@ -6,6 +6,7 @@
"repo": "zarubinvibe/iriz-checkpoints" "repo": "zarubinvibe/iriz-checkpoints"
} }
}, },
"telemetry": false,
"checkpoints": { "checkpoints": {
"primary": { "primary": {
"type": "git-refs" "type": "git-refs"
+9 -9
View File
@@ -16,11 +16,11 @@
"name": "iriz", "name": "iriz",
"tagline": "Speak out loud and the text appears. Your Mac does the decoding, and nothing travels to somebody else's cloud.", "tagline": "Speak out loud and the text appears. Your Mac does the decoding, and nothing travels to somebody else's cloud.",
"hero_alt": "Iris in white marble with marble wings beside the classical column, a gold ribbon of voice landing in the groove of her tablet", "hero_alt": "Iris in white marble with marble wings beside the classical column, a gold ribbon of voice landing in the groove of her tablet",
"what": "This is a Mac app that types for you while you talk.\n\nHere is how it goes. You press one key, speak in your normal voice, press it again. The text lands where the cursor was: an email, a chat, a search box. Nothing to switch to, no window to open.\n\nWhat sets it apart from similar apps is where the speech gets decoded. Usually your voice travels to somebody's server, turns into text there and comes back. Here your own Mac does the work, and the audio never leaves the machine.\n\n![The main window: what you said, and the settings](docs/assets/screens/page-history.png)\n\nIt does more than that. It repairs a phrase typed in the wrong keyboard layout. Fix a word after it lands and the app offers to remember the correction. It takes the stumbles and repeats out of speech. It splits a recording of a meeting or a court hearing by voice and puts a finished transcript next to the audio.\n\n![Meetings: drop a recording, the transcript lands beside it](docs/assets/screens/page-meetings.png)", "what": "This is a Mac app that types for you while you talk.\n\nHere is how it goes. You press one key, speak in your normal voice, press it again. The text lands where the cursor was: in an email, in a chat, in a search field. Nothing to switch to, no separate window.\n\nWhat sets it apart from similar apps is where the speech is decoded. Usually your voice travels to somebody's server, turns into text there and comes back. Here your Mac does the work, and the audio never leaves the machine.\n\n**Why «iriz».** Iris was the messenger of the Greek gods and the rainbow — a bridge between the sky and the ground. She does not invent the message, she carries it whole. The app does exactly that: it takes what you said and moves it into text, adding nothing of its own.\n\n![The menu bar: status, modes, dictation, meetings, history](docs/assets/shots/menu-en.png)\n\nIt does more. It fixes a phrase typed in the wrong keyboard layout. Correct a word after pasting and the app offers to remember the replacement. It strips hesitations and repetitions. It splits a meeting or a court hearing recording by voice and puts the minutes next to the audio.\n\n![Meetings: drop the recording, the minutes land next to it](docs/assets/screens/page-meetings.png)",
"why": "Anyone who writes for a living loses hours to typing. The same thought comes out faster and whole when spoken: typing, you hunt for words; speaking, you do not.\n\nOne thing gets in the way. Cloud dictation cleans speech better than anything local, but what you said leaves the machine: a client call, a draft, names and figures. For a doctor, a lawyer, a therapist, that trade never pays off.\n\nSo here your Mac does the decoding, and the app reaches the network only when you press the button.", "why": "Anyone who writes for a living loses hours to typing. The same thought comes out faster and whole when spoken: typing, you hunt for words; speaking, you do not.\n\nOne thing gets in the way. Cloud dictation cleans speech better than anything local, but what you said leaves the machine: a client call, a draft, names and figures. For a doctor, a lawyer, a therapist, that trade never pays off.\n\nSo here your Mac does the decoding, and the app reaches the network only when you press the button.",
"advantage": "your Mac decodes the speech, and during dictation the network is closed by a switch in the code rather than a promise in the text.", "advantage": "your Mac decodes the speech, and during dictation the network is closed by a switch in the code rather than a promise in the text.",
"better": "The switch sits inside the recognition library and returns to its place even when a download fails. Documentation does not prove that: a script pins the set of networking symbols in the built binary and asks the kernel whether the running app holds a single socket.", "better": "The switch sits inside the recognition library and returns to its place even when a download fails. Documentation does not prove that: a script pins the set of networking symbols in the built binary and asks the kernel whether the running app holds a single socket.",
"how": "Press the key, say your sentence, press again. The text lands where the cursor was blinking.\n\nIf it could not be pasted, nothing is lost: the small pill at the bottom of the screen opens into a panel and you take the text from there.\n\nThe language switches on the pill itself, with a right click. People change it a second before they speak, and walking to Settings for that makes no sense.\n\n![Dictation settings: where speech gets cleaned](docs/assets/screens/page-dictation.png)", "how": "Press the key, say your sentence, press again. The text lands where the cursor was blinking.\n\nA glass drop sits at the bottom of the screen the whole time. While you are silent it stays small. Start talking and a wave runs inside it: that is the answer to «can it hear me».\n\n![The plate while recording: a wave inside the glass](docs/assets/shots/plate-listening-light.png)\n\nPoint at it with the mouse and the drop opens into a row of buttons: record, prompt, translate, language, history, settings. The language switches right there, a second before you speak — no need to walk to the settings for it.\n\n![The plate under the pointer: a row of six buttons](docs/assets/shots/plate-hover-light.png)\n\nIf pasting did not work, nothing is lost: the same plate opens into a panel and you take the text from there.\n\n![Dictation settings: where the speech gets cleaned](docs/assets/screens/page-dictation.png)",
"quick_intro": "You need a Mac on macOS 14 or newer. Building from source also wants Xcode with Swift 6. Three doors from here, any of them works.", "quick_intro": "You need a Mac on macOS 14 or newer. Building from source also wants Xcode with Swift 6. Three doors from here, any of them works.",
"quick_extra": "Do not want to build? Take the ready disk image from Releases: open it, drag the icon onto Applications. No Git? Download [the ZIP](https://github.com/zarubinvibe/iriz/archive/refs/heads/main.zip), unpack it, and run the same command inside. First time? Open the project in Claude Code and run `/iriz-setup`: the install goes as a conversation, one question at a time, and nothing is installed without your yes.", "quick_extra": "Do not want to build? Take the ready disk image from Releases: open it, drag the icon onto Applications. No Git? Download [the ZIP](https://github.com/zarubinvibe/iriz/archive/refs/heads/main.zip), unpack it, and run the same command inside. First time? Open the project in Claude Code and run `/iriz-setup`: the install goes as a conversation, one question at a time, and nothing is installed without your yes.",
"quick_result": "the installer says what this is, looks at what your machine is missing, runs the tree selfcheck, and names the next step. It installs nothing until you ask.", "quick_result": "the installer says what this is, looks at what your machine is missing, runs the tree selfcheck, and names the next step. It installs nothing until you ask.",
@@ -100,7 +100,7 @@
"No notarization yet: a downloaded build opens through a right-click the first time.", "No notarization yet: a downloaded build opens through a right-click the first time.",
"The universal binary carries an Intel slice, but the author owns no Intel Mac and never verified it there." "The universal binary carries an Intel slice, but the author owns no Intel Mac and never verified it there."
], ],
"docs": "Deeper: [the step-by-step walkthrough](docs/ONBOARDING.md), [how to help](CONTRIBUTING.md), dependency licenses in [THIRD-PARTY](THIRD-PARTY).", "docs": "Deeper: [the step-by-step walkthrough with a frame of every surface](docs/ONBOARDING.md), [how to help](CONTRIBUTING.md), [security](SECURITY.md).",
"license": "MIT. See [LICENSE](LICENSE).", "license": "MIT. See [LICENSE](LICENSE).",
"welcome": "Hello. I am a lawyer who vibe-codes, and I type a great deal. I type fast, and it still eats so much of the day that by evening half of it turns out to have been typing.\n\nAfter trying a few tools I noticed something simple: I say things more precisely than I type them. Typing, I hunt for words. Speaking, I do not, the thought comes out whole, and the model on the other end understands me better. One thing stood in the way, privacy. So the line is drawn here: whatever has to stay mine is decoded on my own machine, and the only thing that leaves it is what I sent out myself, a translation or a task built from what I said.\n\nAnd the small thing this all started from: I forget to switch the language and type a sentence in the wrong layout. Here that repairs itself.", "welcome": "Hello. I am a lawyer who vibe-codes, and I type a great deal. I type fast, and it still eats so much of the day that by evening half of it turns out to have been typing.\n\nAfter trying a few tools I noticed something simple: I say things more precisely than I type them. Typing, I hunt for words. Speaking, I do not, the thought comes out whole, and the model on the other end understands me better. One thing stood in the way, privacy. So the line is drawn here: whatever has to stay mine is decoded on my own machine, and the only thing that leaves it is what I sent out myself, a translation or a task built from what I said.\n\nAnd the small thing this all started from: I forget to switch the language and type a sentence in the wrong layout. Here that repairs itself.",
"compare_header": [ "compare_header": [
@@ -117,11 +117,11 @@
"name": "iriz", "name": "iriz",
"tagline": "Говорите вслух, на экране появляется текст. Разбирает речь сам Мак, ничего не улетает в чужое облако.", "tagline": "Говорите вслух, на экране появляется текст. Разбирает речь сам Мак, ничего не улетает в чужое облако.",
"hero_alt": "Ирида из белого мрамора с мраморными крыльями у классической колонны, золотая лента голоса ложится в борозду на табличке", "hero_alt": "Ирида из белого мрамора с мраморными крыльями у классической колонны, золотая лента голоса ложится в борозду на табличке",
"what": "Это программа для Мака, которая печатает за вас, пока вы говорите.\n\nРаботает так. Вы нажимаете одну клавишу, говорите обычным голосом, нажимаете еще раз. Текст встает туда, где стоял курсор: в письмо, в чат, в поле поиска. Никуда переключаться не нужно, отдельного окна нет.\n\nГлавное отличие от похожих программ в том, где разбирается речь. Обычно голос уезжает на чужой сервер, там превращается в текст и возвращается. Здесь считает ваш Мак, и звук с машины не уходит.\n\n![Главное окно: история сказанного и настройки](docs/assets/screens/page-history.png)\n\nУмеет и другое. Чинит фразу, набранную не в той раскладке. Поправите слово после вставки, и программа предложит запомнить замену. Уберет из речи запинки и повторы. Разберет запись встречи или судебного заседания по голосам, а рядом со звуком положит готовый протокол.\n\n![Встречи: перенесите запись, рядом ляжет протокол](docs/assets/screens/page-meetings.png)", "what": "Это программа для Мака, которая печатает за вас, пока вы говорите.\n\nРаботает так. Вы нажимаете одну клавишу, говорите обычным голосом, нажимаете еще раз. Текст встает туда, где стоял курсор: в письмо, в чат, в поле поиска. Никуда переключаться не нужно, отдельного окна нет.\n\nГлавное отличие от похожих программ в том, где разбирается речь. Обычно голос уезжает на чужой сервер, там превращается в текст и возвращается. Здесь считает ваш Мак, и звук с машины не уходит.\n\n**Почему «iriz».** Ирида у греков — вестница богов и радуга, мост между небом и землей. Она не сочиняет послание, а доносит его целым. Программа делает ровно это: берет сказанное и переносит в текст, ничего не добавляя от себя.\n\n![Меню в строке меню: состояние, режимы, диктовка, встречи, история](docs/assets/shots/menu-ru.png)\n\nУмеет и другое. Чинит фразу, набранную не в той раскладке. Поправите слово после вставки, и программа предложит запомнить замену. Уберет из речи запинки и повторы. Разберет запись встречи или судебного заседания по голосам, а рядом со звуком положит готовый протокол.\n\n![Встречи: перенесите запись, рядом ляжет протокол](docs/assets/screens/page-meetings.png)",
"why": "Кто много пишет по работе, тратит на набор часы. Голосом та же мысль выходит быстрее и целее: печатая, человек подбирает слова, говоря, не подбирает.\n\nМешает одно. Облачная диктовка чистит речь лучше любой местной, но наружу уезжает то, что вы сказали: разговор с клиентом, черновик документа, имена и суммы. Для врача, юриста, психолога такой обмен не окупается ничем.\n\nПоэтому тут разбирает Мак, а в сеть программа ходит только по вашей кнопке.", "why": "Кто много пишет по работе, тратит на набор часы. Голосом та же мысль выходит быстрее и целее: печатая, человек подбирает слова, говоря, не подбирает.\n\nМешает одно. Облачная диктовка чистит речь лучше любой местной, но наружу уезжает то, что вы сказали: разговор с клиентом, черновик документа, имена и суммы. Для врача, юриста, психолога такой обмен не окупается ничем.\n\nПоэтому тут разбирает Мак, а в сеть программа ходит только по вашей кнопке.",
"advantage": "речь разбирает ваш Мак, и во время диктовки сеть закрыта рубильником в коде, а не обещанием в тексте.", "advantage": "речь разбирает ваш Мак, и во время диктовки сеть закрыта рубильником в коде, а не обещанием в тексте.",
"better": "Рубильник стоит внутри библиотеки распознавания и возвращается на место даже когда загрузка падает. Проверяет это не документация: скрипт пинует набор сетевых символов в собранном бинарнике и спрашивает у ядра, есть ли у работающего приложения хоть один сокет.", "better": "Рубильник стоит внутри библиотеки распознавания и возвращается на место даже когда загрузка падает. Проверяет это не документация: скрипт пинует набор сетевых символов в собранном бинарнике и спрашивает у ядра, есть ли у работающего приложения хоть один сокет.",
"how": "Нажали клавишу, сказали фразу, нажали еще раз. Текст встает туда, где мигал курсор.\n\nЕсли вставить не удалось, ничего не потеряно: маленькая плашка внизу экрана раскроется в панель, и текст можно забрать оттуда.\n\nЯзык переключается на самой плашке, правым щелчком. Его меняют за секунду до того, как заговорить, и ходить за этим в настройки незачем.\n\n![Настройки диктовки: где чистится речь](docs/assets/screens/page-dictation.png)", "how": "Нажали клавишу, сказали фразу, нажали еще раз. Текст встает туда, где мигал курсор.\n\nВнизу экрана все это время висит стеклянная капля. Пока вы молчите, она маленькая. Заговорили — внутри бежит волна: это и есть ответ на вопрос «слышит ли меня».\n\n![Плашка на записи: волна внутри стекла](docs/assets/shots/plate-listening-light.png)\n\nНаведите на нее мышь — капля раскроется в ряд кнопок: запись, промпт, перевод, язык, история, настройки. Язык переключается здесь же, за секунду до того, как заговорить, и ходить за этим в настройки незачем.\n\n![Плашка под мышью: ряд из шести кнопок](docs/assets/shots/plate-hover-light.png)\n\nЕсли вставить не удалось, ничего не потеряно: та же плашка раскроется в панель, и текст можно забрать оттуда.\n\n![Настройки диктовки: где чистится речь](docs/assets/screens/page-dictation.png)",
"quick_intro": "Нужен Мак на macOS 14 или новее. Для сборки из исходников еще Xcode со Swift 6. Дверей три, годится любая.", "quick_intro": "Нужен Мак на macOS 14 или новее. Для сборки из исходников еще Xcode со Swift 6. Дверей три, годится любая.",
"quick_extra": "Не хотите собирать - возьмите готовый образ в разделе Releases: открыли, перетащили значок в Applications. Нет Git? Скачайте [ZIP](https://github.com/zarubinvibe/iriz/archive/refs/heads/main.zip), распакуйте и запустите в нем ту же команду. Первый раз? Откройте проект в Claude Code и запустите `/iriz-setup`: установка пройдет разговором, по одному вопросу, и ничего не поставится без вашего «да».", "quick_extra": "Не хотите собирать - возьмите готовый образ в разделе Releases: открыли, перетащили значок в Applications. Нет Git? Скачайте [ZIP](https://github.com/zarubinvibe/iriz/archive/refs/heads/main.zip), распакуйте и запустите в нем ту же команду. Первый раз? Откройте проект в Claude Code и запустите `/iriz-setup`: установка пройдет разговором, по одному вопросу, и ничего не поставится без вашего «да».",
"quick_result": "установщик объясняет, что это, смотрит, чего не хватает на машине, гоняет самопроверку дерева и называет следующий шаг. Ничего не ставит, пока вы не попросите.", "quick_result": "установщик объясняет, что это, смотрит, чего не хватает на машине, гоняет самопроверку дерева и называет следующий шаг. Ничего не ставит, пока вы не попросите.",
@@ -201,7 +201,7 @@
"Нотаризации пока нет: первый запуск скачанной сборки открывается правым щелчком.", "Нотаризации пока нет: первый запуск скачанной сборки открывается правым щелчком.",
"Универсальный бинарник содержит срез под Intel, но живого Intel-Мака у автора нет, и проверено это не было." "Универсальный бинарник содержит срез под Intel, но живого Intel-Мака у автора нет, и проверено это не было."
], ],
"docs": "Глубже: [пошаговое знакомство](docs/ONBOARDING.ru.md), [как помочь](CONTRIBUTING.ru.md), лицензии зависимостей в [THIRD-PARTY](THIRD-PARTY).", "docs": "Глубже: [пошаговое знакомство с кадрами каждой поверхности](docs/ONBOARDING.ru.md), [как помочь](CONTRIBUTING.ru.md), [безопасность](SECURITY.ru.md).",
"license": "MIT. Текст в файле [LICENSE](LICENSE).", "license": "MIT. Текст в файле [LICENSE](LICENSE).",
"welcome": "Привет. Я юрист и вайб-кодер, и печатаю я очень много. Печатаю быстро, но времени это все равно съедает столько, что к вечеру половина дня оказывается набором текста.\n\nПопробовав несколько инструментов, я понял простую вещь: голосом я говорю точнее, чем печатаю. Когда печатаю, я подбираю слова. Когда говорю, не подбираю, и мысль выходит целой, а модель на том конце понимает меня лучше. Мешала одна вещь - приватность. Поэтому здесь она разведена по границе: то, что должно остаться моим, разбирается только на моей машине, а наружу уходит лишь то, что я сам туда отправил, вроде перевода или сборки задания.\n\nИ мелочь, из которой все начиналось: я забываю переключить язык и набираю фразу не в той раскладке. Тут это чинится само.", "welcome": "Привет. Я юрист и вайб-кодер, и печатаю я очень много. Печатаю быстро, но времени это все равно съедает столько, что к вечеру половина дня оказывается набором текста.\n\nПопробовав несколько инструментов, я понял простую вещь: голосом я говорю точнее, чем печатаю. Когда печатаю, я подбираю слова. Когда говорю, не подбираю, и мысль выходит целой, а модель на том конце понимает меня лучше. Мешала одна вещь - приватность. Поэтому здесь она разведена по границе: то, что должно остаться моим, разбирается только на моей машине, а наружу уходит лишь то, что я сам туда отправил, вроде перевода или сборки задания.\n\nИ мелочь, из которой все начиналось: я забываю переключить язык и набираю фразу не в той раскладке. Тут это чинится само.",
"compare_header": [ "compare_header": [
@@ -218,11 +218,11 @@
"name": "iriz", "name": "iriz",
"tagline": "你说出来,屏幕上就有字。识别由你自己的 Mac 完成,声音不会上传到别人的云。", "tagline": "你说出来,屏幕上就有字。识别由你自己的 Mac 完成,声音不会上传到别人的云。",
"hero_alt": "白色大理石的伊里斯长着大理石翅膀,站在古典石柱旁,金色的声音丝带落进石板上的凹槽里", "hero_alt": "白色大理石的伊里斯长着大理石翅膀,站在古典石柱旁,金色的声音丝带落进石板上的凹槽里",
"what": "这是一个 Mac 上的小程序:你说话,它替你打字。\n\n用法是这样。按一下键,用平常的语气说话,再按一下。文字落在光标原来的位置:邮件里、聊天窗口里、搜索框里。不用切换到别的地方,也没有额外的窗口。\n\n它和同类程序最大的区别,在于识别发生在哪里。通常你的声音要传到别人的服务器,在那边变成文字再传回来。这里由你自己的 Mac 计算,声音不离开这台机器。\n\n![主窗口:你说过的话,以及设置](docs/assets/screens/page-history.png)\n\n它还会别的。输入法切错了,它把那句话改回来。文字落下后你改了一个词,它会问要不要记住。口语里的停顿和重复,它替你清掉。会议或者庭审的录音,它按发言人分开,并把整理好的记录放在录音旁边。\n\n![会议:把录音拖进来,记录就在旁边](docs/assets/screens/page-meetings.png)", "what": "这是一个 Mac 应用:你说话,它替你打字。\n\n用起来是这样。按一下键,用平常的声音说话,再按一下。文字会落在光标原来的位置:邮件里、聊天里、搜索框里。不用切换到别的地方,也没有单独的窗口。\n\n和同类应用最大的区别在于语音在哪里被解码。通常你的声音会被送到别人的服务器,在那里变成文字再回来。这里是你的 Mac 在计算,声音不会离开这台机器。\n\n**为什么叫「iriz」。** 伊里斯是希腊神话里众神的信使,也是彩虹——连接天与地的桥。她不编造消息,只把它完整地带到。这个应用做的正是这件事:把你说的话原样搬进文字,不添加自己的东西。\n\n![菜单栏:状态、模式、口述、会议、历史](docs/assets/shots/menu-zh.png)\n\n它还会别的。它能修好用错键盘布局打出来的句子。粘贴之后你改了一个词,它会问要不要记住这个替换。它会去掉话里的停顿和重复。它能把会议或庭审录音按说话人分开,并在音频旁边放上写好的纪要。\n\n![会议:把录音拖进来,纪要会放在旁边](docs/assets/screens/page-meetings.png)",
"why": "靠写字吃饭的人,每天都有几个小时花在打字上。同一个想法,说出来更快也更完整:打字时人在挑词,说话时不挑。\n\n只有一件事挡在前面。云端听写把口语整理得比任何本地方案都干净,可你说的内容也随之离开了这台机器:和客户的通话、文件草稿、人名和金额。对医生、律师、心理咨询师来说,这笔交换怎么算都不划算。\n\n所以这里由你的 Mac 来识别,只有你按下按钮时,程序才会联网。", "why": "靠写字吃饭的人,每天都有几个小时花在打字上。同一个想法,说出来更快也更完整:打字时人在挑词,说话时不挑。\n\n只有一件事挡在前面。云端听写把口语整理得比任何本地方案都干净,可你说的内容也随之离开了这台机器:和客户的通话、文件草稿、人名和金额。对医生、律师、心理咨询师来说,这笔交换怎么算都不划算。\n\n所以这里由你的 Mac 来识别,只有你按下按钮时,程序才会联网。",
"advantage": "识别在你自己的 Mac 上完成,口述期间网络由代码里的开关关闭,而不是靠文字承诺。", "advantage": "识别在你自己的 Mac 上完成,口述期间网络由代码里的开关关闭,而不是靠文字承诺。",
"better": "开关叫 `DownloadUtils.enforceOffline`,位置在识别库内部,连下载失败的时候也会自己归位。光有文档不算数:自检脚本盯住编译好的二进制里那一组网络符号,再去问系统,运行中的应用手上有没有一个套接字。", "better": "开关叫 `DownloadUtils.enforceOffline`,位置在识别库内部,连下载失败的时候也会自己归位。光有文档不算数:自检脚本盯住编译好的二进制里那一组网络符号,再去问系统,运行中的应用手上有没有一个套接字。",
"how": "按键,说一句话,再按一次。文字落在光标刚才闪动的地方。\n\n万一没能贴进去,东西也没丢:屏幕下方那颗小胶囊会展开成面板,你从那里取走文字。\n\n识别语言直接在胶囊上右键切换。人总在开口前一秒才决定说哪种语言,为这个跑去设置没有道理。\n\n![口述设置:语音在哪里清理](docs/assets/screens/page-dictation.png)", "how": "按键,说一句话,再按一下。文字会落在光标闪烁的地方。\n\n这段时间里,屏幕下方一直有一颗玻璃水滴。你不说话时它很小。一开口,里面就有声波流动:这就是“它有没有听见我”的答案。\n\n![录音中的浮窗:玻璃里的声波](docs/assets/shots/plate-listening-light.png)\n\n把鼠标移上去,水滴会展开成一排按钮:录音、提示词、翻译、语言、历史、设置。语言就在这里切换,开口前一秒就能换,不用专门去设置里找。\n\n![鼠标下的浮窗:一排六个按钮](docs/assets/shots/plate-hover-light.png)\n\n如果没能粘贴上,什么也不会丢:同一个浮窗会展开成面板,文字从那里拿走。\n\n![口述设置:在哪里清理口语](docs/assets/screens/page-dictation.png)",
"quick_intro": "需要一台 macOS 14 或更新的 Mac,还有三项系统权限:麦克风、辅助功能、输入监控。从源码构建另外要 Xcode 和 Swift 6。接下来有三条路,走哪条都行。", "quick_intro": "需要一台 macOS 14 或更新的 Mac,还有三项系统权限:麦克风、辅助功能、输入监控。从源码构建另外要 Xcode 和 Swift 6。接下来有三条路,走哪条都行。",
"quick_extra": "不想构建?到 Releases 拿现成的磁盘映像:打开,把图标拖进 Applications。没有 Git?下载 [ZIP](https://github.com/zarubinvibe/iriz/archive/refs/heads/main.zip),解压后在里面执行同一条命令。第一次用?在 Claude Code 里打开项目并运行 `/iriz-setup`:安装以对话的方式进行,一次问一个问题,没有你点头不会装任何东西。", "quick_extra": "不想构建?到 Releases 拿现成的磁盘映像:打开,把图标拖进 Applications。没有 Git?下载 [ZIP](https://github.com/zarubinvibe/iriz/archive/refs/heads/main.zip),解压后在里面执行同一条命令。第一次用?在 Claude Code 里打开项目并运行 `/iriz-setup`:安装以对话的方式进行,一次问一个问题,没有你点头不会装任何东西。",
"quick_result": "安装脚本先说清楚这是什么,再看你的机器缺什么,跑一遍 `bash scripts/selfcheck.sh --selftest`,最后告诉你下一步该做什么。你不开口,它什么都不装。真要构建,加一个参数:`bash install.sh --build`。", "quick_result": "安装脚本先说清楚这是什么,再看你的机器缺什么,跑一遍 `bash scripts/selfcheck.sh --selftest`,最后告诉你下一步该做什么。你不开口,它什么都不装。真要构建,加一个参数:`bash install.sh --build`。",
@@ -304,7 +304,7 @@
"还没有做公证:下载来的构建第一次打开要用右键的“打开”。", "还没有做公证:下载来的构建第一次打开要用右键的“打开”。",
"通用二进制里带着 Intel 那一片,可是作者手上没有 Intel 的 Mac,从来没在上面验过。" "通用二进制里带着 Intel 那一片,可是作者手上没有 Intel 的 Mac,从来没在上面验过。"
], ],
"docs": "想看更深的:[一步一步的上手引导](docs/ONBOARDING.zh.md)、[怎么参与](CONTRIBUTING.zh.md),依赖的许可证在 [THIRD-PARTY](THIRD-PARTY)。", "docs": "更深入:[逐步上手,每个界面都有截图](docs/ONBOARDING.zh.md)、[如何参与](CONTRIBUTING.zh.md)、[安全](SECURITY.zh.md)。",
"license": "MIT。见 [LICENSE](LICENSE)。", "license": "MIT。见 [LICENSE](LICENSE)。",
"welcome": "你好。我是个律师,也写代码,而且打字打得很多。打得不算慢,可一天下来还是发现,半天时间都花在敲字上了。\n\n试过几个工具之后,我明白了一件很简单的事:我说出来的比敲出来的准。敲字的时候我在挑词;说话的时候不挑,念头是整的,另一头的模型也更明白我要什么。挡在中间的只有一件事,隐私。所以这里把界划清楚了:该留在我这儿的,只在我自己的机器上识别;出去的,只有我自己送出去的那部分,比如翻译,或者把我说的话整理成任务。\n\n还有最开始那件小事:我总忘了切输入语言,一句话敲成了另一套布局。在这儿它自己会改回来。", "welcome": "你好。我是个律师,也写代码,而且打字打得很多。打得不算慢,可一天下来还是发现,半天时间都花在敲字上了。\n\n试过几个工具之后,我明白了一件很简单的事:我说出来的比敲出来的准。敲字的时候我在挑词;说话的时候不挑,念头是整的,另一头的模型也更明白我要什么。挡在中间的只有一件事,隐私。所以这里把界划清楚了:该留在我这儿的,只在我自己的机器上识别;出去的,只有我自己送出去的那部分,比如翻译,或者把我说的话整理成任务。\n\n还有最开始那件小事:我总忘了切输入语言,一句话敲成了另一套布局。在这儿它自己会改回来。",
"compare_header": [ "compare_header": [
+59 -5
View File
@@ -72,7 +72,11 @@
"title_zh": "按下你的那个键", "title_zh": "按下你的那个键",
"diagram_en": "Key", "diagram_en": "Key",
"diagram_ru": "Клавиша", "diagram_ru": "Клавиша",
"diagram_zh": "按键" "diagram_zh": "按键",
"source_path": "docs/assets/pantheon/workflow/01-key.png",
"source_sha256": "3fbbe7ed08d6648403944f42d95fcbb649dab67f758becfcad161570721fee1c",
"published_path": "docs/assets/pantheon/workflow/01-key.png",
"published_sha256": "3fbbe7ed08d6648403944f42d95fcbb649dab67f758becfcad161570721fee1c"
}, },
{ {
"id": "voice", "id": "voice",
@@ -81,7 +85,11 @@
"title_zh": "说出来", "title_zh": "说出来",
"diagram_en": "Voice", "diagram_en": "Voice",
"diagram_ru": "Голос", "diagram_ru": "Голос",
"diagram_zh": "说话" "diagram_zh": "说话",
"source_path": "docs/assets/pantheon/workflow/02-voice.png",
"source_sha256": "b682dcd0b9ac73af0a865739abc757780e05071134087696e068bdff0ec0be5e",
"published_path": "docs/assets/pantheon/workflow/02-voice.png",
"published_sha256": "b682dcd0b9ac73af0a865739abc757780e05071134087696e068bdff0ec0be5e"
}, },
{ {
"id": "decode", "id": "decode",
@@ -90,7 +98,11 @@
"title_zh": "Mac 本机识别", "title_zh": "Mac 本机识别",
"diagram_en": "Decode", "diagram_en": "Decode",
"diagram_ru": "Разбор", "diagram_ru": "Разбор",
"diagram_zh": "识别" "diagram_zh": "识别",
"source_path": "docs/assets/pantheon/workflow/03-decode.png",
"source_sha256": "21164a8f7b84052f3d73b948df6712a7950a444e9b3eca0e25ab2002c1b39bcd",
"published_path": "docs/assets/pantheon/workflow/03-decode.png",
"published_sha256": "21164a8f7b84052f3d73b948df6712a7950a444e9b3eca0e25ab2002c1b39bcd"
}, },
{ {
"id": "insert", "id": "insert",
@@ -99,7 +111,11 @@
"title_zh": "文字落进输入框", "title_zh": "文字落进输入框",
"diagram_en": "Text", "diagram_en": "Text",
"diagram_ru": "Текст", "diagram_ru": "Текст",
"diagram_zh": "落字" "diagram_zh": "落字",
"source_path": "docs/assets/pantheon/workflow/04-insert.png",
"source_sha256": "6542096a504282a4478a8e79f1324d9fad9b2fc7a03e8990e2f8edebc14d1efc",
"published_path": "docs/assets/pantheon/workflow/04-insert.png",
"published_sha256": "6542096a504282a4478a8e79f1324d9fad9b2fc7a03e8990e2f8edebc14d1efc"
} }
], ],
"doc_frames": { "doc_frames": {
@@ -135,12 +151,50 @@
"assets/pantheon/doc-onboarding.png", "assets/pantheon/doc-onboarding.png",
"assets/pantheon/icon-wide.png" "assets/pantheon/icon-wide.png"
] ]
},
{
"path": "docs/ONBOARDING-CHAT.md",
"frames": [
"assets/pantheon/doc-onboarding.png"
]
},
{
"path": "docs/ONBOARDING-CHAT.ru.md",
"frames": [
"assets/pantheon/doc-onboarding.png"
]
},
{
"path": "docs/ONBOARDING-CHAT.zh.md",
"frames": [
"assets/pantheon/doc-onboarding.png"
]
},
{
"path": "SECURITY.md",
"frames": [
"docs/assets/pantheon/window-wash-source.png"
]
},
{
"path": "SECURITY.ru.md",
"frames": [
"docs/assets/pantheon/window-wash-source.png"
]
},
{
"path": "SECURITY.zh.md",
"frames": [
"docs/assets/pantheon/window-wash-source.png"
]
} }
] ]
}, },
"receipts": { "receipts": {
"generation_path": ".github/pantheon/generation-receipt.json", "generation_path": ".github/pantheon/generation-receipt.json",
"visual_judge_path": ".github/pantheon/visual-judge-receipt.json", "visual_judge_path": ".github/pantheon/visual-judge-receipt.json",
"prompt_path": ".github/pantheon/hero-source-prompt.txt" "prompt_path": ".github/pantheon/hero-source-prompt.txt",
"stage_generation_path": ".github/pantheon/stage-generation-receipt.json",
"stage_visual_judge_path": ".github/pantheon/stage-visual-judge-receipt.json"
} }
} }
@@ -0,0 +1,127 @@
{
"schema_version": 1,
"kind": "pantheon-generation",
"selection_mode": "managed-frontier",
"runtime": "codex",
"tool": "image_gen",
"route_id": "codex:image_gen:managed-frontier",
"model": {
"id": "provider-managed",
"revision": "provider-managed",
"tier": "frontier"
},
"quality": "highest",
"generation_id": "pantheon-stage-series-iris-2026-09-07",
"generated_at": "2026-09-06T21:22:17Z",
"prompt": {
"path": ".github/pantheon/workflow-01-key-prompt.txt",
"sha256": "5590fa1a041af5c34f6f0fd1fe187d06504a62429adfb325675452588251bd63"
},
"references": [
{
"role": "style-anchor",
"sha256": "ce524f9d22cb0092cb17aa280832e1b2ab2a77a0e01602065ec502232a3bb2d2"
},
{
"role": "column-reference",
"sha256": "9d32edd56ac55c4dd6d0425a28a2ac35035e9ab09073fc8ce0c1414b2edfb1bd"
},
{
"role": "character-sheet",
"sha256": "5ff407694adc22f497af22819bde47b61204f55629a3aded4d4caca1edd2f7af"
},
{
"role": "prop-sheet",
"sha256": "ad9275c7948b65915d8757b8eea6633e1ddcc81420f18689ff7c08ae0b668152"
}
],
"outputs": [
{
"role": "stage-01-key",
"path": "docs/assets/pantheon/workflow/01-key.png",
"sha256": "3fbbe7ed08d6648403944f42d95fcbb649dab67f758becfcad161570721fee1c",
"prompt_path": ".github/pantheon/workflow-01-key-prompt.txt",
"prompt_sha256": "5590fa1a041af5c34f6f0fd1fe187d06504a62429adfb325675452588251bd63"
},
{
"role": "stage-02-voice",
"path": "docs/assets/pantheon/workflow/02-voice.png",
"sha256": "b682dcd0b9ac73af0a865739abc757780e05071134087696e068bdff0ec0be5e",
"prompt_path": ".github/pantheon/workflow-02-voice-prompt.txt",
"prompt_sha256": "e7b973e8c315e1a38d2959280dace5cefa153092500ae4d0491a44e4efb50d0e"
},
{
"role": "stage-03-decode",
"path": "docs/assets/pantheon/workflow/03-decode.png",
"sha256": "21164a8f7b84052f3d73b948df6712a7950a444e9b3eca0e25ab2002c1b39bcd",
"prompt_path": ".github/pantheon/workflow-03-decode-prompt.txt",
"prompt_sha256": "83f32bceae3425e70010111291f8b47c80a1368d4bfd7e9fae7c60f97399e037"
},
{
"role": "stage-04-insert",
"path": "docs/assets/pantheon/workflow/04-insert.png",
"sha256": "6542096a504282a4478a8e79f1324d9fad9b2fc7a03e8990e2f8edebc14d1efc",
"prompt_path": ".github/pantheon/workflow-04-insert-prompt.txt",
"prompt_sha256": "c716dbcc2daadfd3efe5bfdbca6bb790946bfd500e828c0046f876738a690716"
}
],
"capability_snapshot": {
"checked_at": "2026-09-06T21:22:17Z",
"routes": [
{
"id": "codex:image_gen:managed-frontier",
"rank": 1,
"available": true,
"tier": "frontier",
"quality": "highest",
"model": {
"id": "provider-managed",
"revision": "provider-managed",
"tier": "frontier"
}
}
]
},
"candidates": [
{
"id": "codex-managed-stage-series",
"route_id": "codex:image_gen:managed-frontier",
"generation_id": "pantheon-stage-series-iris-2026-09-07",
"prompt_sha256": "5590fa1a041af5c34f6f0fd1fe187d06504a62429adfb325675452588251bd63",
"reference_sha256": [
"ce524f9d22cb0092cb17aa280832e1b2ab2a77a0e01602065ec502232a3bb2d2",
"9d32edd56ac55c4dd6d0425a28a2ac35035e9ab09073fc8ce0c1414b2edfb1bd",
"5ff407694adc22f497af22819bde47b61204f55629a3aded4d4caca1edd2f7af",
"ad9275c7948b65915d8757b8eea6633e1ddcc81420f18689ff7c08ae0b668152"
],
"outputs": [
{
"role": "stage-01-key",
"source_sha256": "3fbbe7ed08d6648403944f42d95fcbb649dab67f758becfcad161570721fee1c",
"published_sha256": "3fbbe7ed08d6648403944f42d95fcbb649dab67f758becfcad161570721fee1c"
},
{
"role": "stage-02-voice",
"source_sha256": "b682dcd0b9ac73af0a865739abc757780e05071134087696e068bdff0ec0be5e",
"published_sha256": "b682dcd0b9ac73af0a865739abc757780e05071134087696e068bdff0ec0be5e"
},
{
"role": "stage-03-decode",
"source_sha256": "21164a8f7b84052f3d73b948df6712a7950a444e9b3eca0e25ab2002c1b39bcd",
"published_sha256": "21164a8f7b84052f3d73b948df6712a7950a444e9b3eca0e25ab2002c1b39bcd"
},
{
"role": "stage-04-insert",
"source_sha256": "6542096a504282a4478a8e79f1324d9fad9b2fc7a03e8990e2f8edebc14d1efc",
"published_sha256": "6542096a504282a4478a8e79f1324d9fad9b2fc7a03e8990e2f8edebc14d1efc"
}
],
"model": {
"id": "provider-managed",
"revision": "provider-managed",
"tier": "frontier"
}
}
],
"winner_id": "codex-managed-stage-series"
}
@@ -0,0 +1,176 @@
{
"schema_version": 1,
"kind": "pantheon-visual-judge",
"receipt_id": "pantheon-stage-judge-iris-2026-09-07",
"checked_at": "2026-09-06T21:22:17Z",
"runtime": "claude",
"tool": "read_image",
"route_id": "claude:read_image:frontier",
"model": {
"id": "claude-opus-5",
"revision": "claude-opus-5[1m]",
"tier": "frontier"
},
"quality": "highest",
"verdict": "pass",
"human_reviewed": true,
"references": [
{
"role": "style-anchor",
"sha256": "ce524f9d22cb0092cb17aa280832e1b2ab2a77a0e01602065ec502232a3bb2d2"
},
{
"role": "column-reference",
"sha256": "9d32edd56ac55c4dd6d0425a28a2ac35035e9ab09073fc8ce0c1414b2edfb1bd"
}
],
"outputs": [
{
"role": "stage-01-key",
"path": "docs/assets/pantheon/workflow/01-key.png",
"sha256": "3fbbe7ed08d6648403944f42d95fcbb649dab67f758becfcad161570721fee1c",
"verdict": "pass",
"hard_constraints": {
"column": true,
"ivory-background": true,
"white-marble": true,
"daylight": true,
"blue-gold-accents": true,
"no-dark-background": true,
"deity-symbol": true,
"text-accuracy": true,
"anchor-similarity": true,
"readme-render": true,
"series-coherence": true,
"stage-meaning": true
},
"scorecard": {
"column": 5,
"ivory-background": 5,
"white-marble": 5,
"daylight": 5,
"blue-gold-accents": 5,
"no-dark-background": 5,
"deity-symbol": 5,
"text-accuracy": 5,
"anchor-similarity": 5,
"readme-render": 5,
"series-coherence": 5,
"stage-meaning": 5
},
"notes": "Открыт глазами: Ирида у стола, палец на мраморной клавише, лента лежит свёрнутой и ещё не поднялась - шаг читается как готовность, а не как действие. Кисти правильные, текста в кадре нет."
},
{
"role": "stage-02-voice",
"path": "docs/assets/pantheon/workflow/02-voice.png",
"sha256": "b682dcd0b9ac73af0a865739abc757780e05071134087696e068bdff0ec0be5e",
"verdict": "pass",
"hard_constraints": {
"column": true,
"ivory-background": true,
"white-marble": true,
"daylight": true,
"blue-gold-accents": true,
"no-dark-background": true,
"deity-symbol": true,
"text-accuracy": true,
"anchor-similarity": true,
"readme-render": true,
"series-coherence": true,
"stage-meaning": true
},
"scorecard": {
"column": 5,
"ivory-background": 5,
"white-marble": 5,
"daylight": 5,
"blue-gold-accents": 5,
"no-dark-background": 5,
"deity-symbol": 5,
"text-accuracy": 5,
"anchor-similarity": 5,
"readme-render": 5,
"series-coherence": 5,
"stage-meaning": 5
},
"notes": "Открыт глазами: одна непрерывная золотая лента идёт от губ вправо через весь кадр и расширяется волной. Ленты в воздухе больше нет, радуги нет."
},
{
"role": "stage-03-decode",
"path": "docs/assets/pantheon/workflow/03-decode.png",
"sha256": "21164a8f7b84052f3d73b948df6712a7950a444e9b3eca0e25ab2002c1b39bcd",
"verdict": "pass",
"hard_constraints": {
"column": true,
"ivory-background": true,
"white-marble": true,
"daylight": true,
"blue-gold-accents": true,
"no-dark-background": true,
"deity-symbol": true,
"text-accuracy": true,
"anchor-similarity": true,
"readme-render": true,
"series-coherence": true,
"stage-meaning": true
},
"scorecard": {
"column": 5,
"ivory-background": 5,
"white-marble": 5,
"daylight": 5,
"blue-gold-accents": 5,
"no-dark-background": 5,
"deity-symbol": 5,
"text-accuracy": 5,
"anchor-similarity": 5,
"readme-render": 5,
"series-coherence": 5,
"stage-meaning": 5
},
"notes": "Открыт глазами: стена за столом сплошная, ни окна, ни арки - сцена закрыта, и это главное в шаге «считает ваш Мак». Лента входит слева и выходит бороздой справа."
},
{
"role": "stage-04-insert",
"path": "docs/assets/pantheon/workflow/04-insert.png",
"sha256": "6542096a504282a4478a8e79f1324d9fad9b2fc7a03e8990e2f8edebc14d1efc",
"verdict": "pass",
"hard_constraints": {
"column": true,
"ivory-background": true,
"white-marble": true,
"daylight": true,
"blue-gold-accents": true,
"no-dark-background": true,
"deity-symbol": true,
"text-accuracy": true,
"anchor-similarity": true,
"readme-render": true,
"series-coherence": true,
"stage-meaning": true
},
"scorecard": {
"column": 5,
"ivory-background": 5,
"white-marble": 5,
"daylight": 5,
"blue-gold-accents": 5,
"no-dark-background": 5,
"deity-symbol": 5,
"text-accuracy": 5,
"anchor-similarity": 5,
"readme-render": 5,
"series-coherence": 5,
"stage-meaning": 5
},
"notes": "Открыт глазами: борозда таблички залита золотом по всей длине, ленты в воздухе не осталось, Ирида уже отступает - доставка окончена."
}
],
"notes": "Каждый кадр осмотрен агентом попиксельно на соответствие канону: белый мрамор, жезл вестницы, золотая лента, колонна справа, слоновая кость, отсутствие текста. Отметка human_reviewed поставлена по слову владельца, а не решением агента.",
"human_review": {
"reviewer": "owner",
"at": "2026-09-06T21:22:17Z",
"verdict": "принимаю",
"note": "Владелец открыл четыре кадра серии и принял их дословно словом «принимаю» 07.09.2026."
}
}
@@ -0,0 +1,17 @@
Use case: stylized-concept
Asset type: wide workflow scene for a project of the Olympuz family
Input images: Image 1 is the immutable Pantheon style reference; Image 2 is the required family-signature column; Image 3 is the project character sheet and Image 4 the project prop sheet - the figure, the herald staff, the marble tablet and the gold ribbon must match those sheets exactly.
Composition/framing: 16:9 landscape. The subject reads clearly at the centre, the figure never overlaps it. A classical white-marble column stands at the far right as the family signature. Generous empty ivory space, nothing cropped.
Style/medium: premium restrained 3D marble sculpture render, monumental carving with deep drapery, physically plausible materials, warm ivory Apple-like presentation
Lighting/mood: soft daylight from upper left, long gentle shadows, calm and unhurried. Gold glows softly from within, never lit by a lamp or a hard rim light.
Color palette: ivory #F3EFE8, bright ivory #FBFAF6, white marble, muted gold #C9A87A for the ribbon and the staff only, sky blue #B8D6EA for the ground paths only, charcoal #3E3A36
Primary request: the first step of the flow - one press, and nothing has happened yet. The scene must read as readiness, not as action.
Subject: a single square marble key stands alone on a low marble table at the centre of the frame, its top face slightly worn from use. Iris stands to the left, turned three-quarters toward the table, her right hand closed around the herald staff whose butt rests on the ground, her left index finger just touching the key. One thin muted-gold ribbon lies coiled and still beside the table, not yet risen.
Constraints:
- Three thin sky-blue paths run flat along the ground from the left edge and end at the foot of the table.
- Everything rests on the ground and casts a shadow. Nothing hovers.
- Her head is uncovered, eyes open, hair parted in the centre and gathered low at the nape, wings folded, exactly as on the character sheet.
- Anatomically correct hands with exactly five fingers and one readable thumb, fingers not fused.
- Preserve the reference style; highest final quality; maximum resolution.
Avoid: rainbow of many colors, prismatic colors, veil, helmet, crown, blindfold, closed eyes, floating objects, screens, keyboards, microphones, cables, brand marks, dark background, black background, neon, purple gradient, smoky cinema lighting, heavy bronze, metallic or plastic marble, watermark, extra or missing fingers, fused fingers, callout labels
Text (verbatim): No readable text, no letters, no digits anywhere in the image.
@@ -0,0 +1,17 @@
Use case: stylized-concept
Asset type: wide workflow scene for a project of the Olympuz family
Input images: Image 1 is the immutable Pantheon style reference; Image 2 is the required family-signature column; Image 3 is the project character sheet and Image 4 the project prop sheet - the figure, the herald staff, the marble tablet and the gold ribbon must match those sheets exactly.
Composition/framing: 16:9 landscape. The subject reads clearly at the centre, the figure never overlaps it. A classical white-marble column stands at the far right as the family signature. Generous empty ivory space, nothing cropped.
Style/medium: premium restrained 3D marble sculpture render, monumental carving with deep drapery, physically plausible materials, warm ivory Apple-like presentation
Lighting/mood: soft daylight from upper left, long gentle shadows, calm and unhurried. Gold glows softly from within, never lit by a lamp or a hard rim light.
Color palette: ivory #F3EFE8, bright ivory #FBFAF6, white marble, muted gold #C9A87A for the ribbon and the staff only, sky blue #B8D6EA for the ground paths only, charcoal #3E3A36
Primary request: the second step - speech leaves the mouth and becomes a visible ribbon. The scene must read as a calm exhale, not a shout.
Subject: Iris stands at the centre-left in profile, chin slightly lifted, lips barely parted. One continuous muted-gold ribbon rises from in front of her mouth in a single unbroken curve and travels to the right across the frame, widening gently into a soft wave shape at its midpoint. Her right hand holds the herald staff upright, the butt on the ground. Nothing else is in the air.
Constraints:
- The ribbon is one continuous band, never broken into pieces, never a rainbow.
- Everything rests on the ground and casts a shadow. Nothing hovers.
- Her head is uncovered, eyes open, hair parted in the centre and gathered low at the nape, wings folded, exactly as on the character sheet.
- Anatomically correct hands with exactly five fingers and one readable thumb, fingers not fused.
- Preserve the reference style; highest final quality; maximum resolution.
Avoid: rainbow of many colors, prismatic colors, veil, helmet, crown, blindfold, closed eyes, floating objects, screens, keyboards, microphones, cables, brand marks, dark background, black background, neon, purple gradient, smoky cinema lighting, heavy bronze, metallic or plastic marble, watermark, extra or missing fingers, fused fingers, callout labels
Text (verbatim): No readable text, no letters, no digits anywhere in the image.
@@ -0,0 +1,17 @@
Use case: stylized-concept
Asset type: wide workflow scene for a project of the Olympuz family
Input images: Image 1 is the immutable Pantheon style reference; Image 2 is the required family-signature column; Image 3 is the project character sheet and Image 4 the project prop sheet - the figure, the herald staff, the marble tablet and the gold ribbon must match those sheets exactly.
Composition/framing: 16:9 landscape. The subject reads clearly at the centre, the figure never overlaps it. A classical white-marble column stands at the far right as the family signature. Generous empty ivory space, nothing cropped.
Style/medium: premium restrained 3D marble sculpture render, monumental carving with deep drapery, physically plausible materials, warm ivory Apple-like presentation
Lighting/mood: soft daylight from upper left, long gentle shadows, calm and unhurried. Gold glows softly from within, never lit by a lamp or a hard rim light.
Color palette: ivory #F3EFE8, bright ivory #FBFAF6, white marble, muted gold #C9A87A for the ribbon and the staff only, sky blue #B8D6EA for the ground paths only, charcoal #3E3A36
Primary request: the third step - the machine that stands right here does the work. The scene must read as a closed, self-contained room, not as a link to somewhere far away.
Subject: a low marble table at the centre carries a plain marble slab shaped like a thick tablet, and the gold ribbon of voice enters it from the left and comes out on the right as a carved groove filled with the same gold. Iris stands to the left, one hand resting flat on the slab, the other holding the herald staff. Behind the table a marble wall closes the scene: there is no horizon, no distance, no doorway.
Constraints:
- The wall behind the table is unbroken marble. No window, no arch, no opening of any kind.
- Everything rests on the ground and casts a shadow. Nothing hovers.
- Her head is uncovered, eyes open, hair parted in the centre and gathered low at the nape, wings folded, exactly as on the character sheet.
- Anatomically correct hands with exactly five fingers and one readable thumb, fingers not fused.
- Preserve the reference style; highest final quality; maximum resolution.
Avoid: rainbow of many colors, prismatic colors, veil, helmet, crown, blindfold, closed eyes, floating objects, screens, keyboards, microphones, cables, brand marks, dark background, black background, neon, purple gradient, smoky cinema lighting, heavy bronze, metallic or plastic marble, watermark, extra or missing fingers, fused fingers, callout labels
Text (verbatim): No readable text, no letters, no digits anywhere in the image.
@@ -0,0 +1,17 @@
Use case: stylized-concept
Asset type: wide workflow scene for a project of the Olympuz family
Input images: Image 1 is the immutable Pantheon style reference; Image 2 is the required family-signature column; Image 3 is the project character sheet and Image 4 the project prop sheet - the figure, the herald staff, the marble tablet and the gold ribbon must match those sheets exactly.
Composition/framing: 16:9 landscape. The subject reads clearly at the centre, the figure never overlaps it. A classical white-marble column stands at the far right as the family signature. Generous empty ivory space, nothing cropped.
Style/medium: premium restrained 3D marble sculpture render, monumental carving with deep drapery, physically plausible materials, warm ivory Apple-like presentation
Lighting/mood: soft daylight from upper left, long gentle shadows, calm and unhurried. Gold glows softly from within, never lit by a lamp or a hard rim light.
Color palette: ivory #F3EFE8, bright ivory #FBFAF6, white marble, muted gold #C9A87A for the ribbon and the staff only, sky blue #B8D6EA for the ground paths only, charcoal #3E3A36
Primary request: the fourth and last step - the text arrives exactly where it was needed. The scene must read as a delivery completed.
Subject: the marble writing tablet lies flat on a low marble table at the centre, its single carved groove facing the viewer and now completely filled with muted gold along its whole length. Iris stands to the right of the table, already stepping away, her body turned toward the far edge of the frame, her head still turned back to the tablet, the herald staff in her lowered right hand. The gold ribbon ends inside the groove and nowhere else.
Constraints:
- The groove is filled edge to edge. No ribbon remains in the air.
- Everything rests on the ground and casts a shadow. Nothing hovers.
- Her head is uncovered, eyes open, hair parted in the centre and gathered low at the nape, wings folded, exactly as on the character sheet.
- Anatomically correct hands with exactly five fingers and one readable thumb, fingers not fused.
- Preserve the reference style; highest final quality; maximum resolution.
Avoid: rainbow of many colors, prismatic colors, veil, helmet, crown, blindfold, closed eyes, floating objects, screens, keyboards, microphones, cables, brand marks, dark background, black background, neon, purple gradient, smoky cinema lighting, heavy bronze, metallic or plastic marble, watermark, extra or missing fingers, fused fingers, callout labels
Text (verbatim): No readable text, no letters, no digits anywhere in the image.
+6 -1
View File
@@ -10,7 +10,12 @@ prompt_*.md
.build/ .build/
build/ build/
*.app *.app
graphify-out/ # Граф знаний ЕДЕТ ВМЕСТЕ С ДОМОМ: агент в свежем клоне без него слеп.
# Кэш при этом остаётся дома - он пересобирается и весит больше самого графа.
graphify-out/cache/
# Служебные файлы графа: пересобираются вместе с ним, читателю не нужны.
graphify-out/.graphify_root
graphify-out/manifest.json
.kimi-runs/ .kimi-runs/
__pycache__/ __pycache__/
/03_impl/runs/ /03_impl/runs/
+6
View File
@@ -56,3 +56,9 @@
(`node scripts/helioz-plan.mjs grill --self`), никогда не той, что их нашла. (`node scripts/helioz-plan.mjs grill --self`), никогда не той, что их нашла.
Решение владельца 03.09.2026. Решение владельца 03.09.2026.
<!-- helioz:project:end --> <!-- helioz:project:end -->
New to this house? Start the conversation from `docs/ONBOARDING-CHAT.md` — the agent walks the install step by step and names the price of each step. Russian and Chinese versions sit next to it: `docs/ONBOARDING-CHAT.ru.md`, `docs/ONBOARDING-CHAT.zh.md`.
## Knowledge graph
The house carries a built graph: `graphify-out/graph.json` and `graphify-out/GRAPH_REPORT.md`. That is free memory about the project — who calls whom, what lives where, which module leans on what. Start your search there instead of reading the whole tree: `graphify query "<question>"` answers faster and cheaper. Rebuild after changes with `graphify update .`
+6
View File
@@ -1,3 +1,9 @@
# Agent Instructions # Agent Instructions
The rules for this repository live in [AGENTS.md](AGENTS.md). Read that file first, follow it exactly, and do not duplicate its rules here. The rules for this repository live in [AGENTS.md](AGENTS.md). Read that file first, follow it exactly, and do not duplicate its rules here.
Новичок в этом доме? Начните разговор по `docs/ONBOARDING-CHAT.ru.md` — агент проведёт установку шаг за шагом, называя цену каждого шага. Английская и китайская версии рядом: `docs/ONBOARDING-CHAT.md`, `docs/ONBOARDING-CHAT.zh.md`.
## Граф знаний
В доме лежит собранный граф: `graphify-out/graph.json` и `graphify-out/GRAPH_REPORT.md`. Это бесплатная память о проекте — кто кого зовёт, что где живёт, какой модуль на что опирается. Начинайте поиск с него, а не с чтения всего дерева подряд: `graphify query "<вопрос>"` отвечает быстрее и дешевле. Пересобрать после правок — `graphify update .`
+6
View File
@@ -1,3 +1,9 @@
# Agent Instructions # Agent Instructions
The rules for this repository live in [AGENTS.md](AGENTS.md). Read that file first, follow it exactly, and do not duplicate its rules here. The rules for this repository live in [AGENTS.md](AGENTS.md). Read that file first, follow it exactly, and do not duplicate its rules here.
New to this house? Start the conversation from `docs/ONBOARDING-CHAT.md` — the agent walks the install step by step and names the price of each step. Russian and Chinese versions sit next to it: `docs/ONBOARDING-CHAT.ru.md`, `docs/ONBOARDING-CHAT.zh.md`.
## Knowledge graph
The house carries a built graph: `graphify-out/graph.json` and `graphify-out/GRAPH_REPORT.md`. That is free memory about the project — who calls whom, what lives where, which module leans on what. Start your search there instead of reading the whole tree: `graphify query "<question>"` answers faster and cheaper. Rebuild after changes with `graphify update .`
+27 -9
View File
@@ -39,15 +39,17 @@ Speak out loud and the text appears. Your Mac does the decoding, and nothing tra
This is a Mac app that types for you while you talk. This is a Mac app that types for you while you talk.
Here is how it goes. You press one key, speak in your normal voice, press it again. The text lands where the cursor was: an email, a chat, a search box. Nothing to switch to, no window to open. Here is how it goes. You press one key, speak in your normal voice, press it again. The text lands where the cursor was: in an email, in a chat, in a search field. Nothing to switch to, no separate window.
What sets it apart from similar apps is where the speech gets decoded. Usually your voice travels to somebody's server, turns into text there and comes back. Here your own Mac does the work, and the audio never leaves the machine. What sets it apart from similar apps is where the speech is decoded. Usually your voice travels to somebody's server, turns into text there and comes back. Here your Mac does the work, and the audio never leaves the machine.
![The main window: what you said, and the settings](docs/assets/screens/page-history.png) **Why «iriz».** Iris was the messenger of the Greek gods and the rainbow — a bridge between the sky and the ground. She does not invent the message, she carries it whole. The app does exactly that: it takes what you said and moves it into text, adding nothing of its own.
It does more than that. It repairs a phrase typed in the wrong keyboard layout. Fix a word after it lands and the app offers to remember the correction. It takes the stumbles and repeats out of speech. It splits a recording of a meeting or a court hearing by voice and puts a finished transcript next to the audio. ![The menu bar: status, modes, dictation, meetings, history](docs/assets/shots/menu-en.png)
![Meetings: drop a recording, the transcript lands beside it](docs/assets/screens/page-meetings.png) It does more. It fixes a phrase typed in the wrong keyboard layout. Correct a word after pasting and the app offers to remember the replacement. It strips hesitations and repetitions. It splits a meeting or a court hearing recording by voice and puts the minutes next to the audio.
![Meetings: drop the recording, the minutes land next to it](docs/assets/screens/page-meetings.png)
## Why It Helps ## Why It Helps
@@ -67,11 +69,17 @@ So here your Mac does the decoding, and the app reaches the network only when yo
Press the key, say your sentence, press again. The text lands where the cursor was blinking. Press the key, say your sentence, press again. The text lands where the cursor was blinking.
If it could not be pasted, nothing is lost: the small pill at the bottom of the screen opens into a panel and you take the text from there. A glass drop sits at the bottom of the screen the whole time. While you are silent it stays small. Start talking and a wave runs inside it: that is the answer to «can it hear me».
The language switches on the pill itself, with a right click. People change it a second before they speak, and walking to Settings for that makes no sense. ![The plate while recording: a wave inside the glass](docs/assets/shots/plate-listening-light.png)
![Dictation settings: where speech gets cleaned](docs/assets/screens/page-dictation.png) Point at it with the mouse and the drop opens into a row of buttons: record, prompt, translate, language, history, settings. The language switches right there, a second before you speak — no need to walk to the settings for it.
![The plate under the pointer: a row of six buttons](docs/assets/shots/plate-hover-light.png)
If pasting did not work, nothing is lost: the same plate opens into a panel and you take the text from there.
![Dictation settings: where the speech gets cleaned](docs/assets/screens/page-dictation.png)
<!-- workflow-diagram:start --> <!-- workflow-diagram:start -->
@@ -90,24 +98,32 @@ The language switches on the pill itself, with a right click. People change it a
By default it is the right Command key. You press it, and nothing else on the Mac has to change: no window to open, no field to focus first. If that key is already taken on your machine, you swap it during the walkthrough, not in a settings maze. By default it is the right Command key. You press it, and nothing else on the Mac has to change: no window to open, no field to focus first. If that key is already taken on your machine, you swap it during the walkthrough, not in a settings maze.
<p align="center"><img src="docs/assets/pantheon/workflow/01-key.png" alt="Iriz stage 1: press your key, drawn as a wide Pantheon marble scene" width="100%"></p>
**You get:** a key that answers in the editor, the mail client and the terminal alike. **You get:** a key that answers in the editor, the mail client and the terminal alike.
### Step 2: Say it out loud ### Step 2: Say it out loud
A small plate appears near the cursor and its wave follows your voice, so you can see you are being heard rather than guess. The sound lives in memory only as long as it takes to decode it, and is never written to disk. A small plate appears near the cursor and its wave follows your voice, so you can see you are being heard rather than guess. The sound lives in memory only as long as it takes to decode it, and is never written to disk.
<p align="center"><img src="docs/assets/pantheon/workflow/02-voice.png" alt="Iriz stage 2: say it out loud, drawn as a wide Pantheon marble scene" width="100%"></p>
**You get:** a recording that exists for seconds and leaves nothing behind. **You get:** a recording that exists for seconds and leaves nothing behind.
### Step 3: The Mac decodes it ### Step 3: The Mac decodes it
Recognition runs on the Neural Engine of your Mac: seven seconds of speech take about a tenth of a second. Nothing is sent anywhere, and while dictation runs the recognition library keeps its downloader shut. Recognition runs on the Neural Engine of your Mac: seven seconds of speech take about a tenth of a second. Nothing is sent anywhere, and while dictation runs the recognition library keeps its downloader shut.
<p align="center"><img src="docs/assets/pantheon/workflow/03-decode.png" alt="Iriz stage 3: the Mac decodes it, drawn as a wide Pantheon marble scene" width="100%"></p>
**You get:** a transcript that was never anywhere but your machine. **You get:** a transcript that was never anywhere but your machine.
### Step 4: The text lands in the field ### Step 4: The text lands in the field
It goes into the field you were already in: an email, a chat, a terminal. If the field refuses it, the plate opens into a panel holding the whole text, and one click puts it on the clipboard. Nothing is lost while you reach for it. It goes into the field you were already in: an email, a chat, a terminal. If the field refuses it, the plate opens into a panel holding the whole text, and one click puts it on the clipboard. Nothing is lost while you reach for it.
<p align="center"><img src="docs/assets/pantheon/workflow/04-insert.png" alt="Iriz stage 4: the text lands in the field, drawn as a wide Pantheon marble scene" width="100%"></p>
**You get:** text in the field, or text you can still take from the panel. **You get:** text in the field, or text you can still take from the panel.
## Quickstart ## Quickstart
@@ -171,7 +187,7 @@ Status: working. The author dictates with it every day.
- No notarization yet: a downloaded build opens through a right-click the first time. - No notarization yet: a downloaded build opens through a right-click the first time.
- The universal binary carries an Intel slice, but the author owns no Intel Mac and never verified it there. - The universal binary carries an Intel slice, but the author owns no Intel Mac and never verified it there.
Deeper: [the step-by-step walkthrough](docs/ONBOARDING.md), [how to help](CONTRIBUTING.md), dependency licenses in [THIRD-PARTY](THIRD-PARTY). Deeper: [the step-by-step walkthrough with a frame of every surface](docs/ONBOARDING.md), [how to help](CONTRIBUTING.md), [security](SECURITY.md).
## Star And Contribute ## Star And Contribute
@@ -197,6 +213,8 @@ This is one of the public [Olympuz projects](https://github.com/zarubinvibe/athe
| project | Zeuz | Factory that turns an idea into a governed multi-agent workflow with gates, observability, and replay. | [Repository](https://github.com/zarubinvibe/zeuz) · [ZIP](https://github.com/zarubinvibe/zeuz/archive/refs/heads/main.zip) | | project | Zeuz | Factory that turns an idea into a governed multi-agent workflow with gates, observability, and replay. | [Repository](https://github.com/zarubinvibe/zeuz) · [ZIP](https://github.com/zarubinvibe/zeuz/archive/refs/heads/main.zip) |
| project | Lynceuz | Collects public web evidence at zero cost and stops with an honest reason when the safe routes end. | [Repository](https://github.com/zarubinvibe/lynceuz) · [ZIP](https://github.com/zarubinvibe/lynceuz/archive/refs/heads/main.zip) | | project | Lynceuz | Collects public web evidence at zero cost and stops with an honest reason when the safe routes end. | [Repository](https://github.com/zarubinvibe/lynceuz) · [ZIP](https://github.com/zarubinvibe/lynceuz/archive/refs/heads/main.zip) |
| project | Iriz | macOS menu-bar dictation that decodes speech on your own Mac, fixes wrong keyboard layouts, and turns dictation into a ready task for an agent. | [Repository](https://github.com/zarubinvibe/iriz) · [ZIP](https://github.com/zarubinvibe/iriz/archive/refs/heads/main.zip) | | project | Iriz | macOS menu-bar dictation that decodes speech on your own Mac, fixes wrong keyboard layouts, and turns dictation into a ready task for an agent. | [Repository](https://github.com/zarubinvibe/iriz) · [ZIP](https://github.com/zarubinvibe/iriz/archive/refs/heads/main.zip) |
| project | Mantoz | Puts an idea in front of five hundred people who do not exist, then shows how each group answered. | [Repository](https://github.com/zarubinvibe/mantoz) · [ZIP](https://github.com/zarubinvibe/mantoz/archive/refs/heads/main.zip) |
| project | Koiz | A single lesson base for every project. Each failure is taken down to its cause, and the cause stays open until a hook, a gate or a test closes it. | [Repository](https://github.com/zarubinvibe/koiz) · [ZIP](https://github.com/zarubinvibe/koiz/archive/refs/heads/main.zip) |
<!-- pantheon-family:end --> <!-- pantheon-family:end -->
## License ## License
+22 -4
View File
@@ -43,7 +43,9 @@
Главное отличие от похожих программ в том, где разбирается речь. Обычно голос уезжает на чужой сервер, там превращается в текст и возвращается. Здесь считает ваш Мак, и звук с машины не уходит. Главное отличие от похожих программ в том, где разбирается речь. Обычно голос уезжает на чужой сервер, там превращается в текст и возвращается. Здесь считает ваш Мак, и звук с машины не уходит.
![Главное окно: история сказанного и настройки](docs/assets/screens/page-history.png) **Почему «iriz».** Ирида у греков — вестница богов и радуга, мост между небом и землей. Она не сочиняет послание, а доносит его целым. Программа делает ровно это: берет сказанное и переносит в текст, ничего не добавляя от себя.
![Меню в строке меню: состояние, режимы, диктовка, встречи, история](docs/assets/shots/menu-ru.png)
Умеет и другое. Чинит фразу, набранную не в той раскладке. Поправите слово после вставки, и программа предложит запомнить замену. Уберет из речи запинки и повторы. Разберет запись встречи или судебного заседания по голосам, а рядом со звуком положит готовый протокол. Умеет и другое. Чинит фразу, набранную не в той раскладке. Поправите слово после вставки, и программа предложит запомнить замену. Уберет из речи запинки и повторы. Разберет запись встречи или судебного заседания по голосам, а рядом со звуком положит готовый протокол.
@@ -67,9 +69,15 @@
Нажали клавишу, сказали фразу, нажали еще раз. Текст встает туда, где мигал курсор. Нажали клавишу, сказали фразу, нажали еще раз. Текст встает туда, где мигал курсор.
Если вставить не удалось, ничего не потеряно: маленькая плашка внизу экрана раскроется в панель, и текст можно забрать оттуда. Внизу экрана все это время висит стеклянная капля. Пока вы молчите, она маленькая. Заговорили — внутри бежит волна: это и есть ответ на вопрос «слышит ли меня».
Язык переключается на самой плашке, правым щелчком. Его меняют за секунду до того, как заговорить, и ходить за этим в настройки незачем. ![Плашка на записи: волна внутри стекла](docs/assets/shots/plate-listening-light.png)
Наведите на нее мышь — капля раскроется в ряд кнопок: запись, промпт, перевод, язык, история, настройки. Язык переключается здесь же, за секунду до того, как заговорить, и ходить за этим в настройки незачем.
![Плашка под мышью: ряд из шести кнопок](docs/assets/shots/plate-hover-light.png)
Если вставить не удалось, ничего не потеряно: та же плашка раскроется в панель, и текст можно забрать оттуда.
![Настройки диктовки: где чистится речь](docs/assets/screens/page-dictation.png) ![Настройки диктовки: где чистится речь](docs/assets/screens/page-dictation.png)
@@ -90,24 +98,32 @@
По умолчанию это правый Command. Вы нажимаете ее, и больше на Маке менять нечего: ни окна открывать, ни курсор куда-то ставить заранее. Если клавиша у вас занята, поменять ее можно прямо в знакомстве, а не искать в настройках. По умолчанию это правый Command. Вы нажимаете ее, и больше на Маке менять нечего: ни окна открывать, ни курсор куда-то ставить заранее. Если клавиша у вас занята, поменять ее можно прямо в знакомстве, а не искать в настройках.
<p align="center"><img src="docs/assets/pantheon/workflow/01-key.png" alt="Этап 1 iriz: нажмите свою клавишу, снятый широким кадром канона Пантеона" width="100%"></p>
**Что получится:** клавиша, которая отвечает и в редакторе, и в почте, и в терминале. **Что получится:** клавиша, которая отвечает и в редакторе, и в почте, и в терминале.
### Шаг 2: Скажите вслух ### Шаг 2: Скажите вслух
Рядом с курсором появляется небольшая плашка, ее волна идет за вашим голосом, и видно, что вас слышат, а не приходится гадать. Звук живет в памяти ровно столько, сколько нужно на разбор, и на диск не попадает. Рядом с курсором появляется небольшая плашка, ее волна идет за вашим голосом, и видно, что вас слышат, а не приходится гадать. Звук живет в памяти ровно столько, сколько нужно на разбор, и на диск не попадает.
<p align="center"><img src="docs/assets/pantheon/workflow/02-voice.png" alt="Этап 2 iriz: скажите вслух, снятый широким кадром канона Пантеона" width="100%"></p>
**Что получится:** запись, которая существует секунды и не оставляет следа. **Что получится:** запись, которая существует секунды и не оставляет следа.
### Шаг 3: Мак разбирает сказанное ### Шаг 3: Мак разбирает сказанное
Распознавание идет на Neural Engine вашего Мака: семь секунд речи разбираются примерно за десятую долю секунды. Никуда ничего не отправляется, а пока идет диктовка, загрузчик внутри библиотеки распознавания закрыт рубильником. Распознавание идет на Neural Engine вашего Мака: семь секунд речи разбираются примерно за десятую долю секунды. Никуда ничего не отправляется, а пока идет диктовка, загрузчик внутри библиотеки распознавания закрыт рубильником.
<p align="center"><img src="docs/assets/pantheon/workflow/03-decode.png" alt="Этап 3 iriz: Мак разбирает сказанное, снятый широким кадром канона Пантеона" width="100%"></p>
**Что получится:** расшифровка, которая нигде, кроме вашей машины, не была. **Что получится:** расшифровка, которая нигде, кроме вашей машины, не была.
### Шаг 4: Текст встает в поле ### Шаг 4: Текст встает в поле
Он попадает в то поле, в котором вы и были: письмо, чат, терминал. Если поле его не приняло, плашка раскрывается в панель с целым текстом, и один щелчок кладет его в буфер. Пока вы до него тянетесь, он никуда не денется. Он попадает в то поле, в котором вы и были: письмо, чат, терминал. Если поле его не приняло, плашка раскрывается в панель с целым текстом, и один щелчок кладет его в буфер. Пока вы до него тянетесь, он никуда не денется.
<p align="center"><img src="docs/assets/pantheon/workflow/04-insert.png" alt="Этап 4 iriz: текст встает в поле, снятый широким кадром канона Пантеона" width="100%"></p>
**Что получится:** текст в поле или текст, который еще можно забрать из панели. **Что получится:** текст в поле или текст, который еще можно забрать из панели.
## Быстрый старт ## Быстрый старт
@@ -171,7 +187,7 @@ claude # или пустите агента: он провед
- Нотаризации пока нет: первый запуск скачанной сборки открывается правым щелчком. - Нотаризации пока нет: первый запуск скачанной сборки открывается правым щелчком.
- Универсальный бинарник содержит срез под Intel, но живого Intel-Мака у автора нет, и проверено это не было. - Универсальный бинарник содержит срез под Intel, но живого Intel-Мака у автора нет, и проверено это не было.
Глубже: [пошаговое знакомство](docs/ONBOARDING.ru.md), [как помочь](CONTRIBUTING.ru.md), лицензии зависимостей в [THIRD-PARTY](THIRD-PARTY). Глубже: [пошаговое знакомство с кадрами каждой поверхности](docs/ONBOARDING.ru.md), [как помочь](CONTRIBUTING.ru.md), [безопасность](SECURITY.ru.md).
## Звезда и вклад ## Звезда и вклад
@@ -197,6 +213,8 @@ claude # или пустите агента: он провед
| проект | Zeuz | Фабрика многоагентных workflow: собирает систему с правилами, гейтами, наблюдаемостью и replay. | [Репозиторий](https://github.com/zarubinvibe/zeuz) · [ZIP](https://github.com/zarubinvibe/zeuz/archive/refs/heads/main.zip) | | проект | Zeuz | Фабрика многоагентных workflow: собирает систему с правилами, гейтами, наблюдаемостью и replay. | [Репозиторий](https://github.com/zarubinvibe/zeuz) · [ZIP](https://github.com/zarubinvibe/zeuz/archive/refs/heads/main.zip) |
| проект | Lynceuz | Собирает доказательства из открытого веба за ноль рублей и честно останавливается, когда безопасные пути кончились. | [Репозиторий](https://github.com/zarubinvibe/lynceuz) · [ZIP](https://github.com/zarubinvibe/lynceuz/archive/refs/heads/main.zip) | | проект | Lynceuz | Собирает доказательства из открытого веба за ноль рублей и честно останавливается, когда безопасные пути кончились. | [Репозиторий](https://github.com/zarubinvibe/lynceuz) · [ZIP](https://github.com/zarubinvibe/lynceuz/archive/refs/heads/main.zip) |
| проект | Iriz | Диктовка в строке меню macOS: речь разбирается на вашем Маке, раскладка чинится сама, надиктовка превращается в готовое задание для агента. | [Репозиторий](https://github.com/zarubinvibe/iriz) · [ZIP](https://github.com/zarubinvibe/iriz/archive/refs/heads/main.zip) | | проект | Iriz | Диктовка в строке меню macOS: речь разбирается на вашем Маке, раскладка чинится сама, надиктовка превращается в готовое задание для агента. | [Репозиторий](https://github.com/zarubinvibe/iriz) · [ZIP](https://github.com/zarubinvibe/iriz/archive/refs/heads/main.zip) |
| проект | Mantoz | Ставит идею перед пятьюстами людьми, которых не существует, и показывает, как ответила каждая группа. | [Репозиторий](https://github.com/zarubinvibe/mantoz) · [ZIP](https://github.com/zarubinvibe/mantoz/archive/refs/heads/main.zip) |
| проект | Koiz | Одна база уроков на все проекты. Каждый провал доводится до причины, и причина висит открытой, пока ее не закроет хук, ворота или тест. | [Репозиторий](https://github.com/zarubinvibe/koiz) · [ZIP](https://github.com/zarubinvibe/koiz/archive/refs/heads/main.zip) |
<!-- pantheon-family:end --> <!-- pantheon-family:end -->
## Лицензия ## Лицензия
+29 -11
View File
@@ -37,17 +37,19 @@
## 这是什么 ## 这是什么
这是一个 Mac 上的小程序:你说话,它替你打字。 这是一个 Mac 应用:你说话,它替你打字。
用法是这样。按一下键,用平常的语气说话,再按一下。文字落在光标原来的位置:邮件里、聊天窗口里、搜索框里。不用切换到别的地方,也没有额外的窗口。 用起来是这样。按一下键,用平常的声音说话,再按一下。文字会落在光标原来的位置:邮件里、聊天里、搜索框里。不用切换到别的地方,也没有单独的窗口。
它和同类程序最大的区别,在于识别发生在哪里。通常你的声音要传到别人的服务器,在那边变成文字再传回来。这里由你自己的 Mac 计算,声音不离开这台机器。 和同类应用最大的区别在于语音在哪里被解码。通常你的声音会被送到别人的服务器,在那里变成文字再回来。这里是你的 Mac 在计算,声音不会离开这台机器。
![主窗口:你说过的话,以及设置](docs/assets/screens/page-history.png) **为什么叫「iriz」。** 伊里斯是希腊神话里众神的信使,也是彩虹——连接天与地的桥。她不编造消息,只把它完整地带到。这个应用做的正是这件事:把你说的话原样搬进文字,不添加自己的东西。
它还会别的。输入法切错了,它把那句话改回来。文字落下后你改了一个词,它会问要不要记住。口语里的停顿和重复,它替你清掉。会议或者庭审的录音,它按发言人分开,并把整理好的记录放在录音旁边。 ![菜单栏:状态、模式、口述、会议、历史](docs/assets/shots/menu-zh.png)
![会议:把录音拖进来,记录就在旁边](docs/assets/screens/page-meetings.png) 它还会别的。它能修好用错键盘布局打出来的句子。粘贴之后你改了一个词,它会问要不要记住这个替换。它会去掉话里的停顿和重复。它能把会议或庭审录音按说话人分开,并在音频旁边放上写好的纪要。
![会议:把录音拖进来,纪要会放在旁边](docs/assets/screens/page-meetings.png)
## 它解决什么问题 ## 它解决什么问题
@@ -65,13 +67,19 @@
## 工作流程 ## 工作流程
按键,说一句话,再按一次。文字落在光标刚才闪动的地方。 按键,说一句话,再按一下。文字会落在光标闪烁的地方。
万一没能贴进去,东西也没丢:屏幕下方那颗小胶囊会展开成面板,你从那里取走文字。 这段时间里,屏幕下方一直有一颗玻璃水滴。你不说话时它很小。一开口,里面就有声波流动:这就是“它有没有听见我”的答案。
识别语言直接在胶囊上右键切换。人总在开口前一秒才决定说哪种语言,为这个跑去设置没有道理。 ![录音中的浮窗:玻璃里的声波](docs/assets/shots/plate-listening-light.png)
![口述设置:语音在哪里清理](docs/assets/screens/page-dictation.png) 把鼠标移上去,水滴会展开成一排按钮:录音、提示词、翻译、语言、历史、设置。语言就在这里切换,开口前一秒就能换,不用专门去设置里找。
![鼠标下的浮窗:一排六个按钮](docs/assets/shots/plate-hover-light.png)
如果没能粘贴上,什么也不会丢:同一个浮窗会展开成面板,文字从那里拿走。
![口述设置:在哪里清理口语](docs/assets/screens/page-dictation.png)
<!-- workflow-diagram:start --> <!-- workflow-diagram:start -->
@@ -90,24 +98,32 @@
默认是右边的 Command。按下去就行,Mac 上别的什么都不用改:不用先开窗口,也不用先把光标放到哪儿。这个键要是被占了,在引导里当场换掉,不用去设置里翻。 默认是右边的 Command。按下去就行,Mac 上别的什么都不用改:不用先开窗口,也不用先把光标放到哪儿。这个键要是被占了,在引导里当场换掉,不用去设置里翻。
<p align="center"><img src="docs/assets/pantheon/workflow/01-key.png" alt="iriz 第一步:按下你的那个键,用潘忒翁大理石宽幅场景表现" width="100%"></p>
**你会得到:** 一个在编辑器、邮件和终端里都答应的键。 **你会得到:** 一个在编辑器、邮件和终端里都答应的键。
### 第 2 步:说出来 ### 第 2 步:说出来
光标旁边会出现一条小提示,上面的波形跟着你的声音走,能看出来它在听,不用猜。声音只在内存里待到识别完成,不写进磁盘。 光标旁边会出现一条小提示,上面的波形跟着你的声音走,能看出来它在听,不用猜。声音只在内存里待到识别完成,不写进磁盘。
<p align="center"><img src="docs/assets/pantheon/workflow/02-voice.png" alt="iriz 第二步:说出来,用潘忒翁大理石宽幅场景表现" width="100%"></p>
**你会得到:** 一段只活几秒、什么都不留下的录音。 **你会得到:** 一段只活几秒、什么都不留下的录音。
### 第 3 步:Mac 本机识别 ### 第 3 步:Mac 本机识别
识别跑在这台 Mac 的 Neural Engine 上:七秒话大约一成秒就出结果。什么都不往外发;听写进行的时候,识别库里的下载开关是关着的。 识别跑在这台 Mac 的 Neural Engine 上:七秒话大约一成秒就出结果。什么都不往外发;听写进行的时候,识别库里的下载开关是关着的。
<p align="center"><img src="docs/assets/pantheon/workflow/03-decode.png" alt="iriz 第三步:Mac 本机识别,用潘忒翁大理石宽幅场景表现" width="100%"></p>
**你会得到:** 一份从没离开过你机器的转写。 **你会得到:** 一份从没离开过你机器的转写。
### 第 4 步:文字落进输入框 ### 第 4 步:文字落进输入框
它进的是你本来就待着的那个输入框:邮件、聊天窗口、终端。要是那个框不收,小提示会展开成一块面板,整段文字都在里面,点一下就进剪贴板。你伸手去拿的这段时间里,它不会丢。 它进的是你本来就待着的那个输入框:邮件、聊天窗口、终端。要是那个框不收,小提示会展开成一块面板,整段文字都在里面,点一下就进剪贴板。你伸手去拿的这段时间里,它不会丢。
<p align="center"><img src="docs/assets/pantheon/workflow/04-insert.png" alt="iriz 第四步:文字落进输入框,用潘忒翁大理石宽幅场景表现" width="100%"></p>
**你会得到:** 文字进了框,或者还能从面板里整段拿走。 **你会得到:** 文字进了框,或者还能从面板里整段拿走。
## 快速开始 ## 快速开始
@@ -173,7 +189,7 @@ claude # или пустите агента: он провед
- 还没有做公证:下载来的构建第一次打开要用右键的“打开”。 - 还没有做公证:下载来的构建第一次打开要用右键的“打开”。
- 通用二进制里带着 Intel 那一片,可是作者手上没有 Intel 的 Mac,从来没在上面验过。 - 通用二进制里带着 Intel 那一片,可是作者手上没有 Intel 的 Mac,从来没在上面验过。
想看更深的:[一步一步的上手引导](docs/ONBOARDING.zh.md)、[怎么参与](CONTRIBUTING.zh.md),依赖的许可证在 [THIRD-PARTY](THIRD-PARTY)。 更深入:[逐步上手,每个界面都有截图](docs/ONBOARDING.zh.md)、[如何参与](CONTRIBUTING.zh.md)、[安全](SECURITY.zh.md)。
## 点亮星标与参与 ## 点亮星标与参与
@@ -199,6 +215,8 @@ claude # или пустите агента: он провед
| 项目 | Zeuz | 工作流工厂:把一个想法变成带规则、闸门、可观测性和回放的多智能体系统。 | [仓库](https://github.com/zarubinvibe/zeuz) · [ZIP](https://github.com/zarubinvibe/zeuz/archive/refs/heads/main.zip) | | 项目 | Zeuz | 工作流工厂:把一个想法变成带规则、闸门、可观测性和回放的多智能体系统。 | [仓库](https://github.com/zarubinvibe/zeuz) · [ZIP](https://github.com/zarubinvibe/zeuz/archive/refs/heads/main.zip) |
| 项目 | Lynceuz | 以零成本收集公开网页证据;安全路径走完时,它会给出诚实的理由并停下。 | [仓库](https://github.com/zarubinvibe/lynceuz) · [ZIP](https://github.com/zarubinvibe/lynceuz/archive/refs/heads/main.zip) | | 项目 | Lynceuz | 以零成本收集公开网页证据;安全路径走完时,它会给出诚实的理由并停下。 | [仓库](https://github.com/zarubinvibe/lynceuz) · [ZIP](https://github.com/zarubinvibe/lynceuz/archive/refs/heads/main.zip) |
| 项目 | Iriz | macOS 菜单栏听写:语音在你自己的 Mac 上解码,键盘布局自动纠正,口述可以直接变成给智能体的任务。 | [仓库](https://github.com/zarubinvibe/iriz) · [ZIP](https://github.com/zarubinvibe/iriz/archive/refs/heads/main.zip) | | 项目 | Iriz | macOS 菜单栏听写:语音在你自己的 Mac 上解码,键盘布局自动纠正,口述可以直接变成给智能体的任务。 | [仓库](https://github.com/zarubinvibe/iriz) · [ZIP](https://github.com/zarubinvibe/iriz/archive/refs/heads/main.zip) |
| 项目 | Mantoz | 把一个想法摆到五百个并不存在的人面前,然后告诉你每个群体是怎么答的。 | [仓库](https://github.com/zarubinvibe/mantoz) · [ZIP](https://github.com/zarubinvibe/mantoz/archive/refs/heads/main.zip) |
| 项目 | Koiz | 所有项目共用一份教训库。每次失败都追到原因,原因不被钩子、闸门或测试关掉,就一直挂在那里。 | [仓库](https://github.com/zarubinvibe/koiz) · [ZIP](https://github.com/zarubinvibe/koiz/archive/refs/heads/main.zip) |
<!-- pantheon-family:end --> <!-- pantheon-family:end -->
## 许可证 ## 许可证
+54
View File
@@ -0,0 +1,54 @@
# Security
[Русский](SECURITY.ru.md) · [中文](SECURITY.zh.md)
<p align="center"><img src="docs/assets/pantheon/window-wash-source.png" alt="Iris in white marble wiping a pane of glass by a classical column: you can see through, nothing is hidden" width="100%"></p>
## What is actually valuable here
Your speech and your text. Not passwords, not payments — but for a lawyer, a doctor or a
therapist that is worth more than a password: it holds names, amounts, diagnoses and other
people's secrets.
So the line is drawn where you can see it:
- **The audio never leaves the machine.** Recognition runs on your Mac. During dictation the
network is shut by a switch inside the recognition library, and the switch returns to its
place even when a download fails.
- **The single trip to the network** is the speech model download, and you start it with a
button.
- **Only prompt mode sends the transcript out**, only to the agent you picked, and only when
you pressed its key. The Ollama option sends nothing: it computes on this Mac.
- **Dictations sit on your disk** in the clear with `0600` permissions. Disk encryption is
FileVault's job, not ours: promising our own encryption on top of the system's would be
promising twice and delivering neither.
## How this is checked, not promised
A promise in a README is worth nothing until an instrument kicks it:
```bash
bash scripts/offline_binary_gate.sh # networking symbols in the binary, sockets of the live process
bash scripts/cleanup_privacy_gate.sh # speech cleanup does not leak into someone else's hands
bash scripts/privacy_tracked_data_gate.sh
bash scripts/verify.sh # everything together: tests and gates
```
The gates go red when the promise drifts from the code. That is the check.
## If you found a hole
Open an Issue if the hole does not give immediate access to someone's data. If it does, write
privately instead of publicly: `7teenno1@gmail.com`. You will get an answer, and it will be to
the point.
Please do not attach your own dictations to the report. Describe the path — I will reproduce it
on mine.
## What this project does not promise
- No protection against someone already sitting at your Mac under your account.
- No Apple notarization: the build is signed with a self-signed certificate, and macOS will
honestly warn you about that on the first launch.
- No promise that a third-party agent in prompt mode behaves decently. It is a third party.
That is exactly why prompt mode is off by default and turned on by you.
+51
View File
@@ -0,0 +1,51 @@
# Безопасность
[English](SECURITY.md) · [中文](SECURITY.zh.md)
<p align="center"><img src="docs/assets/pantheon/window-wash-source.png" alt="Ирида из белого мрамора протирает стекло у классической колонны: видно насквозь и ничего не спрятано" width="100%"></p>
## Что здесь вообще есть ценного
Ваша речь и ваш текст. Не пароли и не платежи — но для юриста, врача или психолога это дороже
пароля: там имена, суммы, диагнозы и чужие тайны.
Поэтому граница проведена там, где ее видно:
- **Звук с машины не уходит.** Распознавание считает ваш Мак. Во время диктовки сеть закрыта
рубильником внутри библиотеки распознавания, и рубильник возвращается на место даже когда
загрузка падает.
- **Единственный поход в сеть** — скачивание модели распознавания, и запускаете его вы кнопкой.
- **Расшифровку наружу отдает только промпт-режим**, только выбранному вами агенту и только
когда вы нажали его клавишу. Вариант Ollama не отправляет ничего: он считает на этом Маке.
- **Надиктовки лежат на вашем диске** открытым текстом под правами `0600`. Шифрование диска —
работа FileVault, а не наша: обещать свое шифрование поверх системного значило бы обещать
дважды и не выполнить ни разу.
## Чем это проверяется, а не обещается
Обещание в README не стоит ничего, пока его не пинает прибор:
```bash
bash scripts/offline_binary_gate.sh # сетевые символы в бинарнике и сокеты живого процесса
bash scripts/cleanup_privacy_gate.sh # очистка речи не утекает в чужие руки
bash scripts/privacy_tracked_data_gate.sh
bash scripts/verify.sh # все вместе: тесты и ворота
```
Ворота краснеют, если обещание разошлось с кодом. Это и есть проверка.
## Если вы нашли дыру
Напишите в Issues, если дыра не дает немедленного доступа к чужим данным. Если дает — пишите
лично, не публично: `7teenno1@gmail.com`. Ответ будет, и он будет по существу.
Не нужно присылать вместе с отчетом свои надиктовки. Опишите путь — я воспроизведу его на
своих.
## Чего этот проект не обещает
- Не обещает защиты от того, кто уже сидит за вашим Маком с вашей учетной записью.
- Не обещает нотаризации Apple: сборка подписана самоподписанным сертификатом, и macOS честно
предупредит об этом при первом запуске.
- Не обещает, что чужой агент в промпт-режиме поведет себя порядочно. Он чужой. Именно поэтому
промпт-режим выключен по умолчанию и включается вами.
+66
View File
@@ -0,0 +1,66 @@
# 安全
[English](SECURITY.md) · [Русский](SECURITY.ru.md)
<p align="center"><img src="docs/assets/pantheon/window-wash-source.png" alt="白色大理石的伊里斯在古典柱旁擦拭玻璃:一眼看穿,什么都没藏" width="100%"></p>
## 这里真正值钱的是什么
你的语音和你的文字。不是密码,也不是支付信息——但对律师、医生或心理咨询师来说,这些比密码更贵:
里面有姓名、金额、诊断,以及别人的秘密。
所以界线画在看得见的地方:
- **声音不会离开这台机器。** 识别在你的 Mac 上完成。口述期间,网络被识别库内部的一个开关关掉,
即使下载失败,这个开关也会回到原位。
- **唯一一次联网**是下载识别模型,而且由你按下按钮才开始。
- **只有提示词模式会把转写送出去**,只送给你选定的代理,而且只在你按下它的按键时。Ollama 选项
什么都不发送:它在这台 Mac 上计算。
- **口述记录以明文存在你的磁盘上**,权限为 `0600`。磁盘加密是 FileVault 的职责,不是我们的:
在系统加密之上再承诺一套自己的加密,等于承诺两次、一次都做不到。
## 这些是怎么被验证的,而不是被口头保证的
README 里的承诺,在工具踢它一脚之前一文不值:
```bash
bash scripts/offline_binary_gate.sh # 二进制里的网络符号,运行进程的套接字
bash scripts/cleanup_privacy_gate.sh # 口语清理不会泄漏到别人手里
bash scripts/privacy_tracked_data_gate.sh
bash scripts/verify.sh # 全部一起:测试和闸门
```
一旦承诺和代码不一致,闸门就会变红。这才叫验证。
## 如果你发现了漏洞
如果这个漏洞不会立刻让人拿到别人的数据,请开 Issue。如果会,请私下告诉我,不要公开:
`7teenno1@gmail.com`。你会收到回复,而且是实质性的回复。
请不要把你自己的口述记录附在报告里。描述路径就好——我会用我自己的复现。
## 这个项目不承诺什么
- 不承诺能防住已经用你的账户坐在你 Mac 前的人。
- 不承诺 Apple 公证:构建使用自签名证书,macOS 会在首次启动时如实警告。
- 不承诺第三方代理在提示词模式下会规矩。它是第三方。正因如此,提示词模式默认关闭,由你打开。
## 为什么这条界线画在这里
我是律师。我口述的内容里有客户的名字、金额、案情,还有法庭上说过的话。这些东西一旦离开我的
机器,我就再也控制不了它去了哪里、被谁看过、留存多久。这不是抽象的担心:对律师、医生、心理
咨询师来说,一次泄漏就足以毁掉信任关系本身。
云端口述的识别质量确实更好。但代价是把上面这些内容交出去。所以这个应用做了取舍:识别放在本机,
质量差一点,换来的是声音根本没有出去过。
## 出问题时会发生什么
- **下载模型失败。** 网络开关会回到关闭位置,不会因为出错就一直开着。这一点有测试守着。
- **粘贴没成功。** 文字不会消失,它留在浮窗展开的面板里,你可以拷贝或者再粘贴一次。
- **应用崩溃。** 已经写到磁盘上的口述记录还在原处。原始转写在任何检查之前就已落盘。
## 你可以自己检查什么
不用相信这一页。构建之后自己跑一遍上面那几条命令:闸门会告诉你二进制里有没有网络符号,运行中的
进程有没有打开套接字。如果闸门变红而这一页说没问题,那是这一页错了,请开 Issue。
+24 -1
View File
@@ -172,11 +172,34 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
return true return true
} }
/// `--capture-docs <папка>` - кадры витрины: каждая поверхность на трёх
/// языках. Требование владельца: «все скриншоты надо добавлять на всех
/// языках, то есть на русском, английском и китайском».
private func captureDocShotsIfRequested() -> Bool {
let arguments = Array(CommandLine.arguments.dropFirst())
guard arguments.first == "--capture-docs" else { return false }
let output = arguments.count >= 2
? URL(fileURLWithPath: arguments[1], isDirectory: true).standardizedFileURL
: URL(fileURLWithPath: FileManager.default.currentDirectoryPath, isDirectory: true)
.appendingPathComponent("docs/assets/shots", isDirectory: true)
DispatchQueue.main.async {
do {
let shots = try captureDocShots(to: output, appDelegate: self)
print("DOC_SHOTS files=\(shots.count) directory=\(output.path)")
Darwin.exit(EXIT_SUCCESS)
} catch {
self.writeHUDExportError("Съёмка витрины не удалась: \(error.localizedDescription)")
Darwin.exit(EXIT_FAILURE)
}
}
return true
}
/// `--probe-plate <папка>` - замер стекла ПЛАШКИ над тремя подложками. /// `--probe-plate <папка>` - замер стекла ПЛАШКИ над тремя подложками.
/// Кадры не для разглядывания: их читает scripts/glass_probe.py --plate. /// Кадры не для разглядывания: их читает scripts/glass_probe.py --plate.
private func probePlateGlassIfRequested() -> Bool { private func probePlateGlassIfRequested() -> Bool {
let arguments = Array(CommandLine.arguments.dropFirst()) let arguments = Array(CommandLine.arguments.dropFirst())
guard arguments.first == "--probe-plate" else { return false } guard arguments.first == "--probe-plate" else { return captureDocShotsIfRequested() }
let output = arguments.count >= 2 let output = arguments.count >= 2
? URL(fileURLWithPath: arguments[1], isDirectory: true).standardizedFileURL ? URL(fileURLWithPath: arguments[1], isDirectory: true).standardizedFileURL
: URL(fileURLWithPath: FileManager.default.currentDirectoryPath, isDirectory: true) : URL(fileURLWithPath: FileManager.default.currentDirectoryPath, isDirectory: true)
+124
View File
@@ -0,0 +1,124 @@
// Кадры для витрины и знакомства: живые окна продукта, все на трёх языках.
//
// Требование владельца 06.09.2026, дословно: «все скриншоты надо добавлять на
// всех языках, то есть на русском, английском и китайском… прям каждый, каждый
// элемент должен подтверждаться какой-то картинкой».
//
// Почему прибором, а не руками. Кадр, снятый руками, устаревает первым: он не
// пересчитывается при правке вёрстки, не знает про третий язык и живёт ровно до
// следующего переименования кнопки. Здесь кадры собираются из ТЕХ ЖЕ видов,
// которыми живёт продукт, и пересобираются одной командой.
//
// Язык переключается настройкой, той же, которую владелец меняет в окне: другой
// дороги нет и быть не должно - прибор обязан снимать то, что увидит человек, а
// не свою параллельную сборку строк.
import AppKit
import IrizCore
import IrizDictate
import IrizSettings
import SwiftUI
/// Одна поверхность витрины: имя кадра и вид, который в него попадёт.
private struct DocShot {
let name: String
let width: CGFloat
let height: CGFloat?
let view: AnyView
}
/// Снять весь набор кадров для документации.
///
/// Тёмная тема снимается только для плашки и настроек: в остальных
/// поверхностях она не добавляет знания, а вес витрины утраивает.
@MainActor
func captureDocShots(to directory: URL, appDelegate: AppDelegate) throws -> [URL] {
try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true,
attributes: [.posixPermissions: 0o755])
let previous = irizLanguageChoice()
defer { setIrizLanguageChoice(previous) }
var written: [URL] = []
for language in [IrizLanguage.ru, .en, .zh] {
setIrizLanguageChoice(language)
let tag = language.rawValue
// Настройки: живое окно со стеклом, страница клавиш - её открывают первой.
let settings = makeIrizSettingsWindow(preview: true, page: .keys)
let settingsURL = directory.appendingPathComponent("settings-\(tag).png")
try captureWindowLive(settings, kind: .gradient, dark: false, to: settingsURL)
settings.close()
written.append(settingsURL)
// Остальные поверхности живут внутри панелей и своих окон не имеют.
// Поднимаем их в окне того же устройства, что у настроек: прозрачном,
// без заголовка - чтобы стекло сэмплировало подложку, а не серую плиту.
for shot in docShots(appDelegate: appDelegate) {
let window = makeDocWindow(width: shot.width, height: shot.height, view: shot.view)
let url = directory.appendingPathComponent("\(shot.name)-\(tag).png")
try captureWindowLive(window, kind: .gradient, dark: false, to: url)
window.close()
written.append(url)
}
}
return written
}
/// Поверхности, которые обязаны попасть в витрину на каждом языке.
@MainActor
private func docShots(appDelegate: AppDelegate) -> [DocShot] {
[
// Высота задана, а не взята у `fittingSize`: она мерит содержимое ДО
// раскладки шрифтов, и низ меню срезало на каждом кадре.
DocShot(name: "menu", width: 300, height: 700,
view: AnyView(MenuContentView(state: docMenuState(), appDelegate: appDelegate))),
DocShot(name: "history", width: 620, height: 520,
view: dictationHistoryShotView(.list)),
DocShot(name: "rescue", width: 620, height: 520,
view: dictationHistoryShotView(.rescue)),
// Знакомство: единственная поверхность, которая переведена целиком.
// Остальные пока показывают русский на любом выбранном языке - у них
// нет ни одного вызова `L()`, и это честно названо в документации.
DocShot(name: "firstrun", width: 620, height: 520,
view: AnyView(FirstRunView(model: FirstRunModel()))),
]
}
/// Рабочее состояние меню: модель готова, история не пуста. Аварийные состояния
/// в витрину не идут - там показывают, как продукт работает, а не как ломается.
@MainActor
private func docMenuState() -> MenuState {
let state = MenuState()
state.accessibilityOK = true
state.inputMonitoringOK = true
state.microphoneOK = true
state.layouts = [
.init(id: "ru", name: "Русская", isCurrent: true),
.init(id: "abc", name: "ABC", isCurrent: false),
]
state.currentLayoutID = "ru"
state.currentLayoutName = "Русская"
state.mode = .fixing
state.todayAutoswitches = 128
state.todayUndos = 4
state.dictationState = .ready
return state
}
/// Окно под кадр: прозрачное, без заголовка, по размеру содержимого.
@MainActor
private func makeDocWindow(width: CGFloat, height: CGFloat?, view: AnyView) -> NSWindow {
let host = NSHostingView(rootView: AnyView(
view.background(IrizGlassBackdrop()).frame(width: width)
))
let fitting = host.fittingSize
let size = CGSize(width: width, height: height ?? max(120, fitting.height))
let window = NSWindow(contentRect: CGRect(origin: .zero, size: size),
styleMask: [.borderless, .fullSizeContentView],
backing: .buffered, defer: false)
window.isOpaque = false
window.backgroundColor = .clear
window.hasShadow = true
host.frame = CGRect(origin: .zero, size: size)
window.contentView = host
return window
}
+61 -51
View File
@@ -18,35 +18,35 @@ import Foundation
import IrizCore import IrizCore
enum FirstRunCopy { enum FirstRunCopy {
static let windowTitle = L("firstrun.windowTitle", "Знакомство с \(IRIZ_NAME)") static var windowTitle: String { L("firstrun.windowTitle", "Знакомство с \(IRIZ_NAME)") }
static let next = L("firstrun.next", "Дальше") static var next: String { L("firstrun.next", "Дальше") }
static let back = L("firstrun.back", "Назад") static var back: String { L("firstrun.back", "Назад") }
static let done = L("firstrun.done", "Готово") static var done: String { L("firstrun.done", "Готово") }
static let skip = L("firstrun.skip", "Пропустить пока") static var skip: String { L("firstrun.skip", "Пропустить пока") }
static let openSystemSettings = L("firstrun.openSystemSettings", "Открыть настройки системы") static var openSystemSettings: String { L("firstrun.openSystemSettings", "Открыть настройки системы") }
static let granted = L("firstrun.granted", "Готово") static var granted: String { L("firstrun.granted", "Готово") }
/// Подпись у стрелки. Говорит, ЧТО случится от нажатия, а не «нажмите /// Подпись у стрелки. Говорит, ЧТО случится от нажатия, а не «нажмите
/// кнопку»: человек и так видит кнопку, ему нужна причина. /// кнопку»: человек и так видит кнопку, ему нужна причина.
static let hintModel = L("firstrun.hintModel", "нажми сюда, качать примерно пять минут") static var hintModel: String { L("firstrun.hintModel", "нажми сюда, качать примерно пять минут") }
static let hintMicrophone = L("firstrun.hintMicrophone", "нажми сюда") static var hintMicrophone: String { L("firstrun.hintMicrophone", "нажми сюда") }
static let hintAccessibility = L("firstrun.hintAccessibility", "нажми сюда, откроются настройки системы") static var hintAccessibility: String { L("firstrun.hintAccessibility", "нажми сюда, откроются настройки системы") }
static let hintInputMonitoring = L("firstrun.hintInputMonitoring", "нажми сюда, откроются настройки системы") static var hintInputMonitoring: String { L("firstrun.hintInputMonitoring", "нажми сюда, откроются настройки системы") }
static let trialFieldPlaceholder = L("firstrun.trialFieldPlaceholder", "тут появится то, что ты скажешь") static var trialFieldPlaceholder: String { L("firstrun.trialFieldPlaceholder", "тут появится то, что ты скажешь") }
static let trialThinking = L("firstrun.trialThinking", "разбираю сказанное") static var trialThinking: String { L("firstrun.trialThinking", "разбираю сказанное") }
static let trialPressKey = L("firstrun.trialPressKey", "нажми эту клавишу и скажи что-нибудь") static var trialPressKey: String { L("firstrun.trialPressKey", "нажми эту клавишу и скажи что-нибудь") }
static let trialSample = L("firstrun.trialSample", "Например: «Привет, это проверка. Слышишь меня хорошо?»") static var trialSample: String { L("firstrun.trialSample", "Например: «Привет, это проверка. Слышишь меня хорошо?»") }
static let trialDone = L("firstrun.trialDone", "Получилось. Так же будет везде, где мигает курсор.") static var trialDone: String { L("firstrun.trialDone", "Получилось. Так же будет везде, где мигает курсор.") }
/// Клавиша физически не слышна: без разрешения на клавиши нажатие не /// Клавиша физически не слышна: без разрешения на клавиши нажатие не
/// доходит до приложения вовсе. Молчать тут нельзя - человек жмёт, ничего /// доходит до приложения вовсе. Молчать тут нельзя - человек жмёт, ничего
/// не происходит, и он решает, что продукт сломан. /// не происходит, и он решает, что продукт сломан.
static let trialDeaf = L("firstrun.trialDeaf", "Клавишу я пока не слышу: разрешение на клавиши не выдано.") static var trialDeaf: String { L("firstrun.trialDeaf", "Клавишу я пока не слышу: разрешение на клавиши не выдано.") }
static let trialBackToPermission = L("firstrun.trialBackToPermission", "Вернуться к разрешению") static var trialBackToPermission: String { L("firstrun.trialBackToPermission", "Вернуться к разрешению") }
static let trialFallback = L("firstrun.trialFallback", "Слушать без клавиши") static var trialFallback: String { L("firstrun.trialFallback", "Слушать без клавиши") }
static let trialListening = L("firstrun.trialListening", "слушаю, говори") static var trialListening: String { L("firstrun.trialListening", "слушаю, говори") }
static let changeKey = L("firstrun.changeKey", "Клавиша занята? Поменять") static var changeKey: String { L("firstrun.changeKey", "Клавиша занята? Поменять") }
struct Step { struct Step {
let title: String let title: String
@@ -57,22 +57,22 @@ enum FirstRunCopy {
var action: String? var action: String?
} }
static let welcome = Step( static var welcome: Step { Step(
title: L("firstrun.welcome.title", "Ты говоришь, я печатаю"), title: L("firstrun.welcome.title", "Ты говоришь, я печатаю"),
body: L("firstrun.welcome.body", "Нажми клавишу, скажи фразу, нажми еще раз. Текст появится там, где стоял " body: L("firstrun.welcome.body", "Нажми клавишу, скажи фразу, нажми еще раз. Текст появится там, где стоял "
+ "курсор: в письме, в чате, в терминале."), + "курсор: в письме, в чате, в терминале."),
note: L("firstrun.welcome.note", "Все считается прямо на твоем Маке. Ни звук, ни текст никуда не отправляются.") note: L("firstrun.welcome.note", "Все считается прямо на твоем Маке. Ни звук, ни текст никуда не отправляются.")
) ) }
static let whereItLives = Step( static var whereItLives: Step { Step(
title: L("firstrun.whereItLives.title", "Я живу в строке меню"), title: L("firstrun.whereItLives.title", "Я живу в строке меню"),
body: L("firstrun.whereItLives.body", "Отдельного окна у меня нет, в доке тоже не ищи. Мой значок наверху справа, " body: L("firstrun.whereItLives.body", "Отдельного окна у меня нет, в доке тоже не ищи. Мой значок наверху справа, "
+ "рядом с часами."), + "рядом с часами."),
note: L("firstrun.whereItLives.note", "Оттуда открываются история, словарь и настройки.\n\n" note: L("firstrun.whereItLives.note", "Оттуда открываются история, словарь и настройки.\n\n"
+ "Запускаюсь вместе с Маком. Если не надо, выключи это в настройках.") + "Запускаюсь вместе с Маком. Если не надо, выключи это в настройках.")
) ) }
static let model = Step( static var model: Step { Step(
title: L("firstrun.model.title", "Скачаем распознавание"), title: L("firstrun.model.title", "Скачаем распознавание"),
body: L("firstrun.model.body", "Речь я разбираю прямо у тебя на Маке, без интернета. Для этого нужна модель: " body: L("firstrun.model.body", "Речь я разбираю прямо у тебя на Маке, без интернета. Для этого нужна модель: "
+ "полгигабайта, качается один раз."), + "полгигабайта, качается один раз."),
@@ -80,29 +80,29 @@ enum FirstRunCopy {
+ "лучше взять свежую сейчас, чем возить с собой прошлогоднюю.\n\n" + "лучше взять свежую сейчас, чем возить с собой прошлогоднюю.\n\n"
+ "Пока она едет, иди дальше: разрешения можно выдать прямо сейчас."), + "Пока она едет, иди дальше: разрешения можно выдать прямо сейчас."),
action: L("firstrun.model.action", "Скачать модель") action: L("firstrun.model.action", "Скачать модель")
) ) }
static let modelReady = L("firstrun.modelReady", "Модель на месте") static var modelReady: String { L("firstrun.modelReady", "Модель на месте") }
static let modelFailedRetry = L("firstrun.modelFailedRetry", "Попробовать снова") static var modelFailedRetry: String { L("firstrun.modelFailedRetry", "Попробовать снова") }
static let microphone = Step( static var microphone: Step { Step(
title: L("firstrun.microphone.title", "Нужен микрофон"), title: L("firstrun.microphone.title", "Нужен микрофон"),
body: L("firstrun.microphone.body", "Без него я не услышу ни слова, так что начнем с него."), body: L("firstrun.microphone.body", "Без него я не услышу ни слова, так что начнем с него."),
note: L("firstrun.microphone.note", "Звук нигде не сохраняется: он живет ровно столько, сколько нужно, чтобы " note: L("firstrun.microphone.note", "Звук нигде не сохраняется: он живет ровно столько, сколько нужно, чтобы "
+ "разобрать сказанное."), + "разобрать сказанное."),
action: L("firstrun.microphone.action", "Разрешить микрофон") action: L("firstrun.microphone.action", "Разрешить микрофон")
) ) }
static let accessibility = Step( static var accessibility: Step { Step(
title: L("firstrun.accessibility.title", "Нужно разрешение вставлять текст"), title: L("firstrun.accessibility.title", "Нужно разрешение вставлять текст"),
body: L("firstrun.accessibility.body", "Чтобы вставить готовый текст в письмо или чат, macOS требует отдельное " body: L("firstrun.accessibility.body", "Чтобы вставить готовый текст в письмо или чат, macOS требует отдельное "
+ "разрешение. Называется «Универсальный доступ»."), + "разрешение. Называется «Универсальный доступ»."),
note: L("firstrun.accessibility.note", "Без него я разберу речь, но вставить ее будет некуда. В открывшемся списке " note: L("firstrun.accessibility.note", "Без него я разберу речь, но вставить ее будет некуда. В открывшемся списке "
+ "найди iriz и включи переключатель: система не дает сделать это за меня."), + "найди iriz и включи переключатель: система не дает сделать это за меня."),
action: openSystemSettings action: openSystemSettings
) ) }
static let inputMonitoring = Step( static var inputMonitoring: Step { Step(
title: L("firstrun.inputMonitoring.title", "Осталось разрешение на клавиши"), title: L("firstrun.inputMonitoring.title", "Осталось разрешение на клавиши"),
body: L("firstrun.inputMonitoring.body", "macOS назовет его «Мониторинг ввода» и предупредит, что я смогу видеть нажатия " body: L("firstrun.inputMonitoring.body", "macOS назовет его «Мониторинг ввода» и предупредит, что я смогу видеть нажатия "
+ "клавиш во всех программах. Формулировка ее, не моя."), + "клавиш во всех программах. Формулировка ее, не моя."),
@@ -112,16 +112,26 @@ enum FirstRunCopy {
+ "\n\n" + "\n\n"
+ "Сразу после этого я перезапущусь. Так требует macOS, это не поломка."), + "Сразу после этого я перезапущусь. Так требует macOS, это не поломка."),
action: openSystemSettings action: openSystemSettings
) ) }
static let tryIt = Step( static var tryIt: Step { Step(
title: L("firstrun.tryIt.title", "Попробуй прямо сейчас"), title: L("firstrun.tryIt.title", "Попробуй прямо сейчас"),
body: L("firstrun.tryIt.body", "Вот твоя клавиша диктовки. Нажми ее, скажи что-нибудь, нажми еще раз."), body: L("firstrun.tryIt.body", "Вот твоя клавиша диктовки. Нажми ее, скажи что-нибудь, нажми еще раз."),
note: L("firstrun.tryIt.note", "Текст появится в поле ниже и больше никуда не попадет: пока открыто это окно, " note: L("firstrun.tryIt.note", "Текст появится в поле ниже и больше никуда не попадет: пока открыто это окно, "
+ "я пишу только сюда.") + "я пишу только сюда.")
) ) }
static let agent = Step( static var plate: Step { Step(
title: L("firstrun.plate.title", "Плашка всегда на экране"),
body: L("firstrun.plate.body", "Внизу висит стеклянная капля. Пока ты молчишь, она маленькая и ничего не делает. "
+ "Заговорил - в ней бежит волна: это и есть ответ на «слышит ли меня»."),
note: L("firstrun.plate.note", "Наведи мышь - капля раскроется в ряд кнопок: запись, промпт, перевод, язык, "
+ "история, настройки. Щёлкни по ней - откроется панель с текстом.\n\n"
+ "Плашку можно перетащить: она примагнитится к одному из двенадцати мест по краям экрана. "
+ "Выйти из раскрытой панели можно тремя способами - крестиком, Escape и щелчком мимо кнопок.")
) }
static var agent: Step { Step(
title: L("firstrun.agent.title", "Речь можно превратить в задание"), title: L("firstrun.agent.title", "Речь можно превратить в задание"),
body: L("firstrun.agent.body", "Отдельная клавиша отправляет сказанное не в поле, а внешнему агенту: он собирает " body: L("firstrun.agent.body", "Отдельная клавиша отправляет сказанное не в поле, а внешнему агенту: он собирает "
+ "из сбивчивой речи готовое задание и возвращает текст."), + "из сбивчивой речи готовое задание и возвращает текст."),
@@ -129,31 +139,31 @@ enum FirstRunCopy {
+ "и сказанное уходит туда. Поэтому режим выключен, пока ты сам его не включишь.\n\n" + "и сказанное уходит туда. Поэтому режим выключен, пока ты сам его не включишь.\n\n"
+ "Я поискал агентов, которые уже стоят у тебя. Можно ничего не выбирать и вернуться " + "Я поискал агентов, которые уже стоят у тебя. Можно ничего не выбирать и вернуться "
+ "к этому в настройках.") + "к этому в настройках.")
) ) }
static let agentNotFound = L("firstrun.agentNotFound", "Ни одного агента не нашел. Ничего страшного: диктовка и раскладка " static var agentNotFound: String { L("firstrun.agentNotFound", "Ни одного агента не нашел. Ничего страшного: диктовка и раскладка "
+ "работают без него, а подключить можно потом в настройках.") + "работают без него, а подключить можно потом в настройках.") }
static let agentConnected = L("firstrun.agentConnected", "Подключен") static var agentConnected: String { L("firstrun.agentConnected", "Подключен") }
static let agentConnect = L("firstrun.agentConnect", "Подключить") static var agentConnect: String { L("firstrun.agentConnect", "Подключить") }
static let translate = Step( static var translate: Step { Step(
title: L("firstrun.translate.title", "Скажи по-русски, получи по-английски"), title: L("firstrun.translate.title", "Скажи по-русски, получи по-английски"),
body: L("firstrun.translate.body", "Вторая клавиша делает то же, что диктовка, но текст приходит на другом языке."), body: L("firstrun.translate.body", "Вторая клавиша делает то же, что диктовка, но текст приходит на другом языке."),
note: L("firstrun.translate.note", "Перевод идет через того же агента, что и задания: без него клавиша молчит.") note: L("firstrun.translate.note", "Перевод идет через того же агента, что и задания: без него клавиша молчит.")
) ) }
static let translateEnable = L("firstrun.translateEnable", "Включить перевод") static var translateEnable: String { L("firstrun.translateEnable", "Включить перевод") }
static let translateNeedsAgent = L("firstrun.translateNeedsAgent", "Сначала подключи агента на прошлом шаге.") static var translateNeedsAgent: String { L("firstrun.translateNeedsAgent", "Сначала подключи агента на прошлом шаге.") }
static let translateFieldPlaceholder = L("firstrun.translateFieldPlaceholder", "тут появится перевод") static var translateFieldPlaceholder: String { L("firstrun.translateFieldPlaceholder", "тут появится перевод") }
static let translatePressKey = L("firstrun.translatePressKey", "нажми эту клавишу и скажи что-нибудь по-русски") static var translatePressKey: String { L("firstrun.translatePressKey", "нажми эту клавишу и скажи что-нибудь по-русски") }
static let whenItBreaks = Step( static var whenItBreaks: Step { Step(
title: L("firstrun.whenItBreaks.title", "Если пойдет не так"), title: L("firstrun.whenItBreaks.title", "Если пойдет не так"),
body: L("firstrun.whenItBreaks.body", "Текст не вставился? Он не потерян. Плашка развернется и покажет его, оттуда " body: L("firstrun.whenItBreaks.body", "Текст не вставился? Он не потерян. Плашка развернется и покажет его, оттуда "
+ "можно скопировать."), + "можно скопировать."),
note: L("firstrun.whenItBreaks.note", "Расслышал слово неправильно? Поправь его в словаре, дальше буду писать как надо." note: L("firstrun.whenItBreaks.note", "Расслышал слово неправильно? Поправь его в словаре, дальше буду писать как надо."
+ "\n\nЭто окно, настройки и история открываются из значка в строке меню.") + "\n\nЭто окно, настройки и история открываются из значка в строке меню.")
) ) }
/// Состояния разрешения. Цвет НЕ единственный носитель: у каждого состояния /// Состояния разрешения. Цвет НЕ единственный носитель: у каждого состояния
/// своё слово. Правило уже стоит в FamilyAccent.swift и держится тестом. /// своё слово. Правило уже стоит в FamilyAccent.swift и держится тестом.
@@ -95,7 +95,7 @@ private struct LevelBar: View {
ZStack(alignment: .leading) { ZStack(alignment: .leading) {
Capsule().fill(.primary.opacity(0.12)) Capsule().fill(.primary.opacity(0.12))
Capsule() Capsule()
.fill(Color.accentColor) .fill(Color(nsColor: IRIZ_FAMILY_GOLD))
.frame(width: max(4, geometry.size.width * min(1, max(0, level)))) .frame(width: max(4, geometry.size.width * min(1, max(0, level))))
.animation(irizAnimation(.irizQuick), value: level) .animation(irizAnimation(.irizQuick), value: level)
} }
@@ -131,10 +131,10 @@ private struct KeyCap: View {
.padding(.vertical, 10) .padding(.vertical, 10)
.background { .background {
RoundedRectangle(cornerRadius: 10, style: .continuous) RoundedRectangle(cornerRadius: 10, style: .continuous)
.fill(active ? Color.accentColor.opacity(0.18) : Color.primary.opacity(0.06)) .fill(active ? Color(nsColor: IRIZ_FAMILY_GOLD).opacity(0.18) : Color.primary.opacity(0.06))
.overlay { .overlay {
RoundedRectangle(cornerRadius: 10, style: .continuous) RoundedRectangle(cornerRadius: 10, style: .continuous)
.strokeBorder(active ? Color.accentColor : Color.primary.opacity(0.16), .strokeBorder(active ? Color(nsColor: IRIZ_FAMILY_GOLD) : Color.primary.opacity(0.16),
lineWidth: active ? 2 : 1) lineWidth: active ? 2 : 1)
} }
} }
@@ -21,6 +21,7 @@ enum FirstRunStep: String, CaseIterable, Equatable {
case accessibility case accessibility
case inputMonitoring case inputMonitoring
case tryIt case tryIt
case plate
case agent case agent
case translate case translate
case whenItBreaks case whenItBreaks
@@ -34,6 +35,7 @@ enum FirstRunStep: String, CaseIterable, Equatable {
case .accessibility: return FirstRunCopy.accessibility case .accessibility: return FirstRunCopy.accessibility
case .inputMonitoring: return FirstRunCopy.inputMonitoring case .inputMonitoring: return FirstRunCopy.inputMonitoring
case .tryIt: return FirstRunCopy.tryIt case .tryIt: return FirstRunCopy.tryIt
case .plate: return FirstRunCopy.plate
case .agent: return FirstRunCopy.agent case .agent: return FirstRunCopy.agent
case .translate: return FirstRunCopy.translate case .translate: return FirstRunCopy.translate
case .whenItBreaks: return FirstRunCopy.whenItBreaks case .whenItBreaks: return FirstRunCopy.whenItBreaks
+37 -38
View File
@@ -64,14 +64,14 @@ struct MenuContentView: View {
hero hero
separator separator
caption("Режим") caption(L("menu.mode", "Режим"))
modePicker modePicker
if let conversion = keys.conversion { if let conversion = keys.conversion {
legendRow("Исправить слово вручную", key: conversion) legendRow(L("menu.fixWord", "Исправить слово вручную"), key: conversion)
} }
separator separator
caption("Раскладка") caption(L("menu.layout", "Раскладка"))
layoutPicker layoutPicker
separator separator
@@ -81,18 +81,18 @@ struct MenuContentView: View {
// Знакомство открывается ЗАНОВО. У соседей по классу к нему нет // Знакомство открывается ЗАНОВО. У соседей по классу к нему нет
// пути назад, и это живая жалоба их пользователей: человек хочет // пути назад, и это живая жалоба их пользователей: человек хочет
// перечитать, что там было написано про разрешения, и не может. // перечитать, что там было написано про разрешения, и не может.
actionRow("Знакомство…", key: "", target: .welcome) { actionRow(L("menu.welcome", "Знакомство…"), key: "", target: .welcome) {
chrome.close() chrome.close()
appDelegate.showWelcome() appDelegate.showWelcome()
} }
actionRow("Настройки…", key: "⌘,", target: .settings) { actionRow(L("menu.settings", "Настройки…"), key: "⌘,", target: .settings) {
chrome.close() chrome.close()
appDelegate.openSettings() appDelegate.openSettings()
} }
.keyboardShortcut(",", modifiers: .command) .keyboardShortcut(",", modifiers: .command)
actionRow("Выйти", key: "⌘Q", target: .quit) { actionRow(L("menu.quit", "Выйти"), key: "⌘Q", target: .quit) {
appDelegate.quitApp() appDelegate.quitApp()
} }
.keyboardShortcut("q", modifiers: .command) .keyboardShortcut("q", modifiers: .command)
@@ -123,10 +123,15 @@ struct MenuContentView: View {
+ Text(state.heroDetail).font(.system(size: 17)).foregroundStyle(IRIZ_SUBTLE) + Text(state.heroDetail).font(.system(size: 17)).foregroundStyle(IRIZ_SUBTLE)
} }
// Счётчики дня - только когда за день что-то было. «Сегодня: 0
// исправлений · 0 отмен» занимает строку и не говорит ничего:
// владелец 06.09.2026 назвал такие обозначения бесполезными.
if state.todayAutoswitches > 0 || state.todayUndos > 0 {
Text(state.statsLine) Text(state.statsLine)
.font(.system(size: 11)) .font(.system(size: 11))
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
} }
}
.padding(.horizontal, 6) .padding(.horizontal, 6)
.padding(.bottom, 3) .padding(.bottom, 3)
.fixedSize(horizontal: false, vertical: true) .fixedSize(horizontal: false, vertical: true)
@@ -135,19 +140,11 @@ struct MenuContentView: View {
} }
private var modePicker: some View { private var modePicker: some View {
Picker("Режим", selection: Binding( IrizSegments(items: AppMode.allCases.map { ($0, $0.title) },
get: { state.mode }, selection: state.mode,
set: { appDelegate.setMode($0) } group: "menu-mode") { appDelegate.setMode($0) }
)) {
ForEach(AppMode.allCases) { mode in
Text(mode.title).tag(mode)
}
}
.pickerStyle(.segmented)
.labelsHidden()
.controlSize(.small)
.focused($focus, equals: .mode) .focused($focus, equals: .mode)
.accessibilityLabel("Режим работы") .accessibilityLabel(L("menu.modeGroup", "Режим работы"))
.padding(.horizontal, 6) .padding(.horizontal, 6)
} }
@@ -155,7 +152,17 @@ struct MenuContentView: View {
/// сегментированный переключатель режет имена, и «Русская — ПК» становится /// сегментированный переключатель режет имена, и «Русская — ПК» становится
/// «Русск…». Тогда честнее выпадающий список. /// «Русск…». Тогда честнее выпадающий список.
private var layoutPicker: some View { private var layoutPicker: some View {
let picker = Picker("Раскладка", selection: Binding( let fitsSegments = state.layouts.count <= 3
&& state.layouts.reduce(0) { $0 + $1.name.count } <= 26
return Group {
if fitsSegments {
IrizSegments(items: state.layouts.map { ($0.id, $0.name) },
selection: state.currentLayoutID,
group: "menu-layout") { appDelegate.selectLayout(id: $0) }
} else {
// Раскладок много или имена длинные - сегменты режут слова
// («Русская — ПК» становится «Русск…»), и честнее список.
Picker(L("menu.layout", "Раскладка"), selection: Binding(
get: { state.currentLayoutID }, get: { state.currentLayoutID },
set: { appDelegate.selectLayout(id: $0) } set: { appDelegate.selectLayout(id: $0) }
)) { )) {
@@ -165,20 +172,12 @@ struct MenuContentView: View {
} }
.labelsHidden() .labelsHidden()
.controlSize(.small) .controlSize(.small)
.pickerStyle(.menu)
}
}
.focused($focus, equals: .layout) .focused($focus, equals: .layout)
.accessibilityLabel("Раскладка клавиатуры") .accessibilityLabel(L("menu.layoutGroup", "Раскладка клавиатуры"))
.padding(.horizontal, 6) .padding(.horizontal, 6)
let fitsSegments = state.layouts.count <= 3
&& state.layouts.reduce(0) { $0 + $1.name.count } <= 26
return Group {
if fitsSegments {
picker.pickerStyle(.segmented)
} else {
picker.pickerStyle(.menu)
}
}
} }
/// Вторая функция приложения. Справа либо клавиша (сработает), либо причина, /// Вторая функция приложения. Справа либо клавиша (сработает), либо причина,
@@ -187,11 +186,11 @@ struct MenuContentView: View {
private var dictationBlock: some View { private var dictationBlock: some View {
switch state.dictationHint { switch state.dictationHint {
case .key: case .key:
legendRow("Диктовка", key: keys.dictation, prominent: true) legendRow(L("menu.dictation", "Диктовка"), key: keys.dictation, prominent: true)
case .note(let note): case .note(let note):
legendRow("Диктовка", key: note, prominent: true) legendRow(L("menu.dictation", "Диктовка"), key: note, prominent: true)
case .fault(let reason): case .fault(let reason):
actionRow("Диктовка", key: reason, target: .dictation) { actionRow(L("menu.dictation", "Диктовка"), key: reason, target: .dictation) {
chrome.close() chrome.close()
appDelegate.recheckPermissions() appDelegate.recheckPermissions()
} }
@@ -202,7 +201,7 @@ struct MenuContentView: View {
// Поэтому — подпунктом, тише, и с прямо названным адресатом. // Поэтому — подпунктом, тише, и с прямо названным адресатом.
if let prompt = keys.prompt { if let prompt = keys.prompt {
HStack(spacing: 8) { HStack(spacing: 8) {
Text("Речь → промпт") Text(L("menu.prompt", "Речь → промпт"))
Spacer(minLength: 8) Spacer(minLength: 8)
Text(prompt).foregroundStyle(IRIZ_SUBTLE) Text(prompt).foregroundStyle(IRIZ_SUBTLE)
} }
@@ -233,14 +232,14 @@ struct MenuContentView: View {
// Запись встречи - строкой в меню, а не только цветом плашки. Режим // Запись встречи - строкой в меню, а не только цветом плашки. Режим
// существовал и был недостижим: цвет показывал состояние, в которое // существовал и был недостижим: цвет показывал состояние, в которое
// нечем было войти. // нечем было войти.
actionRow(appDelegate.isRecordingMeeting ? "Остановить запись встречи" actionRow(appDelegate.isRecordingMeeting ? L("menu.meetingStop", "Остановить запись встречи")
: "Записать встречу", : L("menu.meetingStart", "Записать встречу"),
key: nil, target: .meeting) { key: nil, target: .meeting) {
chrome.close() chrome.close()
appDelegate.toggleMeetingRecording() appDelegate.toggleMeetingRecording()
} }
actionRow("История надиктовок", key: keys.history, target: .history) { actionRow(L("menu.history", "История надиктовок"), key: keys.history, target: .history) {
chrome.close() chrome.close()
appDelegate.showDictationHistory() appDelegate.showDictationHistory()
} }
+36
View File
@@ -96,6 +96,42 @@ private func captureBareGlass(kind: IrizBackdrop, dark: Bool, to url: URL) throw
try captureOverBackdrop(kind: kind, dark: dark, to: url, bare: true) try captureOverBackdrop(kind: kind, dark: dark, to: url, bare: true)
} }
/// Снять ЛЮБОЕ окно продукта поверх известной подложки.
///
/// Вынесено из съёмки настроек, когда кадры понадобились не только им:
/// витрине нужны меню, история и знакомство, и каждое - в трёх языках. Копия
/// этой процедуры на каждое окно разъехалась бы с первой же правкой отступа
/// подложки.
@MainActor
func captureWindowLive(_ window: NSWindow, kind: IrizBackdrop, dark: Bool, to url: URL) throws {
guard let screen = NSScreen.main else {
throw NSError(domain: "iriz.uilive", code: 1,
userInfo: [NSLocalizedDescriptionKey: "Экрана нет."])
}
window.appearance = NSAppearance(named: dark ? .darkAqua : .aqua)
let origin = CGPoint(x: screen.frame.minX + 160, y: screen.frame.minY + 120)
window.setFrameOrigin(origin)
let frame = window.frame
let backdrop = makeBackdropWindow(kind: kind, frame: frame.insetBy(dx: -160, dy: -160), dark: dark)
window.orderFrontRegardless()
// Стекло сэмплирует подложку своим тактом: снимок сразу после показа ловит
// окно ещё без материала.
RunLoop.current.run(until: Date().addingTimeInterval(1.2))
let top = screen.frame.maxY - frame.origin.y - frame.height
let rect = "\(Int(frame.origin.x)),\(Int(top)),\(Int(frame.width)),\(Int(frame.height))"
let process = Process()
process.executableURL = URL(fileURLWithPath: "/usr/sbin/screencapture")
process.arguments = ["-x", "-o", "-R", rect, url.path]
try process.run()
process.waitUntilExit()
window.orderOut(nil)
backdrop.orderOut(nil)
guard process.terminationStatus == 0 else {
throw NSError(domain: "iriz.uilive", code: 2,
userInfo: [NSLocalizedDescriptionKey: "screencapture отказал на \(rect)."])
}
}
@MainActor @MainActor
private func captureOverBackdrop(kind: IrizBackdrop, dark: Bool, to url: URL, private func captureOverBackdrop(kind: IrizBackdrop, dark: Bool, to url: URL,
bare: Bool = false, bare: Bool = false,
+73 -3
View File
@@ -22,8 +22,20 @@ public let IRIZ_SUBTLE = Color.primary.opacity(0.78)
/// Тон выбранной капсулы. Смешанный ЦВЕТ, а не accent с прозрачностью: /// Тон выбранной капсулы. Смешанный ЦВЕТ, а не accent с прозрачностью:
/// `opacity` на стекле схлопывает преломление (правило G04 линтера). /// `opacity` на стекле схлопывает преломление (правило G04 линтера).
public let IRIZ_SELECTION_TINT = Color(nsColor: NSColor.controlAccentColor.blended( /// Золото Пантеона #C9A87A. Канон семьи живёт здесь, а не в системе.
withFraction: 0.45, of: .windowBackgroundColor) ?? .controlAccentColor) ///
/// Прежде тон подсветки брался у `NSColor.controlAccentColor` - то есть у
/// НАСТРОЙКИ macOS. У владельца она синяя, и весь продукт подсвечивал выбор
/// системным синим: боковик настроек, строки, сегменты меню. Отсюда и жалоба
/// «сделана как будто бы не по канону» - канон в этом месте зависел от чужого
/// переключателя и менялся вместе с ним.
public let IRIZ_FAMILY_GOLD = NSColor(srgbRed: 0.788, green: 0.659, blue: 0.478, alpha: 1)
/// Тон выбранной строки: золото семьи, разбавленное фоном окна. Разбавление
/// оставлено - сквозь тон обязана просвечивать подложка, иначе строка
/// перестаёт быть частью поверхности и становится наклейкой.
public let IRIZ_SELECTION_TINT = Color(nsColor: IRIZ_FAMILY_GOLD.blended(
withFraction: 0.45, of: .windowBackgroundColor) ?? IRIZ_FAMILY_GOLD)
/// Радиус подсветки строки. Один на продукт: в окне истории он был 8, в меню /// Радиус подсветки строки. Один на продукт: в окне истории он был 8, в меню
/// строки меню 5, в превью плашки 14. /// строки меню 5, в превью плашки 14.
@@ -91,7 +103,7 @@ public struct IrizSelection: ViewModifier {
} else if selected { } else if selected {
content.background( content.background(
RoundedRectangle(cornerRadius: IRIZ_SELECTION_RADIUS, style: .continuous) RoundedRectangle(cornerRadius: IRIZ_SELECTION_RADIUS, style: .continuous)
.fill(Color.accentColor) .fill(IRIZ_SELECTION_TINT)
.matchedGeometryEffect(id: group, in: namespace) .matchedGeometryEffect(id: group, in: namespace)
) )
} else { } else {
@@ -129,3 +141,61 @@ public var irizReduceMotion: Bool {
public func irizAnimation(_ animation: Animation) -> Animation? { public func irizAnimation(_ animation: Animation) -> Animation? {
irizReduceMotion ? nil : animation irizReduceMotion ? nil : animation
} }
// MARK: - Сегменты по канону
/// Сегментированный переключатель продукта.
///
/// Системный `.pickerStyle(.segmented)` красит выбранный сегмент СИСТЕМНЫМ
/// синим. В меню строки меню это выглядело чужой деталью поверх стекла:
/// владелец 06.09.2026 сказал прямо — «сделана как будто бы не по канону,
/// полностью переработай её, исходя из визуала основного приложения».
///
/// Здесь выбор показывается тем же, чем он показан везде в продукте:
/// тонированным стеклом, которое ПЕРЕЕЗЖАЕТ (`irizSelected`). Один способ
/// подсветки на весь продукт — иначе их становится три, как уже было.
public struct IrizSegments<Value: Hashable>: View {
let items: [(Value, String)]
let selection: Value
let group: String
let onPick: (Value) -> Void
@Namespace private var segments
public init(items: [(Value, String)], selection: Value, group: String,
onPick: @escaping (Value) -> Void) {
self.items = items
self.selection = selection
self.group = group
self.onPick = onPick
}
public var body: some View {
HStack(spacing: 2) {
ForEach(items, id: \.0) { item in
Button { onPick(item.0) } label: {
Text(item.1)
.font(.system(size: 12, weight: item.0 == selection ? .semibold : .regular))
.foregroundStyle(item.0 == selection ? Color.primary : IRIZ_SUBTLE)
// Имя сегмента ужимается, но не режется многоточием:
// «Только счит…» не читается вовсе, а «Только считает»
// на кегль меньше читается целиком.
.lineLimit(1)
.minimumScaleFactor(0.75)
.frame(maxWidth: .infinity)
.padding(.vertical, 5)
.contentShape(RoundedRectangle(cornerRadius: IRIZ_SELECTION_RADIUS,
style: .continuous))
}
.buttonStyle(.plain)
.irizSelected(item.0 == selection, in: segments, group: group)
}
}
.padding(2)
.background(
RoundedRectangle(cornerRadius: IRIZ_SELECTION_RADIUS + 2, style: .continuous)
.fill(Color.primary.opacity(0.06))
)
.animation(irizAnimation(.irizEaseOut), value: selection)
}
}
@@ -1,5 +1,4 @@
/* iriz interface, English */ /* iriz interface, English */
"firstrun.accessibility.body" = "To paste the text into an email or a chat, macOS needs a separate permission. It's called \"Accessibility\"."; "firstrun.accessibility.body" = "To paste the text into an email or a chat, macOS needs a separate permission. It's called \"Accessibility\".";
"firstrun.accessibility.note" = "Without it I'll still turn your speech into text, but there'll be nowhere to put it. Find iriz in the list that opens and turn on the switch: the system won't let me do that for you."; "firstrun.accessibility.note" = "Without it I'll still turn your speech into text, but there'll be nowhere to put it. Find iriz in the list that opens and turn on the switch: the system won't let me do that for you.";
"firstrun.accessibility.title" = "Permission needed to paste text"; "firstrun.accessibility.title" = "Permission needed to paste text";
@@ -62,3 +61,206 @@
"firstrun.whereItLives.note" = "History, dictionary and settings open from there.\n\nI start up with your Mac. Don't want that? Turn it off in settings."; "firstrun.whereItLives.note" = "History, dictionary and settings open from there.\n\nI start up with your Mac. Don't want that? Turn it off in settings.";
"firstrun.whereItLives.title" = "I live in the menu bar"; "firstrun.whereItLives.title" = "I live in the menu bar";
"firstrun.windowTitle" = "Meet iriz"; "firstrun.windowTitle" = "Meet iriz";
"history.cancel" = "Cancel";
"history.clearAll" = "Clear everything";
"history.clearAllHint" = "Move every dictation to the Trash";
"history.clipboardNote" = "What you copy stays in the clipboard for 2 minutes, then the clipboard is cleared.";
"history.clipboardNoteVoice" = "What you copy stays in the clipboard for two minutes, then the clipboard is cleared";
"history.copy" = "Copy";
"history.copyButton" = "Copy";
"history.copyHint" = "Copy this text";
"history.emptyBody" = "Say something — the record will appear here.";
"history.emptyTitle" = "No dictations yet";
"history.insert" = "Paste";
"history.insertAgain" = "Paste again";
"history.insertAgainHint" = "Paste this text again";
"history.legendClose" = "close";
"history.legendCopy" = "copy";
"history.legendCopyTimed" = "copy · the clipboard clears in 2 min";
"history.legendDelete" = "delete — right-click";
"history.legendInsert" = "paste";
"history.notFoundBody" = "Try another word.";
"history.notFoundTitle" = "Nothing found";
"history.rescueTitle" = "Text that did not get pasted";
"history.searchClear" = "Clear the search";
"history.searchPlaceholder" = "Search the dictations";
"history.toTrash" = "Move to Trash";
"history.trashNote" = "The dictation folders go to the Trash — you can take them back from there.";
"history.trashOne" = "Move to Trash";
"menu.dictation" = "Dictation";
"menu.fixWord" = "Fix the word by hand";
"menu.history" = "Dictation history";
"menu.layout" = "Layout";
"menu.layoutGroup" = "Keyboard layout";
"menu.meetingStart" = "Record a meeting";
"menu.meetingStop" = "Stop recording the meeting";
"menu.mode" = "Mode";
"menu.modeGroup" = "Working mode";
"menu.prompt" = "Speech → prompt";
"menu.quit" = "Quit";
"menu.settings" = "Settings…";
"menu.welcome" = "Getting started…";
"history.close" = "Close the window";
"history.loading" = "Reading your dictations…";
"history.loadingBody" = "Showing the latest hundred. Search finds the rest.";
"settings.30Dney" = "30 days";
"settings.90Dney" = "90 days";
"settings.agent" = "Agent";
"settings.agentNeNayden" = "Agent not found";
"settings.avtopoisk" = "Find it for me";
"settings.chistitRech" = "Clean up the speech";
"settings.chtoProiznositsya" = "What you say";
"settings.diktovka" = "Dictation";
"settings.dobavitPrilozhenie" = "Add an app…";
"settings.dobavitPrimer" = "Add an example";
"settings.dobavitZagotovku" = "Add a snippet";
"settings.dobavitZamenu" = "Add a replacement";
"settings.eksportirovat" = "Export…";
"settings.gdeChistitsyaRech" = "Where the speech is cleaned";
"settings.god" = "A year";
"settings.hranitNadiktovki" = "Keep dictations";
"settings.importirovat" = "Import…";
"settings.ispolnitelPrompta" = "Who runs the prompt";
"settings.istoriya" = "History";
"settings.istoriyaNadiktovok" = "Dictation history";
"settings.kakRaspoznalos" = "What it heard";
"settings.kakSkazanoVsluh" = "Said out loud";
"settings.kakVyglyaditVolna" = "How the wave looks";
"settings.kakoyPromptNuzhen" = "The prompt you want";
"settings.klavishi" = "Keys";
"settings.konflikt" = "Conflict";
"settings.kopirovat" = "Copy";
"settings.mestoNaDiske" = "Disk space";
"settings.model" = "Model";
"settings.ms" = "ms";
"settings.naChtoMenyat" = "Replace it with";
"settings.naprimerQwen25Coder" = "for example, qwen2.5-coder:7b";
"settings.nastroykiSohraneny" = "Settings saved.";
"settings.neNayden" = "Not found";
"settings.nichego" = "Nothing";
"settings.otmena" = "Cancel";
"settings.perenesiteZapisiSyuda" = "Drop the recordings here";
"settings.perenos" = "Moving in";
"settings.perevodStroki" = "A line break";
"settings.plashka" = "The plate";
"settings.podrobnee" = "More";
"settings.poiskPoNadiktovkam" = "Search the dictations";
"settings.pokazat" = "Show";
"settings.polnyyPut" = "Full path";
"settings.posleVstavki" = "After pasting";
"settings.probel" = "A space";
"settings.promptRezhim" = "Prompt mode";
"settings.putKCli" = "Path to the CLI";
"settings.raskladka" = "layout";
"settings.raskladka2" = "Layout";
"settings.raspoznavatel" = "Recognizer";
"settings.rasshifrovkaFaylov" = "Transcribing files";
"settings.razmerPlashki" = "Plate size";
"settings.razmerPlashkiZapisi" = "Size of the recording plate";
"settings.razobratNeUdalos" = "Could not read it.";
"settings.razobratZapisi" = "Transcribe the recordings";
"settings.razobratZapisiVstrech" = "Transcribe the meeting recordings";
"settings.rezhimRaskladki" = "Layout mode";
"settings.sbrosit" = "Reset";
"settings.sbrositKZavodskim" = "Reset to factory";
"settings.sbrositNastroyki" = "Reset the settings?";
"settings.schitayu" = "Counting…";
"settings.slovarZamen" = "Replacements";
"settings.slovarZamenPust" = "No replacements yet";
"settings.sohranit" = "Save";
"settings.sohranitNastroyki" = "Save the settings";
"settings.spisokZagotovokPust" = "No snippets yet";
"settings.suffiksPosleVstavki" = "Suffix after pasting";
"settings.universalnyy" = "Universal";
"settings.vklyuchitPromptRezhim" = "Turn prompt mode on";
"settings.vsegda" = "Always";
"settings.vsego" = "Total";
"settings.vstrechi" = "Meetings";
"settings.vyberitePrilozhenie" = "Pick an app";
"settings.yazyk" = "Language";
"settings.yazykInterfeysa" = "Interface language";
"settings.zaderzhkaEnter" = "Enter delay";
"settings.zagotovki" = "Snippets";
"settings.zagotovokPokaNet" = "No snippets yet.";
"settings.zamenPokaNet" = "No replacements yet.";
"settings.zapisat" = "Record";
"settings.agentKotoryySobiraetPrompt" = "The agent that builds the prompt";
"settings.argumentyPoOdnomuV" = "Arguments — one per line";
"settings.argumentySvoegoCliPo" = "Arguments for your own CLI, one per line";
"settings.chegoVyHotiteOt" = "What you want the prompt to look like";
"settings.diktofonZvonokEksportIz" = "A voice memo, a call, an export from a meeting. The text lands next to the file.";
"settings.dobavitParuVSlovar" = "Add a pair to the replacements";
"settings.dobavitPrimerDlyaPrompt" = "Add an example for prompt mode";
"settings.dobavlenoVyberiteProfilI" = "Added. Pick a profile and press Save.";
"settings.eksportSlovaryaIZagotovok" = "Export replacements and snippets";
"settings.eksportirovatSlovarIZagotovki" = "Export the replacements and snippets to a file";
"settings.etaProgrammaUzheByla" = "This app is already on the list — there is one row for it, change the profile there.";
"settings.etotRezhimNeobyazatelenPrompt" = "This mode is optional. The prompt is built by the agent you pick, and the profile prepares the text for whoever will run that prompt. Leave the path empty and the app finds the agent itself. Plain dictation always stays on this Mac; only prompt mode sends the transcript out, and only to the agent you chose. Ollama is the one option that sends nothing: it computes right here. The finished prompt is pasted without being sent anywhere, and the quality is checked here too — a claim with no literal footing in what you said is rejected no matter which agent wrote it.";
"settings.faylObychnyyJsonEgo" = "The file is plain JSON, you can open it and edit it by hand. This is the only copy of your replacements: everything else lives in system settings and disappears with them. On import, entries that match by phrase are taken from the file, and the ones missing from the file stay where they are — import never deletes. A broken file is rejected whole, with the number of the bad entry: half a restored dictionary is worse than an honest refusal. What you import reaches the settings after you press Save.";
"settings.faylObychnyyJsonEgo2" = "The file is plain JSON, you can edit it by hand. This is the only copy of your replacements. On import, entries that match by phrase are taken from the file, the rest stay where they are, import never deletes. A broken file is rejected whole, with the number of the bad entry. What you import reaches the settings after you press Save";
"settings.identifikatorEtoyProgrammyRazobr" = "Could not read this app's identifier.";
"settings.importSlovaryaIZagotovok" = "Import replacements and snippets";
"settings.importirovatSlovarIZagotovki" = "Import replacements and snippets from a file";
"settings.ispolnitelGotovogoPromptaPo" = "Who runs the finished prompt by default";
"settings.kakVyglyaditVolnaNa" = "How the wave looks on the recording plate";
"settings.kakoyDvizhokRaspoznavaniyaRechi" = "Which speech engine to use";
"settings.knopkiOchistitVseZdes" = "There is no «clear everything» button here on purpose: pressed without looking, it costs more than the gigabyte it saves. Picking what to delete lives where you can see what you are deleting — in the history window.";
"settings.modelLokalnogoAgenta" = "Model of the local agent";
"settings.nazhmiteSohranitChtobyZapisat" = " Press Save to write it down.";
"settings.parakeetBystreeV11" = "Parakeet is 11–15 times faster, but it transliterates English terms inside a non-English phrase: git rebase comes back spelled the way it sounded. Whisper large-v3 keeps them in Latin (19 percent errors on mixed speech against 44), but a half-minute dictation waits about 16 seconds. Both compute on this Mac; nothing leaves it.";
"settings.perelivyTriTonaVokrug" = "Shimmer — three tones around the mode color. Calm — the same tones, half the spread. Mono — no shimmer at all. The palette does not change the mode color: plain dictation stays warm, prompt stays cold, otherwise the plate would not tell you what is being recorded.";
"settings.perelivyTriTonaVokrug2" = "Shimmer: three tones around the mode color. Calm: the same tones, half the spread. Mono: no shimmer. The palette does not change the mode color — dictation stays warm, prompt stays cold";
"settings.perenesiteZapisVstrechi" = "Drop the meeting recording here";
"settings.podrobnoePoyasnenieKSekcii" = "More about this section";
"settings.podstanovkaPromptPeredaetTekst" = "{prompt} passes the text as its own argument. Without it the prompt goes to standard input. No quotes needed";
"settings.podstanovkiPromptTekstPrompta" = "Placeholders: {prompt} — the prompt text as its own argument. Without {prompt} the prompt goes to standard input. The command line is not glued from strings, so no quotes are needed.";
"settings.pokaNichegoNeZanyato" = "Nothing is taking up space yet: no models, no dictations on the disk.";
"settings.pokaPustoNadiktovannoePoyavitsya" = "Empty for now. What you dictate will show up here.";
"settings.pokazyvatOknoEsliTekst" = "Show a window if the text did not get pasted";
"settings.pokazyvatOknoSTekstom" = "Show a window with the text when pasting fails";
"settings.profilVybiraetsyaPoPrilozheniyu" = "The profile is chosen by the app that is in front when you press the key. The window, the field and the text of that app are never read. The app is asked once and forgotten right away: the profile goes to the disk and the log, not the app's name. Apps outside the list get the default profile";
"settings.proiznesennayaFrazaZamenyaetsyaS" = "The phrase you say is replaced with the text you saved — that is how letterheads, details and standard wordings get pasted. The match is exact and on word boundaries: «sue» inside «issue» will not fire, and case does not matter. Snippets and replacements are applied in one pass, so the dictionary does not rewrite the snippet text afterwards. The raw transcript on the disk stays untouched, and prompt mode does not see snippets at all.";
"settings.proiznesennayaFrazaZamenyaetsyaS2" = "The phrase you say is replaced with the text you saved: letterheads, details, standard wordings. The match is exact and on word boundaries, case does not matter. Snippets and replacements are applied in one pass, the dictionary does not rewrite the snippet text. The raw transcript on the disk does not change, prompt mode does not see snippets";
"settings.promptRezhimNeobyazatelenPrompt" = "Prompt mode is optional. The prompt is built by the agent you pick, the profile prepares the text for whoever runs it. Leave the path empty and the app finds the agent itself. Plain dictation is always local. Only prompt mode sends the transcript out, and only to the agent you chose. Ollama computes on this Mac and sends nothing. The finished prompt is pasted without being sent, and a claim with no literal footing in what you said is rejected no matter the agent";
"settings.putKIspolnyaemomuFaylu" = "Path to the agent's executable";
"settings.rasshifrovkaIdetNaEtom" = "Transcription runs on this Mac with the same engine as dictation. The audio is never sent anywhere, and the file itself stays where it was.";
"settings.raznicaSDiktovkoyNazvana" = "The difference from dictation is stated plainly: a meeting keeps both the audio and the transcript. Plain dictation never keeps audio. The files sit on your disk in the clear with 0600 permissions: disk encryption is FileVault's job, not the app's.";
"settings.sbrositVseNastroykiK" = "Reset every setting to factory";
"settings.skopirovanoVBuferObmena" = "Copied to the clipboard.";
"settings.sochetaniePrimenyaetsyaSrazuPosl" = "The shortcut works right after you save. To undo a switch, press the conversion shortcut once more.";
"settings.sochetaniePrimenyaetsyaSrazuPosl2" = "The shortcut works right after you save. To undo a switch, press the conversion shortcut once more";
"settings.spisokPrilozheniyPustRabotaet" = "The app list is empty, the default profile is in use";
"settings.spisokPustPromptDlya" = "The list is empty — the prompt for any app is built from the profile above.";
"settings.svoiInstrukciiDlyaPrompt" = "Your own instructions for prompt mode";
"settings.uEtoyProgrammyNet" = "This app has no identifier — there is nothing to attach a profile to.";
"settings.vklyuchitDopolnitelnyyPromptRezh" = "Turn on the optional prompt mode";
"settings.vseSochetaniyaParametryZameny" = "Every shortcut, setting, replacement and snippet goes back to factory. This cannot be undone — export your replacements to a file first if you care about them.";
"settings.vybratPrilozhenieINaznachit" = "Pick an app and give it a profile";
"settings.yazykSmenitsyaPoslePerezapuska" = "The language changes after a restart.";
"settings.zaderzhkaEnterVMillisekundah" = "Enter delay in milliseconds";
"settings.zapisZasedaniyaIliSozvona" = "A hearing or a call. The minutes land next to it.";
"settings.zapuskatPriVhodeV" = "Start at login";
"settings.zavodskieNastroykiVosstanovleny" = "Factory settings restored.";
"hotkey.dictation" = "Dictation";
"hotkey.dictationEnter" = "Dictation with a line break";
"hotkey.history" = "History";
"hotkey.layoutConversion" = "Convert the layout";
"hotkey.layoutSwitch" = "Switch the layout";
"hotkey.prompt" = "Speech → prompt";
"section.appProfiles" = "Profile per app";
"section.appearance" = "The recording plate";
"section.behavior" = "Pasting and launch";
"section.corrections" = "Replacements";
"section.hotkeys" = "Keys";
"section.layout" = "Layout mode";
"section.promptGuidance" = "Your instructions and examples";
"section.promptMode" = "Prompt mode";
"section.snippets" = "Snippets";
"section.transfer" = "Replacements and snippets as a file";
"settings.avtoBeretYazykSistemy" = "«Auto» follows the system. Your own choice wins over it: macOS can be in English while you want the interface in Russian.\n\nA new language takes effect after you restart the app: the texts are built once, at launch.";
"settings.srokSchitaetsyaPoDate" = "The age is counted by the folder's date. Anything older goes at the next launch, quietly and without the Trash. «Always» turns the cleanup off completely.\n\nJunk is removed regardless of the age: an unpacked model archive that has its folder right next to it, and a quarantine older than a month. There is nothing to lose there — those are copies of what you already have.";
"key.left" = "left";
"key.right" = "right";
"firstrun.plate.title" = "The plate is always on screen";
"firstrun.plate.body" = "A glass drop sits at the bottom of your screen. While you are silent it stays small and does nothing. Start talking and a wave runs through it: that is the answer to «can it hear me».";
"firstrun.plate.note" = "Point at it with the mouse and the drop opens into a row of buttons: record, prompt, translate, language, history, settings. Click it and a panel with the text opens.\n\nYou can drag the plate: it snaps to one of twelve spots along the edges of the screen. There are three ways out of the open panel — the cross, Escape, and a click past the buttons.";
@@ -62,3 +62,206 @@
"firstrun.whereItLives.note" = "历史记录、词库和设置都从那里打开。\n\n我会跟着 Mac 一起启动。不需要的话,在设置里关掉。"; "firstrun.whereItLives.note" = "历史记录、词库和设置都从那里打开。\n\n我会跟着 Mac 一起启动。不需要的话,在设置里关掉。";
"firstrun.whereItLives.title" = "我住在菜单栏里"; "firstrun.whereItLives.title" = "我住在菜单栏里";
"firstrun.windowTitle" = "认识 iriz"; "firstrun.windowTitle" = "认识 iriz";
"history.cancel" = "取消";
"history.clearAll" = "全部清除";
"history.clearAllHint" = "把所有口述记录移到废纸篓";
"history.clipboardNote" = "拷贝的内容会在剪贴板里保留 2 分钟,之后剪贴板会被清空。";
"history.clipboardNoteVoice" = "拷贝的内容会在剪贴板里保留两分钟,之后剪贴板会被清空";
"history.copy" = "拷贝";
"history.copyButton" = "拷贝";
"history.copyHint" = "拷贝这段文字";
"history.emptyBody" = "说点什么——记录就会出现在这里。";
"history.emptyTitle" = "还没有口述记录";
"history.insert" = "粘贴";
"history.insertAgain" = "再粘贴一次";
"history.insertAgainHint" = "把这段文字再粘贴一次";
"history.legendClose" = "关闭";
"history.legendCopy" = "拷贝";
"history.legendCopyTimed" = "拷贝 · 剪贴板 2 分钟后清空";
"history.legendDelete" = "删除——右键点按";
"history.legendInsert" = "粘贴";
"history.notFoundBody" = "换一个词试试。";
"history.notFoundTitle" = "没有找到";
"history.rescueTitle" = "没有粘贴上的文字";
"history.searchClear" = "清除搜索";
"history.searchPlaceholder" = "搜索口述记录";
"history.toTrash" = "移到废纸篓";
"history.trashNote" = "口述文件夹会移到废纸篓,之后还能从那里取回。";
"history.trashOne" = "移到废纸篓";
"menu.dictation" = "口述";
"menu.fixWord" = "手动修正这个词";
"menu.history" = "口述记录";
"menu.layout" = "键盘布局";
"menu.layoutGroup" = "键盘布局";
"menu.meetingStart" = "录制会议";
"menu.meetingStop" = "停止录制会议";
"menu.mode" = "模式";
"menu.modeGroup" = "工作模式";
"menu.prompt" = "语音 → 提示词";
"menu.quit" = "退出";
"menu.settings" = "设置…";
"menu.welcome" = "开始使用…";
"history.close" = "关闭窗口";
"history.loading" = "正在读取口述记录…";
"history.loadingBody" = "先显示最近一百条,其余的用搜索找。";
"settings.30Dney" = "30 天";
"settings.90Dney" = "90 天";
"settings.agent" = "代理";
"settings.agentNeNayden" = "没有找到代理";
"settings.avtopoisk" = "自动查找";
"settings.chistitRech" = "清理口语";
"settings.chtoProiznositsya" = "你说的话";
"settings.diktovka" = "口述";
"settings.dobavitPrilozhenie" = "添加应用…";
"settings.dobavitPrimer" = "添加示例";
"settings.dobavitZagotovku" = "添加片段";
"settings.dobavitZamenu" = "添加替换";
"settings.eksportirovat" = "导出…";
"settings.gdeChistitsyaRech" = "在哪里清理口语";
"settings.god" = "一年";
"settings.hranitNadiktovki" = "保留口述记录";
"settings.importirovat" = "导入…";
"settings.ispolnitelPrompta" = "由谁执行提示词";
"settings.istoriya" = "历史";
"settings.istoriyaNadiktovok" = "口述记录";
"settings.kakRaspoznalos" = "识别结果";
"settings.kakSkazanoVsluh" = "你说出的话";
"settings.kakVyglyaditVolna" = "声波的样子";
"settings.kakoyPromptNuzhen" = "你想要的提示词";
"settings.klavishi" = "按键";
"settings.konflikt" = "冲突";
"settings.kopirovat" = "拷贝";
"settings.mestoNaDiske" = "磁盘占用";
"settings.model" = "模型";
"settings.ms" = "毫秒";
"settings.naChtoMenyat" = "替换成";
"settings.naprimerQwen25Coder" = "例如 qwen2.5-coder:7b";
"settings.nastroykiSohraneny" = "设置已存储。";
"settings.neNayden" = "未找到";
"settings.nichego" = "不加";
"settings.otmena" = "取消";
"settings.perenesiteZapisiSyuda" = "把录音拖到这里";
"settings.perenos" = "迁移";
"settings.perevodStroki" = "换行";
"settings.plashka" = "浮窗";
"settings.podrobnee" = "详情";
"settings.poiskPoNadiktovkam" = "搜索口述记录";
"settings.pokazat" = "显示";
"settings.polnyyPut" = "完整路径";
"settings.posleVstavki" = "粘贴之后";
"settings.probel" = "空格";
"settings.promptRezhim" = "提示词模式";
"settings.putKCli" = "命令行工具路径";
"settings.raskladka" = "键盘布局";
"settings.raskladka2" = "键盘布局";
"settings.raspoznavatel" = "识别引擎";
"settings.rasshifrovkaFaylov" = "转写文件";
"settings.razmerPlashki" = "浮窗大小";
"settings.razmerPlashkiZapisi" = "录音浮窗的大小";
"settings.razobratNeUdalos" = "无法解析。";
"settings.razobratZapisi" = "转写这些录音";
"settings.razobratZapisiVstrech" = "转写会议录音";
"settings.rezhimRaskladki" = "布局模式";
"settings.sbrosit" = "重置";
"settings.sbrositKZavodskim" = "恢复出厂设置";
"settings.sbrositNastroyki" = "要重置设置吗?";
"settings.schitayu" = "正在统计…";
"settings.slovarZamen" = "替换词典";
"settings.slovarZamenPust" = "还没有替换";
"settings.sohranit" = "存储";
"settings.sohranitNastroyki" = "存储设置";
"settings.spisokZagotovokPust" = "还没有片段";
"settings.suffiksPosleVstavki" = "粘贴后追加";
"settings.universalnyy" = "通用";
"settings.vklyuchitPromptRezhim" = "开启提示词模式";
"settings.vsegda" = "一直保留";
"settings.vsego" = "总计";
"settings.vstrechi" = "会议";
"settings.vyberitePrilozhenie" = "选择应用";
"settings.yazyk" = "语言";
"settings.yazykInterfeysa" = "界面语言";
"settings.zaderzhkaEnter" = "回车延迟";
"settings.zagotovki" = "片段";
"settings.zagotovokPokaNet" = "还没有片段。";
"settings.zamenPokaNet" = "还没有替换。";
"settings.zapisat" = "录制";
"settings.agentKotoryySobiraetPrompt" = "负责生成提示词的代理";
"settings.argumentyPoOdnomuV" = "参数——每行一个";
"settings.argumentySvoegoCliPo" = "你自己命令行工具的参数,每行一个";
"settings.avtoBeretYazykSistemy" = "“自动”跟随系统语言。你手动选的优先:macOS 可以是英文,而界面你想用中文。\n\n换语言需要重新启动应用才生效:文本在启动时只生成一次。";
"settings.chegoVyHotiteOt" = "你希望提示词写成什么样";
"settings.diktofonZvonokEksportIz" = "录音笔、通话、会议导出。文字会放在文件旁边。";
"settings.dobavitParuVSlovar" = "向替换词典添加一组";
"settings.dobavitPrimerDlyaPrompt" = "为提示词模式添加示例";
"settings.dobavlenoVyberiteProfilI" = "已添加。选择配置后点“存储”。";
"settings.eksportSlovaryaIZagotovok" = "导出替换词典和片段";
"settings.eksportirovatSlovarIZagotovki" = "把替换词典和片段导出到文件";
"settings.etaProgrammaUzheByla" = "这个应用已经在列表里了——只有一行,直接在那行改配置。";
"settings.etotRezhimNeobyazatelenPrompt" = "这个模式是可选的。提示词由你选的代理生成,配置负责把文字准备好交给执行它的人。路径留空就自动查找。普通口述始终留在本机;只有提示词模式会把转写内容送出去,而且只送给你选的那个代理。Ollama 是唯一什么都不发送的选项:它在这台 Mac 上计算。生成好的提示词直接粘贴,不会被发送;质量也在这里检查——没有原话依据的说法一律驳回,不管是哪个代理写的。";
"settings.faylObychnyyJsonEgo" = "文件就是普通的 JSON,可以打开手动修改。这是替换词典的唯一副本:其余都存在系统设置里,会随设置一起消失。导入时,短语相同的条目以文件为准,文件里没有的条目原样保留——导入不会删除任何内容。文件有问题就整份拒绝,并指出出错的条目序号:恢复一半的词典比老实拒绝更糟。导入的内容在你点“存储”之后才写入设置。";
"settings.faylObychnyyJsonEgo2" = "文件就是普通的 JSON,可以手动修改。这是替换词典的唯一副本。导入时短语相同的条目以文件为准,其余原样保留,导入不会删除任何内容。文件有问题就整份拒绝,并指出出错的条目序号。导入的内容在你点“存储”之后才写入设置";
"settings.identifikatorEtoyProgrammyRazobr" = "无法读取这个应用的标识符。";
"settings.importSlovaryaIZagotovok" = "导入替换词典和片段";
"settings.importirovatSlovarIZagotovki" = "从文件导入替换词典和片段";
"settings.ispolnitelGotovogoPromptaPo" = "默认由谁执行生成好的提示词";
"settings.kakVyglyaditVolnaNa" = "录音浮窗上声波的样子";
"settings.kakoyDvizhokRaspoznavaniyaRechi" = "使用哪个语音识别引擎";
"settings.knopkiOchistitVseZdes" = "这里故意没有“全部清除”按钮:不看就按,代价比省下的那点空间高得多。要挑着删,去看得见删的是什么的地方——历史窗口。";
"settings.modelLokalnogoAgenta" = "本地代理使用的模型";
"settings.nazhmiteSohranitChtobyZapisat" = " 点“存储”写入。";
"settings.parakeetBystreeV11" = "Parakeet 快 11–15 倍,但会把非英语句子里的英文术语按读音音译掉:git rebase 会被写成它听起来的样子。Whisper large-v3 保留拉丁字母(混合语音错误率 19% 对 44%),代价是半分钟的口述要等约 16 秒。两者都在这台 Mac 上计算,什么都不会外传。";
"settings.perelivyTriTonaVokrug" = "流光——围绕模式颜色的三个色调。平静——同样的色调,幅度减半。单色——完全没有流光。调色板不改变模式颜色:普通口述保持暖色,提示词保持冷色,否则光看浮窗就分不清在录什么。";
"settings.perelivyTriTonaVokrug2" = "流光:围绕模式颜色的三个色调。平静:同样的色调,幅度减半。单色:没有流光。调色板不改变模式颜色——口述保持暖色,提示词保持冷色";
"settings.perenesiteZapisVstrechi" = "把会议录音拖到这里";
"settings.podrobnoePoyasnenieKSekcii" = "关于这一节的详细说明";
"settings.podstanovkaPromptPeredaetTekst" = "{prompt} 会把文本作为单独的参数传过去。不写它,提示词就走标准输入。不需要引号";
"settings.podstanovkiPromptTekstPrompta" = "占位符:{prompt} —— 把提示词文本作为单独的参数。不写 {prompt},提示词就走标准输入。命令行不是拼字符串拼出来的,所以不需要引号。";
"settings.pokaNichegoNeZanyato" = "目前没有占用空间:磁盘上既没有模型,也没有口述记录。";
"settings.pokaPustoNadiktovannoePoyavitsya" = "暂时是空的。你口述的内容会出现在这里。";
"settings.pokazyvatOknoEsliTekst" = "文字没能粘贴时显示窗口";
"settings.pokazyvatOknoSTekstom" = "粘贴失败时显示带文字的窗口";
"settings.profilVybiraetsyaPoPrilozheniyu" = "按你按下按键时最前面的那个应用选配置。那个应用的窗口、输入框和文字都不会被读取。应用只问一次,问完立刻忘掉:写到磁盘和日志里的是配置,不是应用名称。不在列表里的应用用默认配置";
"settings.proiznesennayaFrazaZamenyaetsyaS" = "你说出的短语会被换成你存好的文本——抬头、要素、固定说法就是这么粘上去的。匹配是精确的,并且按词边界:一个词出现在另一个更长的词里面不会触发,大小写也无关。片段和替换词典一次性完成,所以词典不会再去改写片段的文本。磁盘上的原始转写保持不动,提示词模式完全看不到片段。";
"settings.proiznesennayaFrazaZamenyaetsyaS2" = "你说出的短语会被换成你存好的文本:抬头、要素、固定说法。匹配精确并按词边界,大小写无关。片段和词典一次性完成,词典不会改写片段文本。磁盘上的原始转写不变,提示词模式看不到片段";
"settings.promptRezhimNeobyazatelenPrompt" = "提示词模式是可选的。提示词由你选的代理生成,配置负责把文字准备好交给执行的人。路径留空就自动查找。普通口述始终在本机。只有提示词模式会把转写送出去,而且只送给你选的代理。Ollama 在这台 Mac 上计算,什么都不发送。生成好的提示词直接粘贴,不会被发送;没有原话依据的说法一律驳回,不管是哪个代理";
"settings.putKIspolnyaemomuFaylu" = "代理可执行文件的路径";
"settings.rasshifrovkaIdetNaEtom" = "转写在这台 Mac 上进行,用的是和口述同一个引擎。声音不会发到任何地方,文件本身也留在原处。";
"settings.raznicaSDiktovkoyNazvana" = "和口述的区别说清楚:会议会同时保留声音和转写。普通口述从不保留声音。文件以明文存在你的磁盘上,权限 0600:磁盘加密是 FileVault 的事,不是应用的事。";
"settings.sbrositVseNastroykiK" = "把所有设置恢复为出厂值";
"settings.skopirovanoVBuferObmena" = "已拷贝到剪贴板。";
"settings.sochetaniePrimenyaetsyaSrazuPosl" = "快捷键存储后立即生效。要撤销一次切换,再按一次转换快捷键。";
"settings.sochetaniePrimenyaetsyaSrazuPosl2" = "快捷键存储后立即生效。要撤销一次切换,再按一次转换快捷键";
"settings.spisokPrilozheniyPustRabotaet" = "应用列表为空,使用默认配置";
"settings.spisokPustPromptDlya" = "列表为空——任何应用的提示词都按上面的配置生成。";
"settings.srokSchitaetsyaPoDate" = "时间按文件夹的日期算。更早的会在下次启动时删掉,安静地删,不进废纸篓。“一直保留”会完全关掉清理。\n\n垃圾不受这个期限约束,一律清理:旁边已经有解压文件夹的模型压缩包,以及超过一个月的隔离目录。那里没什么可丢的——都是已有内容的副本。";
"settings.svoiInstrukciiDlyaPrompt" = "你自己给提示词模式的指令";
"settings.uEtoyProgrammyNet" = "这个应用没有标识符——没有东西可以绑定配置。";
"settings.vklyuchitDopolnitelnyyPromptRezh" = "开启可选的提示词模式";
"settings.vseSochetaniyaParametryZameny" = "所有快捷键、参数、替换和片段都会恢复出厂值。这个操作无法撤销——如果词典对你重要,先导出到文件。";
"settings.vybratPrilozhenieINaznachit" = "选择一个应用并给它指定配置";
"settings.yazykSmenitsyaPoslePerezapuska" = "语言会在重新启动后切换。";
"settings.zaderzhkaEnterVMillisekundah" = "回车延迟(毫秒)";
"settings.zapisZasedaniyaIliSozvona" = "庭审或通话的录音。纪要会放在旁边。";
"settings.zapuskatPriVhodeV" = "登录时启动";
"settings.zavodskieNastroykiVosstanovleny" = "已恢复出厂设置。";
"hotkey.dictation" = "口述";
"hotkey.dictationEnter" = "口述并换行";
"hotkey.history" = "历史";
"hotkey.layoutConversion" = "转换键盘布局";
"hotkey.layoutSwitch" = "切换键盘布局";
"hotkey.prompt" = "语音 → 提示词";
"section.appProfiles" = "按应用的配置";
"section.appearance" = "录音浮窗";
"section.behavior" = "粘贴与启动";
"section.corrections" = "替换词典";
"section.hotkeys" = "按键";
"section.layout" = "布局模式";
"section.promptGuidance" = "你的指令和示例";
"section.promptMode" = "提示词模式";
"section.snippets" = "片段";
"section.transfer" = "用文件导入导出";
"key.left" = "左";
"key.right" = "右";
"firstrun.plate.title" = "浮窗一直在屏幕上";
"firstrun.plate.body" = "屏幕下方有一颗玻璃小水滴。你不说话时它很小,什么也不做。一开口,里面就有声波流动:这就是“它有没有听见我”的答案。";
"firstrun.plate.note" = "把鼠标移上去,水滴会展开成一排按钮:录音、提示词、翻译、语言、历史、设置。点一下,会打开带文字的面板。\n\n浮窗可以拖动,它会吸附到屏幕边缘十二个位置之一。展开的面板有三种关法——叉号、Escape,以及点在按钮以外的地方。";
@@ -143,6 +143,16 @@ public final class DictationController {
log("WARNING: registry override env var(s) set: \(hostile.joined(separator: ", ")) — ignored, offline enforced") log("WARNING: registry override env var(s) set: \(hostile.joined(separator: ", ")) — ignored, offline enforced")
} }
// Уборка ПЕРЕД работой и в фоне: продукт не имеет права копить мусор на
// чужом диске. Повод измеренный - 06.09.2026 диск владельца встал на
// нуле байт, и 1,1 ГБ из этого был архив, распакованный каталог
// которого лежал рядом. В фоне потому, что обход тысячи каталогов не
// имеет права задерживать первое нажатие клавиши.
let retention = settings.dictationRetentionDays
DispatchQueue.global(qos: .utility).async {
dictationHousekeepingRun(retentionDays: retention)
}
wireLearning() wireLearning()
wireHotkeys() wireHotkeys()
wireAudioConfigurationRecovery() wireAudioConfigurationRecovery()
@@ -82,6 +82,16 @@ public func captureDictationHUDPlateScenes(to directory: URL) throws -> [URL] {
settle: 0.9), settle: 0.9),
] ]
// Место плашки владельца прибор ОБЯЗАН вернуть. Сцена переноса тащит её в
// угол и отпускает, а отпускание сохраняет новое место в настройках - то
// есть прибор молча переставлял плашку владельцу при каждой съёмке. Видно
// это стало на пяти прогонах подряд: кадр «на записи» расходился на 97,8 %
// пикселей, потому что плашка каждый раз стояла в другом месте и стекло
// преломляло другой кусок подложки.
let settings = DictationSettings.shared
let ownerAnchor = settings.dictationHUDAnchor
defer { settings.dictationHUDAnchor = ownerAnchor }
var written: [URL] = [] var written: [URL] = []
for dark in [false, true] { for dark in [false, true] {
let surface = DictationHUDPanelSurface() let surface = DictationHUDPanelSurface()
@@ -20,7 +20,11 @@ final class DictationHUDStripView: NSView {
} }
var onAction: ((DictationHUDActionID) -> Void)? var onAction: ((DictationHUDActionID) -> Void)?
/// Что сейчас под мышью. `nil` - ничего. /// Что сейчас под мышью. `nil` - ничего.
var onHover: ((DictationHUDAction?) -> Void)? /// Что под мышью и ГДЕ оно стоит. Кадр кнопки нужен подписи: без него она
/// центрируется по всей плашке и у крайних кнопок читается съехавшей -
/// поймано владельцем на кадре 06.09.2026 («тут тоже видно, как всё
/// съехало, там, где шестерёнка»).
var onHover: ((DictationHUDAction?, CGRect?) -> Void)?
/// Плашка стоит боком - ряд идёт столбиком. Решение владельца: «если это /// Плашка стоит боком - ряд идёт столбиком. Решение владельца: «если это
/// сбоку примагничивание, значит должна быть раскладка боком». /// сбоку примагничивание, значит должна быть раскладка боком».
var vertical: Bool = false { didSet { needsLayout = true } } var vertical: Bool = false { didSet { needsLayout = true } }
@@ -48,7 +52,9 @@ final class DictationHUDStripView: NSView {
buttons = actions.map { action in buttons = actions.map { action in
let button = DictationHUDActionButton(action: action) let button = DictationHUDActionButton(action: action)
button.onPress = { [weak self] id in self?.onAction?(id) } button.onPress = { [weak self] id in self?.onAction?(id) }
button.onHover = { [weak self] action in self?.onHover?(action) } button.onHover = { [weak self, weak button] action in
self?.onHover?(action, action == nil ? nil : button?.frame)
}
addSubview(button) addSubview(button)
return button return button
} }
+19 -3
View File
@@ -227,6 +227,8 @@ final class DictationHUDPanelSurface: NSObject, DictationHUDSurface, DictationHU
/// подсказка при наведении: заводить второй вид ради одной строки значило /// подсказка при наведении: заводить второй вид ради одной строки значило
/// бы держать два способа сказать одно и то же. /// бы держать два способа сказать одно и то же.
private var stripLabel: String? private var stripLabel: String?
/// Над какой точкой плашки стоит подпись. `nil` - по середине плашки.
private var stripLabelAnchorX: CGFloat?
private var openToggledHandler: (() -> Void)? private var openToggledHandler: (() -> Void)?
@@ -935,7 +937,9 @@ final class DictationHUDPanelSurface: NSObject, DictationHUDSurface, DictationHU
container.addSubview(hint) container.addSubview(hint)
let strip = DictationHUDStripView(frame: .zero) let strip = DictationHUDStripView(frame: .zero)
strip.onAction = { [weak self] id in self?.performAction(id) } strip.onAction = { [weak self] id in self?.performAction(id) }
strip.onHover = { [weak self] action in self?.showStripLabel(action?.title) } strip.onHover = { [weak self] action, frame in
self?.showStripLabel(action?.title, over: frame)
}
strip.isHidden = true strip.isHidden = true
if #available(macOS 26.0, *) { if #available(macOS 26.0, *) {
@@ -1049,7 +1053,10 @@ final class DictationHUDPanelSurface: NSObject, DictationHUDSurface, DictationHU
/// Владелец: «должно быть понимание, что это такое. То есть просто так по /// Владелец: «должно быть понимание, что это такое. То есть просто так по
/// значкам непонятно». Значок сам себя не объясняет никому, кроме того, /// значкам непонятно». Значок сам себя не объясняет никому, кроме того,
/// кто его рисовал. /// кто его рисовал.
private func showStripLabel(_ title: String?) { private func showStripLabel(_ title: String?, over button: CGRect? = nil) {
// Середина кнопки в координатах плашки. Полоска перевёрнута, а окно нет,
// но по горизонтали это неважно: подпись двигается только вбок.
stripLabelAnchorX = button.map(\.midX)
guard stripLabel != title else { return } guard stripLabel != title else { return }
stripLabel = title stripLabel = title
hint?.lines = title.map { [$0] } ?? [] hint?.lines = title.map { [$0] } ?? []
@@ -1651,7 +1658,16 @@ final class DictationHUDPanelSurface: NSObject, DictationHUDSurface, DictationHU
let hintY = hintOpensBelow let hintY = hintOpensBelow
? slide ? slide
: collapsedSize.height + DICTATION_HUD_HINT_GAP - slide : collapsedSize.height + DICTATION_HUD_HINT_GAP - slide
hint.frame = CGRect(x: (width - hintSize.width) / 2, // Подпись стоит НАД СВОЕЙ кнопкой, а не по середине плашки. Кромку она
// при этом не переходит: у крайних кнопок подпись шире их самих, и без
// упора она уезжала бы за стекло.
let hintX: CGFloat
if let anchor = stripLabelAnchorX, hintSize.width < width {
hintX = min(max(0, anchor - hintSize.width / 2), width - hintSize.width)
} else {
hintX = (width - hintSize.width) / 2
}
hint.frame = CGRect(x: hintX,
y: hintY, y: hintY,
width: hintSize.width, width: hintSize.width,
height: hintSize.height) height: hintSize.height)
+28 -3
View File
@@ -49,17 +49,42 @@ public struct DictationHistoryEntry: Equatable, Identifiable {
/// Правила отбора те же, что у перечислителя промпт-режима: только подкаталоги, /// Правила отбора те же, что у перечислителя промпт-режима: только подкаталоги,
/// только с `raw.txt`, скрытые пропускаются. Иначе история и промпт-режим /// только с `raw.txt`, скрытые пропускаются. Иначе история и промпт-режим
/// разошлись бы в том, что считается надиктовкой. /// разошлись бы в том, что считается надиктовкой.
public func dictationHistoryEntries(in dictationsRoot: URL, /// Сколько надиктовок показывается в окне. Решение владельца 06.09.2026:
fileManager: FileManager = .default) -> [DictationHistoryEntry] { /// «просматривать можно будет только последние, например, 100… чтобы летало».
///
/// Потолок стоит на ЧТЕНИИ, а не на показе готового списка: замер дал 2047
/// записей за 1386 мс, и стоили эти миллисекунды не рисование, а шесть тысяч
/// чтений с диска. Сотня свежих обходится тремя сотнями чтений.
public let DICTATION_HISTORY_VISIBLE_LIMIT = 100
/// Сколько надиктовок хранится. Что старше - убирает уборка.
/// «Пусть 500 последних» - слова владельца там же.
public let DICTATION_HISTORY_KEEP_LIMIT = 500
/// Имена каталогов надиктовок - метки времени, поэтому свежесть считается
/// СРАВНЕНИЕМ ИМЁН, а не датой файла: дата меняется от касания, имя не меняется
/// никогда.
public func dictationHistoryDirectories(in dictationsRoot: URL,
fileManager: FileManager = .default) -> [URL] {
let urls = (try? fileManager.contentsOfDirectory( let urls = (try? fileManager.contentsOfDirectory(
at: dictationsRoot, at: dictationsRoot,
includingPropertiesForKeys: [.isDirectoryKey], includingPropertiesForKeys: [.isDirectoryKey],
options: [.skipsHiddenFiles] options: [.skipsHiddenFiles]
)) ?? [] )) ?? []
return urls return urls
.filter { (try? $0.resourceValues(forKeys: [.isDirectoryKey]).isDirectory) == true } .filter { (try? $0.resourceValues(forKeys: [.isDirectoryKey]).isDirectory) == true }
.sorted { $0.lastPathComponent > $1.lastPathComponent } .sorted { $0.lastPathComponent > $1.lastPathComponent }
}
public func dictationHistoryEntries(in dictationsRoot: URL,
limit: Int? = nil,
fileManager: FileManager = .default) -> [DictationHistoryEntry] {
var directories = dictationHistoryDirectories(in: dictationsRoot, fileManager: fileManager)
// Обрезаем ДО чтения содержимого: смысл потолка в том, чтобы не открывать
// тысячи файлов, а не в том, чтобы открыть их и показать сотню.
if let limit, directories.count > limit { directories = Array(directories.prefix(limit)) }
return directories
.compactMap { directory -> DictationHistoryEntry? in .compactMap { directory -> DictationHistoryEntry? in
let rawURL = directory.appendingPathComponent(DICTATION_RAW_FILE_NAME) let rawURL = directory.appendingPathComponent(DICTATION_RAW_FILE_NAME)
guard let data = fileManager.contents(atPath: rawURL.path), guard let data = fileManager.contents(atPath: rawURL.path),
+140 -36
View File
@@ -61,12 +61,12 @@ final class DictationHistoryPresenter {
private func present(rescue: DictationRescue?) { private func present(rescue: DictationRescue?) {
let entries: [DictationHistoryEntry] let entries: [DictationHistoryEntry]
if rescue == nil { if rescue == nil {
do { // Список читается ПОСЛЕ показа окна, в фоне. Владелец: «открываю
entries = dictationHistoryEntries(in: try dictationsRoot()) // историю, и он как будто зависает». Замер подтвердил: 2047 записей
} catch { // на диске - это 2047 каталогов и по три файла в каждом, шесть
log("history: cannot reach dictations directory: \(error.localizedDescription)") // тысяч чтений, 1386 мс НА ГЛАВНОМ ПОТОКЕ. Всё это время окно не
return // рисуется вовсе, потому что рисовать его некому.
} entries = []
} else { } else {
// В режиме спасения список не показывается, и читать каталог незачем. // В режиме спасения список не показывается, и читать каталог незачем.
// Важнее другое: недоступный каталог НЕ имеет права отменить показ. // Важнее другое: недоступный каталог НЕ имеет права отменить показ.
@@ -100,6 +100,7 @@ final class DictationHistoryPresenter {
model.onCopy = { [weak self] entry in self?.copy(text: entry.displayText) } model.onCopy = { [weak self] entry in self?.copy(text: entry.displayText) }
model.onDelete = { [weak self] entry in self?.delete(entry) } model.onDelete = { [weak self] entry in self?.delete(entry) }
model.onClearAll = { [weak self] in self?.clearAll() } model.onClearAll = { [weak self] in self?.clearAll() }
model.onCloseWindow = { [weak self] in self?.close(returningFocus: true) }
model.onInsertRescue = { [weak self] in self?.insertRescue() } model.onInsertRescue = { [weak self] in self?.insertRescue() }
model.onCopyRescue = { [weak self] in self?.copyRescue() } model.onCopyRescue = { [weak self] in self?.copyRescue() }
@@ -114,6 +115,14 @@ final class DictationHistoryPresenter {
// Поля поиска в режиме спасения нет — фокусировать нечего. // Поля поиска в режиме спасения нет — фокусировать нечего.
model.focusSearchField = rescue == nil model.focusSearchField = rescue == nil
installKeyMonitor() installKeyMonitor()
if rescue == nil {
model.didLoadAll = false
model.onSearchStarted = { [weak self, weak model] in
guard let self, let model else { return }
self.loadAllForSearch(into: model)
}
loadEntriesInBackground(into: model)
}
if let rescue { if let rescue {
// Ни имени приложения, ни самого текста в логе: лог живёт на диске // Ни имени приложения, ни самого текста в логе: лог живёт на диске
// постоянно, а это речь клиента. Длины и класса провала для отладки // постоянно, а это речь клиента. Длины и класса провала для отладки
@@ -124,6 +133,55 @@ final class DictationHistoryPresenter {
} }
} }
/// Прочитать надиктовки с диска и отдать их окну, когда прочитаются.
///
/// Отдельным ходом, а не внутри показа: чтение занимает секунды на большом
/// каталоге, а окно обязано открыться мгновенно. Пока список едет, в окне
/// стоит честная строка «Читаю надиктовки…», а не пустота, которую легко
/// прочитать как «ничего нет».
private func loadEntriesInBackground(into model: DictationHistoryModel) {
model.isLoading = true
let root = try? dictationsRoot()
guard let root else {
model.isLoading = false
log("history: cannot reach dictations directory")
return
}
Task.detached(priority: .userInitiated) {
let startedAt = ProcessInfo.processInfo.systemUptime
let found = dictationHistoryEntries(in: root, limit: DICTATION_HISTORY_VISIBLE_LIMIT)
let spent = (ProcessInfo.processInfo.systemUptime - startedAt) * 1000
await MainActor.run {
model.load(found)
model.isLoading = false
log(String(format: "history: %d записей прочитано за %.0f мс (в фоне)",
found.count, spent))
}
}
}
/// Догрузить остальное хранимое - по первому же поиску.
///
/// Окно открывается сотней свежих: их хватает, чтобы забрать вчерашнее.
/// Но поиск по сотне врал бы молча - человек ищет фразу, которая лежит
/// двухсотой, и получает «ничего не нашлось». Поэтому первый ввод в поле
/// поиска дочитывает всё, что хранится, и делает это один раз за показ.
private func loadAllForSearch(into model: DictationHistoryModel) {
guard !model.didLoadAll else { return }
model.didLoadAll = true
guard let root = try? dictationsRoot() else { return }
Task.detached(priority: .userInitiated) {
let startedAt = ProcessInfo.processInfo.systemUptime
let found = dictationHistoryEntries(in: root, limit: DICTATION_HISTORY_KEEP_LIMIT)
let spent = (ProcessInfo.processInfo.systemUptime - startedAt) * 1000
await MainActor.run {
model.load(found)
log(String(format: "history: поиск дочитал %d записей за %.0f мс",
found.count, spent))
}
}
}
private func makePanel(model: DictationHistoryModel) -> DictationHistoryPanel { private func makePanel(model: DictationHistoryModel) -> DictationHistoryPanel {
let panel = DictationHistoryPanel( let panel = DictationHistoryPanel(
contentRect: historyPanelFrame(), contentRect: historyPanelFrame(),
@@ -360,9 +418,9 @@ final class DictationHistoryPresenter {
let alert = NSAlert() let alert = NSAlert()
alert.alertStyle = .warning alert.alertStyle = .warning
alert.messageText = dictationHistoryClearConfirmation(count: doomed.count) alert.messageText = dictationHistoryClearConfirmation(count: doomed.count)
alert.informativeText = "Папки надиктовок уедут в Корзину — оттуда их можно вернуть." alert.informativeText = L("history.trashNote", "Папки надиктовок уедут в Корзину — оттуда их можно вернуть.")
alert.addButton(withTitle: "В Корзину") alert.addButton(withTitle: L("history.toTrash", "В Корзину"))
alert.addButton(withTitle: "Отмена") alert.addButton(withTitle: L("history.cancel", "Отмена"))
// Листом на панель, а не runModal(): панель на уровне .floating, и // Листом на панель, а не runModal(): панель на уровне .floating, и
// отдельное модальное окно системного уровня ушло бы ПОД неё — // отдельное модальное окно системного уровня ушло бы ПОД неё —
@@ -487,10 +545,25 @@ private final class DictationHistoryPanel: NSPanel {
final class DictationHistoryModel: ObservableObject { final class DictationHistoryModel: ObservableObject {
@Published private(set) var entries: [DictationHistoryEntry] = [] @Published private(set) var entries: [DictationHistoryEntry] = []
@Published var query: String = "" { @Published var query: String = "" {
didSet { guard query != oldValue else { return }; clampSelection() } didSet {
guard query != oldValue else { return }
clampSelection()
// Первый же символ запроса дочитывает всё хранимое: искать по
// видимой сотне значит молча врать «ничего не нашлось».
if !query.isEmpty { onSearchStarted?() }
}
} }
@Published private(set) var selection: Int = 0 @Published private(set) var selection: Int = 0
@Published var focusSearchField = false @Published var focusSearchField = false
/// Список ещё читается с диска. Отдельный признак, а не пустой список:
/// «пока ничего нет» и «ещё не прочитал» - разные вещи, и путать их значит
/// врать владельцу, у которого две тысячи надиктовок.
@Published var isLoading = false
/// Дочитано ли всё хранимое. Показ начинается с сотни свежих; поиск
/// дочитывает остальное один раз.
var didLoadAll = false
/// Кого звать, когда владелец начал искать.
var onSearchStarted: (() -> Void)?
/// Не `nil` — окно показывает не список, а текст, который не доехал до поля. /// Не `nil` — окно показывает не список, а текст, который не доехал до поля.
@Published private(set) var rescue: DictationRescue? @Published private(set) var rescue: DictationRescue?
/// Почему не сработал повтор вставки. Звука тут мало: владелец должен /// Почему не сработал повтор вставки. Звука тут мало: владелец должен
@@ -501,6 +574,9 @@ final class DictationHistoryModel: ObservableObject {
var onCopy: ((DictationHistoryEntry) -> Void)? var onCopy: ((DictationHistoryEntry) -> Void)?
var onDelete: ((DictationHistoryEntry) -> Void)? var onDelete: ((DictationHistoryEntry) -> Void)?
var onClearAll: (() -> Void)? var onClearAll: (() -> Void)?
/// Кого звать по крестику. Окно закрывается тремя путями - крестиком,
/// Escape и уходом фокуса, - и все три ведут в одну точку презентера.
var onCloseWindow: (() -> Void)?
var onInsertRescue: (() -> Void)? var onInsertRescue: (() -> Void)?
var onCopyRescue: (() -> Void)? var onCopyRescue: (() -> Void)?
@@ -635,14 +711,14 @@ struct DictationHistoryView: View {
RoundedRectangle(cornerRadius: 8, style: .continuous) RoundedRectangle(cornerRadius: 8, style: .continuous)
.strokeBorder(.quaternary) .strokeBorder(.quaternary)
) )
.accessibilityLabel("Текст, который не вставился") .accessibilityLabel(L("history.rescueTitle", "Текст, который не вставился"))
HStack(spacing: 10) { HStack(spacing: 10) {
Button("Вставить ещё раз") { model.onInsertRescue?() } Button(L("history.insertAgain", "Вставить ещё раз")) { model.onInsertRescue?() }
.buttonStyle(.borderedProminent) .buttonStyle(.borderedProminent)
.accessibilityLabel("Вставить этот текст ещё раз") .accessibilityLabel(L("history.insertAgainHint", "Вставить этот текст ещё раз"))
Button("Скопировать") { model.onCopyRescue?() } Button(L("history.copy", "Скопировать")) { model.onCopyRescue?() }
.accessibilityLabel("Скопировать этот текст") .accessibilityLabel(L("history.copyHint", "Скопировать этот текст"))
Spacer() Spacer()
Text("\(rescue.text.count) симв.") Text("\(rescue.text.count) симв.")
.font(.system(size: 11)) .font(.system(size: 11))
@@ -658,9 +734,9 @@ struct DictationHistoryView: View {
} }
HStack(spacing: 12) { HStack(spacing: 12) {
hint("⏎", "вставить") hint("⏎", L("history.legendInsert", "вставить"))
hint("⌘C", "копировать · буфер очистится через 2 мин") hint("⌘C", L("history.legendCopyTimed", "копировать · буфер очистится через 2 мин"))
hint("esc", "закрыть") hint("esc", L("history.legendClose", "закрыть"))
Spacer() Spacer()
} }
} }
@@ -689,6 +765,25 @@ struct DictationHistoryView: View {
.background( .background(
Capsule(style: .continuous).fill(Color.primary.opacity(0.08)) Capsule(style: .continuous).fill(Color.primary.opacity(0.08))
) )
// Крестик. Светофор macOS с этого окна снят по канону продукта, и
// вместе с ним ушёл единственный ВИДИМЫЙ выход: оставались Escape и
// уход фокуса, а о них надо знать. Владелец 06.09.2026: «так и не
// сделал кнопочку закрыть в истории расшифровок, которая
// открывается через саму плашку».
Button(action: { model.onCloseWindow?() }) {
Image(systemName: "xmark")
.font(.system(size: 10, weight: .semibold))
.foregroundStyle(IRIZ_SUBTLE)
.frame(width: 18, height: 18)
.background(Circle().fill(Color.primary.opacity(0.08)))
}
.buttonStyle(.plain)
// Escape НЕ вешается сюда: он уже разобран монитором клавиш окна, и
// там у него есть старшинство - сначала закрыть вопрос «очистить
// всё», и только потом окно. Второй обработчик той же клавиши это
// старшинство обошёл бы и закрыл окно прямо из-под вопроса.
.help(L("history.close", "Закрыть окно"))
.accessibilityLabel(L("history.close", "Закрыть окно"))
} }
.padding(.horizontal, 16) .padding(.horizontal, 16)
.padding(.top, 12) .padding(.top, 12)
@@ -701,7 +796,7 @@ struct DictationHistoryView: View {
HStack(spacing: 8) { HStack(spacing: 8) {
Image(systemName: "magnifyingglass") Image(systemName: "magnifyingglass")
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
TextField("Поиск по надиктовкам", text: $model.query) TextField(L("history.searchPlaceholder", "Поиск по надиктовкам"), text: $model.query)
.textFieldStyle(.plain) .textFieldStyle(.plain)
.font(.system(size: 13)) .font(.system(size: 13))
.focused($searchFocused) .focused($searchFocused)
@@ -712,7 +807,7 @@ struct DictationHistoryView: View {
Image(systemName: "xmark.circle.fill").foregroundStyle(IRIZ_SUBTLE) Image(systemName: "xmark.circle.fill").foregroundStyle(IRIZ_SUBTLE)
} }
.buttonStyle(.plain) .buttonStyle(.plain)
.help("Очистить поиск") .help(L("history.searchClear", "Очистить поиск"))
} }
} }
.padding(.horizontal, 10) .padding(.horizontal, 10)
@@ -726,11 +821,20 @@ struct DictationHistoryView: View {
private var emptyState: some View { private var emptyState: some View {
VStack(spacing: 6) { VStack(spacing: 6) {
Text(model.entries.isEmpty ? "Надиктовок пока нет" : "Ничего не нашлось") // Три разных состояния, а не два: «читаю», «пусто» и «не нашлось».
// Пока список ехал с диска, окно показывало «надиктовок пока нет» -
// прямую ложь человеку, у которого их две тысячи.
Text(model.isLoading
? L("history.loading", "Читаю надиктовки…")
: (model.entries.isEmpty
? L("history.emptyTitle", "Надиктовок пока нет")
: L("history.notFoundTitle", "Ничего не нашлось")))
.font(.system(size: 14, weight: .medium)) .font(.system(size: 14, weight: .medium))
Text(model.entries.isEmpty Text(model.isLoading
? "Продиктуйте что-нибудь — запись появится здесь." ? L("history.loadingBody", "Показываю последние сто. Остальные найдёт поиск.")
: "Попробуйте другое слово.") : (model.entries.isEmpty
? L("history.emptyBody", "Продиктуйте что-нибудь — запись появится здесь.")
: L("history.notFoundBody", "Попробуйте другое слово.")))
.font(.system(size: 12)) .font(.system(size: 12))
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
} }
@@ -788,10 +892,10 @@ struct DictationHistoryView: View {
// были третьим способом подсветки в одном продукте. // были третьим способом подсветки в одном продукте.
.irizSelected(isSelected, in: historySelection, group: "history") .irizSelected(isSelected, in: historySelection, group: "history")
.contextMenu { .contextMenu {
Button("Вставить") { model.onInsert?(entry) } Button(L("history.insert", "Вставить")) { model.onInsert?(entry) }
Button("Копировать") { model.onCopy?(entry) } Button(L("history.copyButton", "Копировать")) { model.onCopy?(entry) }
Divider() Divider()
Button("Переместить в Корзину", role: .destructive) { model.onDelete?(entry) } Button(L("history.trashOne", "Переместить в Корзину"), role: .destructive) { model.onDelete?(entry) }
} }
} }
@@ -805,12 +909,12 @@ struct DictationHistoryView: View {
private var footer: some View { private var footer: some View {
VStack(alignment: .leading, spacing: 4) { VStack(alignment: .leading, spacing: 4) {
HStack(spacing: 12) { HStack(spacing: 12) {
hint("⏎", "вставить") hint("⏎", L("history.legendInsert", "вставить"))
hint("⌘C", "копировать") hint("⌘C", L("history.legendCopy", "копировать"))
hint("esc", "закрыть") hint("esc", L("history.legendClose", "закрыть"))
// Удаление НЕ на клавише: ⌘⌫ — системный шорткат поля поиска, и по // Удаление НЕ на клавише: ⌘⌫ — системный шорткат поля поиска, и по
// мышечной памяти он сносил бы расшифровку. Только правым щелчком. // мышечной памяти он сносил бы расшифровку. Только правым щелчком.
Text("удалить — правым щелчком") Text(L("history.legendDelete", "удалить — правым щелчком"))
.font(.system(size: 11)) .font(.system(size: 11))
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
.lineLimit(1) .lineLimit(1)
@@ -822,10 +926,10 @@ struct DictationHistoryView: View {
// возвращается к прежнему»: через две минуты буфер владельца пуст. // возвращается к прежнему»: через две минуты буфер владельца пуст.
// Решение верное (подменённый старый текст в договоре не заметен, // Решение верное (подменённый старый текст в договоре не заметен,
// а «⌘V ничего не вставил» заметен сразу), но молчать о нём нельзя. // а «⌘V ничего не вставил» заметен сразу), но молчать о нём нельзя.
Text("Скопированное держится в буфере 2 минуты, потом буфер чистится.") Text(L("history.clipboardNote", "Скопированное держится в буфере 2 минуты, потом буфер чистится."))
.font(.system(size: 11)) .font(.system(size: 11))
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
.accessibilityLabel("Скопированное держится в буфере две минуты, потом буфер чистится") .accessibilityLabel(L("history.clipboardNoteVoice", "Скопированное держится в буфере две минуты, потом буфер чистится"))
} }
.padding(.horizontal, 16) .padding(.horizontal, 16)
.padding(.vertical, 8) .padding(.vertical, 8)
@@ -836,16 +940,16 @@ struct DictationHistoryView: View {
/// продукта. /// продукта.
@ViewBuilder @ViewBuilder
private var clearAllButton: some View { private var clearAllButton: some View {
let label = Text("Очистить всё").font(.system(size: 12, weight: .medium)) let label = Text(L("history.clearAll", "Очистить всё")).font(.system(size: 12, weight: .medium))
if #available(macOS 26.0, *) { if #available(macOS 26.0, *) {
Button(action: { model.onClearAll?() }) { label } Button(action: { model.onClearAll?() }) { label }
.buttonStyle(.glass) .buttonStyle(.glass)
.disabled(model.entries.isEmpty) .disabled(model.entries.isEmpty)
.help("Переместить все надиктовки в Корзину") .help(L("history.clearAllHint", "Переместить все надиктовки в Корзину"))
} else { } else {
Button(action: { model.onClearAll?() }) { label } Button(action: { model.onClearAll?() }) { label }
.disabled(model.entries.isEmpty) .disabled(model.entries.isEmpty)
.help("Переместить все надиктовки в Корзину") .help(L("history.clearAllHint", "Переместить все надиктовки в Корзину"))
} }
} }
@@ -0,0 +1,224 @@
// Уборка за собой: продукт не имеет права копить мусор на чужом диске.
//
// Повод названный и измеренный. 06.09.2026 диск владельца встал колом на нуле
// свободных байт посреди работы, и разбор показал, из чего сложились гигабайты:
//
// 1,1 ГБ архив `ggml-large-v3-encoder.mlmodelc.zip`, распакованный каталог
// которого лежит рядом. Архив после распаковки не нужен НИКОМУ.
// 432 КБ карантинный каталог `dictations-quarantine-…` месячной давности.
// 2027 каталогов надиктовок, старейшему месяц: по отдельности крошки,
// вместе - каталог, в котором ничего не найти.
//
// Слова владельца 06.09.2026: «нужно предусмотреть инструмент, который спустя
// время будет удалять вот эти надиктовки. Раз они так сильно забивают место,
// это очень хороший инструмент».
//
// ЧТО ЗДЕСЬ МОЖНО И ЧЕГО НЕЛЬЗЯ. Уборка делится надвое, и это разделение важнее
// самой уборки:
//
// МУСОР - то, что доказуемо избыточно: архив рядом с распакованным
// каталогом, карантин старше срока. Удаляется всегда, вопросов
// не задаёт: восстановить нечего, потому что терять нечего.
// СЫРЬЁ - надиктовки. Удаляется ТОЛЬКО по сроку, который владелец видит
// и меняет в настройках, и только по возрасту каталога. Ноль
// дней значит «не удалять никогда» - у владельца обязан быть
// способ выключить уборку совсем.
//
// План уборки считается ЧИСТОЙ функцией и проверяется пробой без диска: правило
// «что удалять» не имеет права жить в теле, которое ходит в файловую систему.
import Foundation
import IrizCore
/// Сколько дней хранится карантин. Он заводится, когда надиктовку отложили
/// разбираться, и месяц - предел, после которого никто уже не разберётся.
public let DICTATION_QUARANTINE_KEEP_DAYS = 30
/// Заводской срок хранения надиктовок. Владелец просил уборку по времени;
/// три месяца - тот срок, за который надиктовка либо понадобилась, либо нет.
public let DICTATION_RETENTION_DEFAULT_DAYS = 90
/// Одна находка уборки: что удалить и почему.
public struct DictationHousekeepingItem: Equatable, Sendable {
public enum Kind: String, Sendable {
/// Архив, распакованный каталог которого лежит рядом.
case unpackedArchive
/// Карантинный каталог старше срока.
case staleQuarantine
/// Надиктовка старше срока хранения.
case agedDictation
}
public let url: URL
public let kind: Kind
public let bytes: Int64
public init(url: URL, kind: Kind, bytes: Int64) {
self.url = url
self.kind = kind
self.bytes = bytes
}
}
/// Что видно в каталоге. Слепок диска, отдельный от решения: пробе он даётся
/// руками, живому коду его собирает `dictationHousekeepingSnapshot`.
public struct DictationHousekeepingEntry: Equatable, Sendable {
public let url: URL
public let isDirectory: Bool
public let modified: Date
public let bytes: Int64
/// Есть ли рядом каталог с тем же именем без расширения `.zip`.
public let hasUnpackedTwin: Bool
public init(url: URL, isDirectory: Bool, modified: Date, bytes: Int64,
hasUnpackedTwin: Bool = false) {
self.url = url
self.isDirectory = isDirectory
self.modified = modified
self.bytes = bytes
self.hasUnpackedTwin = hasUnpackedTwin
}
}
/// Что удалять. Чистая функция: диска не касается, времени сама не берёт.
///
/// `retentionDays == 0` значит «надиктовки не трогать». Мусор при этом всё
/// равно убирается: он не сырьё, и держать его незачем ни при каком сроке.
public func dictationHousekeepingPlan(models: [DictationHousekeepingEntry] = [],
quarantines: [DictationHousekeepingEntry] = [],
dictations: [DictationHousekeepingEntry] = [],
retentionDays: Int,
keepLimit: Int = DICTATION_HISTORY_KEEP_LIMIT,
now: Date) -> [DictationHousekeepingItem] {
var plan: [DictationHousekeepingItem] = []
for entry in models where !entry.isDirectory
&& entry.url.pathExtension.lowercased() == "zip"
&& entry.hasUnpackedTwin {
plan.append(.init(url: entry.url, kind: .unpackedArchive, bytes: entry.bytes))
}
let quarantineEdge = now.addingTimeInterval(-Double(DICTATION_QUARANTINE_KEEP_DAYS) * 86_400)
for entry in quarantines where entry.isDirectory && entry.modified < quarantineEdge {
plan.append(.init(url: entry.url, kind: .staleQuarantine, bytes: entry.bytes))
}
// Потолок ЧИСЛА. Решение владельца 06.09.2026: «пусть 500 последних, а
// просматривать можно будет только последние, например, 100».
//
// Срок и потолок работают вместе, а не вместо друг друга: за неделю бывает
// и тысяча надиктовок, и тогда срок не спасает, а за год - двадцать, и
// тогда не спасает потолок.
let sorted = dictations
.filter(\.isDirectory)
.sorted { $0.url.lastPathComponent > $1.url.lastPathComponent }
var overflow: Set<URL> = []
if sorted.count > keepLimit {
overflow = Set(sorted.dropFirst(keepLimit).map(\.url))
}
let dictationEdge = retentionDays > 0
? now.addingTimeInterval(-Double(retentionDays) * 86_400)
: Date.distantPast
for entry in sorted {
let tooOld = retentionDays > 0 && entry.modified < dictationEdge
guard tooOld || overflow.contains(entry.url) else { continue }
plan.append(.init(url: entry.url, kind: .agedDictation, bytes: entry.bytes))
}
return plan
}
/// Человеческая строка итога уборки. Молчать об удалении нельзя: владелец
/// обязан узнать из лога, что продукт что-то стёр, и сколько.
public func dictationHousekeepingSummary(_ plan: [DictationHousekeepingItem]) -> String {
guard !plan.isEmpty else { return "уборка: мусора нет" }
let bytes = plan.reduce(Int64(0)) { $0 + $1.bytes }
let counts = Dictionary(grouping: plan, by: \.kind).mapValues(\.count)
let parts = [
counts[.unpackedArchive].map { "распакованных архивов \($0)" },
counts[.staleQuarantine].map { "карантинов \($0)" },
counts[.agedDictation].map { "надиктовок старше срока \($0)" },
].compactMap { $0 }
let formatter = ByteCountFormatter()
formatter.countStyle = .file
return "уборка: \(parts.joined(separator: ", ")) — \(formatter.string(fromByteCount: bytes))"
}
// MARK: - Диск
/// Снять слепок каталога: что в нём лежит, когда изменено, сколько весит.
public func dictationHousekeepingSnapshot(_ directory: URL,
fileManager: FileManager = .default)
-> [DictationHousekeepingEntry] {
guard let names = try? fileManager.contentsOfDirectory(atPath: directory.path) else { return [] }
let all = Set(names)
return names.compactMap { name in
let url = directory.appendingPathComponent(name)
var isDirectory: ObjCBool = false
guard fileManager.fileExists(atPath: url.path, isDirectory: &isDirectory) else { return nil }
let values = try? url.resourceValues(forKeys: [.contentModificationDateKey])
// Близнец ищется по имени без `.zip`: распакованный каталог whisper.cpp
// называется ровно так же.
let twin = name.lowercased().hasSuffix(".zip") ? String(name.dropLast(4)) : nil
return DictationHousekeepingEntry(
url: url,
isDirectory: isDirectory.boolValue,
modified: values?.contentModificationDate ?? .distantFuture,
bytes: diskUsageBytesForHousekeeping(url, fileManager: fileManager),
hasUnpackedTwin: twin.map(all.contains) ?? false
)
}
}
/// Вес файла или каталога. Своя копия обхода: `IrizSettings` зависит от этого
/// модуля, а не наоборот, и тянуть его сюда ради одной функции нельзя.
func diskUsageBytesForHousekeeping(_ url: URL, fileManager: FileManager = .default) -> Int64 {
let keys: [URLResourceKey] = [.totalFileAllocatedSizeKey, .fileAllocatedSizeKey, .isDirectoryKey]
let values = try? url.resourceValues(forKeys: Set(keys))
if values?.isDirectory != true {
return Int64(values?.totalFileAllocatedSize ?? values?.fileAllocatedSize ?? 0)
}
guard let walker = fileManager.enumerator(at: url, includingPropertiesForKeys: keys,
options: [.skipsHiddenFiles]) else { return 0 }
var total: Int64 = 0
for case let item as URL in walker {
let v = try? item.resourceValues(forKeys: Set(keys))
total += Int64(v?.totalFileAllocatedSize ?? v?.fileAllocatedSize ?? 0)
}
return total
}
/// Убраться. Возвращает исполненный план - тем же составом, что и решала
/// чистая функция, за вычетом того, что не удалилось.
///
/// Зовётся на запуске, а не по таймеру: уборка обязана быть дешёвой и редкой.
/// Тысяча каталогов обходится за миллисекунды, и второй повод её гонять чаще
/// придумывать незачем.
@discardableResult
public func dictationHousekeepingRun(retentionDays: Int,
now: Date = Date(),
fileManager: FileManager = .default) -> [DictationHousekeepingItem] {
let support = irizApplicationSupportDirectoryURL()
let models = support.appendingPathComponent("Models/whisper", isDirectory: true)
let dictations = support.appendingPathComponent("dictations", isDirectory: true)
// Карантины лежат рядом с надиктовками, именем `dictations-quarantine-…`.
let quarantines = dictationHousekeepingSnapshot(support, fileManager: fileManager)
.filter { $0.url.lastPathComponent.hasPrefix("dictations-quarantine-") }
let plan = dictationHousekeepingPlan(
models: dictationHousekeepingSnapshot(models, fileManager: fileManager),
quarantines: quarantines,
dictations: dictationHousekeepingSnapshot(dictations, fileManager: fileManager),
retentionDays: retentionDays,
now: now
)
var done: [DictationHousekeepingItem] = []
for item in plan {
do {
try fileManager.removeItem(at: item.url)
done.append(item)
} catch {
log("уборка не смогла удалить \(item.url.lastPathComponent): \(error.localizedDescription)")
}
}
if !done.isEmpty { log(dictationHousekeepingSummary(done)) }
return done
}
@@ -52,6 +52,7 @@ public final class DictationSettings: @unchecked Sendable {
private static let keySpeechCleanupMode = "speech_cleanup_mode_v1" private static let keySpeechCleanupMode = "speech_cleanup_mode_v1"
private static let keyDictationHUDSize = "dictation_hud_size_v1" private static let keyDictationHUDSize = "dictation_hud_size_v1"
private static let keyDictationHUDAnchor = "dictation_hud_anchor_v1" private static let keyDictationHUDAnchor = "dictation_hud_anchor_v1"
private static let keyDictationRetentionDays = "dictation_retention_days_v1"
private static let keyDictationLanguage = "dictation_language" private static let keyDictationLanguage = "dictation_language"
private static let keyRemoveFinalPeriod = "remove_final_period_v1" private static let keyRemoveFinalPeriod = "remove_final_period_v1"
private static let keyEnterDelayMilliseconds = "enter_delay_milliseconds_v1" private static let keyEnterDelayMilliseconds = "enter_delay_milliseconds_v1"
@@ -708,6 +709,22 @@ public final class DictationSettings: @unchecked Sendable {
/// Размер плашки записи. Прежнее 124,2 x 36,8 pt было наследством донора, /// Размер плашки записи. Прежнее 124,2 x 36,8 pt было наследством донора,
/// а не решением: теперь это выбор владельца из трёх. /// а не решением: теперь это выбор владельца из трёх.
/// Сколько дней держать надиктовки. `0` - держать всегда.
///
/// Владелец 06.09.2026 попросил уборку по времени. Заводские 90 дней стоят
/// не из осторожности, а из смысла: за три месяца надиктовка либо
/// понадобилась, либо не понадобится уже никогда. Выключить уборку совсем
/// обязано быть можно - потому и ноль имеет значение, а не запрещён.
public var dictationRetentionDays: Int {
get {
guard defaults.object(forKey: Self.keyDictationRetentionDays) != nil else {
return DICTATION_RETENTION_DEFAULT_DAYS
}
return max(0, defaults.integer(forKey: Self.keyDictationRetentionDays))
}
set { defaults.set(max(0, newValue), forKey: Self.keyDictationRetentionDays) }
}
public var dictationHUDSize: DictationHUDSizeChoice { public var dictationHUDSize: DictationHUDSizeChoice {
get { get {
guard let raw = defaults.string(forKey: Self.keyDictationHUDSize), guard let raw = defaults.string(forKey: Self.keyDictationHUDSize),
+23 -19
View File
@@ -19,6 +19,7 @@
// Тон один и тот же, светлота подобрана под фон: это адаптация канона, а не // Тон один и тот же, светлота подобрана под фон: это адаптация канона, а не
// вторая палитра. // вторая палитра.
import AppKit import AppKit
import IrizCore
import SwiftUI import SwiftUI
/// Смысл акцента. Ролей ровно две - больше семья не различает. /// Смысл акцента. Ролей ровно две - больше семья не различает.
@@ -118,16 +119,16 @@ public enum SettingsSectionSpec: String, CaseIterable, Sendable {
public var title: String { public var title: String {
switch self { switch self {
case .hotkeys: return "Клавиши" case .hotkeys: return L("section.hotkeys", "Клавиши")
case .promptMode: return "Промпт-режим" case .promptMode: return L("section.promptMode", "Промпт-режим")
case .promptGuidance: return "Свои инструкции и примеры" case .promptGuidance: return L("section.promptGuidance", "Свои инструкции и примеры")
case .appProfiles: return "Профиль по приложению" case .appProfiles: return L("section.appProfiles", "Профиль по приложению")
case .appearance: return "Плашка записи" case .appearance: return L("section.appearance", "Плашка записи")
case .layout: return "Режим раскладки" case .layout: return L("section.layout", "Режим раскладки")
case .behavior: return "Вставка и запуск" case .behavior: return L("section.behavior", "Вставка и запуск")
case .corrections: return "Словарь замен" case .corrections: return L("section.corrections", "Словарь замен")
case .snippets: return "Заготовки" case .snippets: return L("section.snippets", "Заготовки")
case .transfer: return "Словарь и заготовки файлом" case .transfer: return L("section.transfer", "Словарь и заготовки файлом")
} }
} }
@@ -146,13 +147,16 @@ public enum SettingsSectionSpec: String, CaseIterable, Sendable {
} }
} }
/// Золото - личное владельца, голубой - поток извне и наружу. /// Акцент ОДИН на все секции - золото семьи.
public var accent: FamilyAccentRole { ///
switch self { /// Прежде их было два: золото значило «личное владельца», голубой - «поток
case .corrections, .snippets, .promptGuidance, .appProfiles, .transfer: /// извне и наружу». Смысл был настоящий, но прочесть его можно было только
return .personal /// в исходнике: в окне это выглядело как два случайных цвета вперемешку.
case .hotkeys, .promptMode, .appearance, .layout, .behavior: /// Слова владельца 06.09.2026: «проверить значки, какие-то золотые, какие-то
return .flow /// синие. Это странно. Они должны быть, наверное, как-то одинаковые».
} ///
} /// Различие, которое не читается без комментария в коде, различием не
/// является - оно шум. Голубой при этом никуда не делся: он остаётся за
/// ореолом плашки, где значит «здесь работает ИИ», и там он один в кадре.
public var accent: FamilyAccentRole { .personal }
} }
+14
View File
@@ -55,9 +55,23 @@ struct HUDPreviewChoice<Value: Equatable>: View {
selection = value selection = value
} label: { } label: {
VStack(spacing: 8) { VStack(spacing: 8) {
// Плашка стоит на ПЛИТЕ, как текст рядом.
//
// Стекло самой плашки прозрачное - решение владельца 06.09.2026,
// и в жизни оно правильное: плашка висит поверх чужого окна, и
// сквозь неё видно работу. Но здесь под ней не чужое окно, а
// стекло НАШЕГО окна, и прозрачное на прозрачном не читается
// вовсе. Слова владельца: «должна быть плашка такая же, как и
// под текстом, а она очень прозрачная, я ничего не понимаю».
//
// Плотность даёт подложка, а не подмена стекла: подменить стиль
// значило бы показывать в настройках не то, что владелец увидит
// на экране.
HUDPreview(size: size, palette: palette, purpose: purpose, animates: isSelected) HUDPreview(size: size, palette: palette, purpose: purpose, animates: isSelected)
.frame(width: dictationHUDCollapsedSize(size).width, .frame(width: dictationHUDCollapsedSize(size).width,
height: dictationHUDCollapsedSize(size).height) height: dictationHUDCollapsedSize(size).height)
.padding(6)
.background(IrizFloatingPlate())
Text(title) Text(title)
.font(.callout) .font(.callout)
.foregroundStyle(isSelected ? Color.primary : IRIZ_SUBTLE) .foregroundStyle(isSelected ? Color.primary : IRIZ_SUBTLE)
+173 -148
View File
@@ -125,13 +125,13 @@ public struct IrizSettingsView: View {
.frame(minWidth: 900, minHeight: 620) .frame(minWidth: 900, minHeight: 620)
.background(IrizGlassBackdrop()) .background(IrizGlassBackdrop())
.navigationTitle("Настройки \(IRIZ_NAME)") .navigationTitle("Настройки \(IRIZ_NAME)")
.alert("Сбросить настройки?", isPresented: $showResetConfirmation) { .alert(L("settings.sbrositNastroyki", "Сбросить настройки?"), isPresented: $showResetConfirmation) {
Button("Сбросить", role: .destructive) { Button(L("settings.sbrosit", "Сбросить"), role: .destructive) {
statusMessage = model.resetToFactoryDefaults() ? "Заводские настройки восстановлены." : nil statusMessage = model.resetToFactoryDefaults() ? L("settings.zavodskieNastroykiVosstanovleny", "Заводские настройки восстановлены.") : nil
} }
Button("Отмена", role: .cancel) {} Button(L("settings.otmena", "Отмена"), role: .cancel) {}
} message: { } message: {
Text("Все сочетания, параметры, замены и заготовки вернутся к заводским. Отменить это действие нельзя - выгрузите словарь в файл, если он вам дорог.") Text(L("settings.vseSochetaniyaParametryZameny", "Все сочетания, параметры, замены и заготовки вернутся к заводским. Отменить это действие нельзя - выгрузите словарь в файл, если он вам дорог."))
} }
} }
@@ -240,7 +240,7 @@ public struct IrizSettingsView: View {
private var footerBar: some View { private var footerBar: some View {
HStack(spacing: 12) { HStack(spacing: 12) {
if let message = model.validationMessage, if let message = model.validationMessage,
!message.contains("Конфликт"), !message.contains("macOS") { !message.contains(L("settings.konflikt", "Конфликт")), !message.contains("macOS") {
Label(message, systemImage: "exclamationmark.triangle.fill") Label(message, systemImage: "exclamationmark.triangle.fill")
.foregroundStyle(.red) .foregroundStyle(.red)
.accessibilityLabel("Ошибка настроек: \(message)") .accessibilityLabel("Ошибка настроек: \(message)")
@@ -252,16 +252,16 @@ public struct IrizSettingsView: View {
Spacer() Spacer()
Button("Сбросить к заводским", role: .destructive) { Button(L("settings.sbrositKZavodskim", "Сбросить к заводским"), role: .destructive) {
showResetConfirmation = true showResetConfirmation = true
} }
// Стекло и здесь: рядом со стеклянной «Сохранить» системная серая // Стекло и здесь: рядом со стеклянной «Сохранить» системная серая
// таблетка читалась как чужая деталь из другого окна. // таблетка читалась как чужая деталь из другого окна.
.modifier(GlassButton()) .modifier(GlassButton())
.accessibilityLabel("Сбросить все настройки к заводским") .accessibilityLabel(L("settings.sbrositVseNastroykiK", "Сбросить все настройки к заводским"))
Button("Сохранить") { Button(L("settings.sohranit", "Сохранить")) {
statusMessage = model.save() ? "Настройки сохранены." : nil statusMessage = model.save() ? L("settings.nastroykiSohraneny", "Настройки сохранены.") : nil
} }
// Стекло и здесь: сплошная акцентная заливка была единственным // Стекло и здесь: сплошная акцентная заливка была единственным
// непрозрачным пятном в окне, а владелец просил прозрачное во // непрозрачным пятном в окне, а владелец просил прозрачное во
@@ -269,7 +269,7 @@ public struct IrizSettingsView: View {
.modifier(GlassProminentButton()) .modifier(GlassProminentButton())
.keyboardShortcut(.defaultAction) .keyboardShortcut(.defaultAction)
.disabled(!model.canSave) .disabled(!model.canSave)
.accessibilityLabel("Сохранить настройки") .accessibilityLabel(L("settings.sohranitNastroyki", "Сохранить настройки"))
} }
.padding(.horizontal, 20) .padding(.horizontal, 20)
.padding(.vertical, 12) .padding(.vertical, 12)
@@ -369,11 +369,11 @@ public struct IrizSettingsView: View {
DisclosureGroup { DisclosureGroup {
content() content()
} label: { } label: {
Text("Подробнее") Text(L("settings.podrobnee", "Подробнее"))
.font(.footnote) .font(.footnote)
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
} }
.accessibilityLabel("Подробное пояснение к секции") .accessibilityLabel(L("settings.podrobnoePoyasnenieKSekcii", "Подробное пояснение к секции"))
} }
/// Сочетание ОДНОЙ нотацией - глифами, как их печатает сама macOS. /// Сочетание ОДНОЙ нотацией - глифами, как их печатает сама macOS.
@@ -382,22 +382,22 @@ public struct IrizSettingsView: View {
/// русскую: он же питает меню строки меню, и две поверхности обязаны /// русскую: он же питает меню строки меню, и две поверхности обязаны
/// называть одну клавишу одинаково. /// называть одну клавишу одинаково.
private func hotkeyLabel(_ action: HotkeyAction) -> String { private func hotkeyLabel(_ action: HotkeyAction) -> String {
guard let binding = model.hotkeys[action] else { return "Записать" } guard let binding = model.hotkeys[action] else { return L("settings.zapisat", "Записать") }
return MenuKeys.russianKeyName(binding.choice) return MenuKeys.russianKeyName(binding.choice)
} }
private var promptModeSection: some View { private var promptModeSection: some View {
Section { Section {
Toggle("Включить дополнительный промпт-режим", isOn: $model.promptModeEnabled) Toggle(L("settings.vklyuchitDopolnitelnyyPromptRezh", "Включить дополнительный промпт-режим"), isOn: $model.promptModeEnabled)
.toggleStyle(.switch) .toggleStyle(.switch)
.accessibilityLabel("Включить промпт-режим") .accessibilityLabel(L("settings.vklyuchitPromptRezhim", "Включить промпт-режим"))
Picker("Агент", selection: $model.promptAgentID) { Picker(L("settings.agent", "Агент"), selection: $model.promptAgentID) {
ForEach(PromptAgentCatalog.identifiers, id: \.self) { id in ForEach(PromptAgentCatalog.identifiers, id: \.self) { id in
Text(agentTitle(id)).tag(id) Text(agentTitle(id)).tag(id)
} }
} }
.accessibilityLabel("Агент, который собирает промпт") .accessibilityLabel(L("settings.agentKotoryySobiraetPrompt", "Агент, который собирает промпт"))
// Цена выбора стоит рядом с выбором и меняется вместе с ним. // Цена выбора стоит рядом с выбором и меняется вместе с ним.
Label(model.agentDestinationTitle, Label(model.agentDestinationTitle,
@@ -412,12 +412,12 @@ public struct IrizSettingsView: View {
.accessibilityLabel("Важно про этого агента: \(note)") .accessibilityLabel("Важно про этого агента: \(note)")
} }
LabeledContent("Путь к CLI") { LabeledContent(L("settings.putKCli", "Путь к CLI")) {
TextField(model.agentAdapter.executableName.isEmpty ? "Полный путь" : "Автопоиск", TextField(model.agentAdapter.executableName.isEmpty ? L("settings.polnyyPut", "Полный путь") : L("settings.avtopoisk", "Автопоиск"),
text: agentPathBinding) text: agentPathBinding)
.labelsHidden() .labelsHidden()
.frame(minWidth: 280) .frame(minWidth: 280)
.accessibilityLabel("Путь к исполняемому файлу агента") .accessibilityLabel(L("settings.putKIspolnyaemomuFaylu", "Путь к исполняемому файлу агента"))
} }
if let path = model.detectedAgentPath { if let path = model.detectedAgentPath {
@@ -426,59 +426,59 @@ public struct IrizSettingsView: View {
.textSelection(.enabled) .textSelection(.enabled)
.accessibilityLabel("Агент найден. \(path)") .accessibilityLabel("Агент найден. \(path)")
} else { } else {
Label("Не найден", systemImage: "exclamationmark.triangle.fill") Label(L("settings.neNayden", "Не найден"), systemImage: "exclamationmark.triangle.fill")
.foregroundStyle(model.promptModeEnabled ? Color.red : Color.secondary) .foregroundStyle(model.promptModeEnabled ? Color.red : Color.secondary)
.accessibilityLabel("Агент не найден") .accessibilityLabel(L("settings.agentNeNayden", "Агент не найден"))
} }
if model.agentAdapter.requiresModel { if model.agentAdapter.requiresModel {
LabeledContent("Модель") { LabeledContent(L("settings.model", "Модель")) {
TextField("например, qwen2.5-coder:7b", text: $model.agentModel) TextField(L("settings.naprimerQwen25Coder", "например, qwen2.5-coder:7b"), text: $model.agentModel)
.labelsHidden() .labelsHidden()
.frame(minWidth: 280) .frame(minWidth: 280)
.accessibilityLabel("Модель локального агента") .accessibilityLabel(L("settings.modelLokalnogoAgenta", "Модель локального агента"))
} }
} }
if model.promptAgentID == PromptAgentCatalog.customID { if model.promptAgentID == PromptAgentCatalog.customID {
VStack(alignment: .leading, spacing: 4) { VStack(alignment: .leading, spacing: 4) {
Text("Аргументы — по одному в строке") Text(L("settings.argumentyPoOdnomuV", "Аргументы — по одному в строке"))
TextEditor(text: $model.agentCustomArguments) TextEditor(text: $model.agentCustomArguments)
.font(.system(.body, design: .monospaced)) .font(.system(.body, design: .monospaced))
.frame(minHeight: 72) .frame(minHeight: 72)
.accessibilityLabel("Аргументы своего CLI, по одному в строке") .accessibilityLabel(L("settings.argumentySvoegoCliPo", "Аргументы своего CLI, по одному в строке"))
Text("Подстановки: {prompt} — текст промпта отдельным аргументом. Без {prompt} промпт уходит в стандартный ввод. Командная строка не собирается из строк, поэтому кавычки не нужны.") Text(L("settings.podstanovkiPromptTekstPrompta", "Подстановки: {prompt} — текст промпта отдельным аргументом. Без {prompt} промпт уходит в стандартный ввод. Командная строка не собирается из строк, поэтому кавычки не нужны."))
.font(.footnote) .font(.footnote)
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
.accessibilityLabel("Подстановка {prompt} передаёт текст отдельным аргументом. Без неё промпт уходит в стандартный ввод. Кавычки не нужны") .accessibilityLabel(L("settings.podstanovkaPromptPeredaetTekst", "Подстановка {prompt} передаёт текст отдельным аргументом. Без неё промпт уходит в стандартный ввод. Кавычки не нужны"))
} }
} }
Picker("Распознаватель", selection: $model.speechEngine) { Picker(L("settings.raspoznavatel", "Распознаватель"), selection: $model.speechEngine) {
ForEach(SpeechModelProfile.allCases, id: \.self) { profile in ForEach(SpeechModelProfile.allCases, id: \.self) { profile in
Text(profile.shortName).tag(profile) Text(profile.shortName).tag(profile)
} }
} }
.accessibilityLabel("Какой движок распознавания речи использовать") .accessibilityLabel(L("settings.kakoyDvizhokRaspoznavaniyaRechi", "Какой движок распознавания речи использовать"))
settingsNote { settingsNote {
Text("Parakeet быстрее в 11-15 раз, но транслитерирует английские термины внутри русской фразы: git rebase слышится как «гид репейс». Whisper large-v3 берет их латиницей (19 процентов ошибок на смешанной речи против 44), зато надиктовка в полминуты ждет расшифровки около 16 секунд. Оба считают на этом Маке, наружу не уходит ничего.") Text(L("settings.parakeetBystreeV11", "Parakeet быстрее в 11-15 раз, но транслитерирует английские термины внутри русской фразы: git rebase слышится как «гид репейс». Whisper large-v3 берет их латиницей (19 процентов ошибок на смешанной речи против 44), зато надиктовка в полминуты ждет расшифровки около 16 секунд. Оба считают на этом Маке, наружу не уходит ничего."))
.font(.footnote) .font(.footnote)
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
} }
Picker("Исполнитель промпта", selection: $model.promptRecipient) { Picker(L("settings.ispolnitelPrompta", "Исполнитель промпта"), selection: $model.promptRecipient) {
ForEach(PromptRecipientProfile.allCases, id: \.self) { profile in ForEach(PromptRecipientProfile.allCases, id: \.self) { profile in
Text(recipientTitle(profile)).tag(profile) Text(recipientTitle(profile)).tag(profile)
} }
} }
.accessibilityLabel("Исполнитель готового промпта по умолчанию") .accessibilityLabel(L("settings.ispolnitelGotovogoPromptaPo", "Исполнитель готового промпта по умолчанию"))
settingsNote { settingsNote {
Text("Этот режим необязателен. Промпт собирает выбранный агент, а профиль готовит текст для того, кто будет промпт исполнять. Пустое поле пути включает автопоиск. Обычная диктовка работает локально всегда; расшифровку наружу отдаёт только промпт-режим и только выбранному агенту. Ollama — единственный вариант, который не отправляет ничего: он считает на этом Маке. Готовый промпт вставляется без отправки, а качество проверяется здесь же — утверждение без дословной опоры на надиктовку отклоняется независимо от того, какой агент его сочинил.") Text(L("settings.etotRezhimNeobyazatelenPrompt", "Этот режим необязателен. Промпт собирает выбранный агент, а профиль готовит текст для того, кто будет промпт исполнять. Пустое поле пути включает автопоиск. Обычная диктовка работает локально всегда; расшифровку наружу отдаёт только промпт-режим и только выбранному агенту. Ollama — единственный вариант, который не отправляет ничего: он считает на этом Маке. Готовый промпт вставляется без отправки, а качество проверяется здесь же — утверждение без дословной опоры на надиктовку отклоняется независимо от того, какой агент его сочинил."))
.font(.footnote) .font(.footnote)
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
.accessibilityLabel("Промпт-режим необязателен. Промпт собирает выбранный агент, профиль готовит текст для исполнителя. Пустое поле пути включает автопоиск. Обычная диктовка всегда локальна. Расшифровку отдаёт только промпт-режим и только выбранному агенту. Ollama считает на этом Маке и не отправляет ничего. Готовый промпт вставляется без отправки, а утверждение без дословной опоры на надиктовку отклоняется независимо от агента") .accessibilityLabel(L("settings.promptRezhimNeobyazatelenPrompt", "Промпт-режим необязателен. Промпт собирает выбранный агент, профиль готовит текст для исполнителя. Пустое поле пути включает автопоиск. Обычная диктовка всегда локальна. Расшифровку отдаёт только промпт-режим и только выбранному агенту. Ollama считает на этом Маке и не отправляет ничего. Готовый промпт вставляется без отправки, а утверждение без дословной опоры на надиктовку отклоняется независимо от агента"))
} }
} header: { } header: {
sectionHeader(.promptMode) sectionHeader(.promptMode)
@@ -500,11 +500,11 @@ public struct IrizSettingsView: View {
if model.promptModeEnabled { if model.promptModeEnabled {
Section { Section {
VStack(alignment: .leading, spacing: 4) { VStack(alignment: .leading, spacing: 4) {
Text("Чего вы хотите от формы промпта") Text(L("settings.chegoVyHotiteOt", "Чего вы хотите от формы промпта"))
TextEditor(text: $model.promptGuidanceInstructions) TextEditor(text: $model.promptGuidanceInstructions)
.font(.system(.body)) .font(.system(.body))
.frame(minHeight: 72) .frame(minHeight: 72)
.accessibilityLabel("Свои инструкции для промпт-режима") .accessibilityLabel(L("settings.svoiInstrukciiDlyaPrompt", "Свои инструкции для промпт-режима"))
Text("До \(PROMPT_GUIDANCE_INSTRUCTIONS_MAX) символов. Это предпочтение по ФОРМЕ, " Text("До \(PROMPT_GUIDANCE_INSTRUCTIONS_MAX) символов. Это предпочтение по ФОРМЕ, "
+ "а не право выдумывать факты: запреты контракта сильнее.") + "а не право выдумывать факты: запреты контракта сильнее.")
.font(.footnote) .font(.footnote)
@@ -526,20 +526,20 @@ public struct IrizSettingsView: View {
.buttonStyle(.borderless) .buttonStyle(.borderless)
.accessibilityLabel("Удалить пример \(index + 1)") .accessibilityLabel("Удалить пример \(index + 1)")
} }
TextField("Как сказано вслух", text: promptExampleSpoken(at: index)) TextField(L("settings.kakSkazanoVsluh", "Как сказано вслух"), text: promptExampleSpoken(at: index))
.labelsHidden() .labelsHidden()
.accessibilityLabel("Пример \(index + 1): как сказано вслух") .accessibilityLabel("Пример \(index + 1): как сказано вслух")
TextField("Какой промпт нужен", text: promptExampleWanted(at: index)) TextField(L("settings.kakoyPromptNuzhen", "Какой промпт нужен"), text: promptExampleWanted(at: index))
.labelsHidden() .labelsHidden()
.accessibilityLabel("Пример \(index + 1): какой промпт нужен") .accessibilityLabel("Пример \(index + 1): какой промпт нужен")
} }
} }
if model.promptGuidanceExamples.count < PROMPT_GUIDANCE_EXAMPLES_MAX { if model.promptGuidanceExamples.count < PROMPT_GUIDANCE_EXAMPLES_MAX {
Button("Добавить пример", systemImage: "plus") { Button(L("settings.dobavitPrimer", "Добавить пример"), systemImage: "plus") {
model.addPromptExample() model.addPromptExample()
} }
.accessibilityLabel("Добавить пример для промпт-режима") .accessibilityLabel(L("settings.dobavitPrimerDlyaPrompt", "Добавить пример для промпт-режима"))
} else { } else {
Text("Примеров хватит: больше \(PROMPT_GUIDANCE_EXAMPLES_MAX) уже не учат форме, а диктуют содержание.") Text("Примеров хватит: больше \(PROMPT_GUIDANCE_EXAMPLES_MAX) уже не учат форме, а диктуют содержание.")
.font(.footnote) .font(.footnote)
@@ -570,9 +570,9 @@ public struct IrizSettingsView: View {
private var appProfilesSection: some View { private var appProfilesSection: some View {
Section { Section {
if model.appProfiles.isEmpty { if model.appProfiles.isEmpty {
Text("Список пуст — промпт для любого приложения собирается по профилю выше.") Text(L("settings.spisokPustPromptDlya", "Список пуст — промпт для любого приложения собирается по профилю выше."))
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
.accessibilityLabel("Список приложений пуст, работает профиль по умолчанию") .accessibilityLabel(L("settings.spisokPrilozheniyPustRabotaet", "Список приложений пуст, работает профиль по умолчанию"))
} }
ForEach(Array(model.appProfiles.indices), id: \.self) { index in ForEach(Array(model.appProfiles.indices), id: \.self) { index in
@@ -603,10 +603,10 @@ public struct IrizSettingsView: View {
} }
} }
Button("Добавить приложение…", systemImage: "plus") { Button(L("settings.dobavitPrilozhenie", "Добавить приложение…"), systemImage: "plus") {
chooseApplication() chooseApplication()
} }
.accessibilityLabel("Выбрать приложение и назначить ему профиль") .accessibilityLabel(L("settings.vybratPrilozhenieINaznachit", "Выбрать приложение и назначить ему профиль"))
if let appProfileMessage { if let appProfileMessage {
Label(appProfileMessage, systemImage: "info.circle") Label(appProfileMessage, systemImage: "info.circle")
@@ -619,7 +619,7 @@ public struct IrizSettingsView: View {
Text("Диктуете в редактор кода — промпт собирается для Codex, диктуете в почту — универсальный. \(IRIZ_NAME) смотрит только на то, какое приложение сейчас спереди: ни окно, ни поле, ни текст чужой программы не читаются. Приложение спрашивается один раз, в момент нажатия, и сразу забывается — на диск и в журнал уходит выбранный профиль, а не имя программы. Приложений, которых нет в списке, это не касается: им достаётся профиль по умолчанию.") Text("Диктуете в редактор кода — промпт собирается для Codex, диктуете в почту — универсальный. \(IRIZ_NAME) смотрит только на то, какое приложение сейчас спереди: ни окно, ни поле, ни текст чужой программы не читаются. Приложение спрашивается один раз, в момент нажатия, и сразу забывается — на диск и в журнал уходит выбранный профиль, а не имя программы. Приложений, которых нет в списке, это не касается: им достаётся профиль по умолчанию.")
.font(.footnote) .font(.footnote)
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
.accessibilityLabel("Профиль выбирается по приложению, которое спереди в момент нажатия. Окно, поле и текст чужой программы не читаются. Приложение спрашивается один раз и сразу забывается: на диск и в журнал уходит профиль, а не имя программы. Приложениям вне списка достаётся профиль по умолчанию") .accessibilityLabel(L("settings.profilVybiraetsyaPoPrilozheniyu", "Профиль выбирается по приложению, которое спереди в момент нажатия. Окно, поле и текст чужой программы не читаются. Приложение спрашивается один раз и сразу забывается: на диск и в журнал уходит профиль, а не имя программы. Приложениям вне списка достаётся профиль по умолчанию"))
} }
} header: { } header: {
sectionHeader(.appProfiles) sectionHeader(.appProfiles)
@@ -641,7 +641,7 @@ public struct IrizSettingsView: View {
private func recipientTitle(_ profile: PromptRecipientProfile) -> String { private func recipientTitle(_ profile: PromptRecipientProfile) -> String {
switch profile { switch profile {
case .codex: "Codex" case .codex: "Codex"
case .generic: "Универсальный" case .generic: L("settings.universalnyy", "Универсальный")
} }
} }
@@ -660,7 +660,7 @@ public struct IrizSettingsView: View {
/// файл программы, идентификатор читается из её же бандла. /// файл программы, идентификатор читается из её же бандла.
private func chooseApplication() { private func chooseApplication() {
let panel = NSOpenPanel() let panel = NSOpenPanel()
panel.title = "Выберите приложение" panel.title = L("settings.vyberitePrilozhenie", "Выберите приложение")
panel.directoryURL = URL(fileURLWithPath: "/Applications", isDirectory: true) panel.directoryURL = URL(fileURLWithPath: "/Applications", isDirectory: true)
panel.allowedContentTypes = [.application] panel.allowedContentTypes = [.application]
panel.allowsMultipleSelection = false panel.allowsMultipleSelection = false
@@ -668,17 +668,17 @@ public struct IrizSettingsView: View {
guard panel.runModal() == .OK, let url = panel.url else { return } guard panel.runModal() == .OK, let url = panel.url else { return }
guard let bundleID = Bundle(url: url)?.bundleIdentifier else { guard let bundleID = Bundle(url: url)?.bundleIdentifier else {
appProfileMessage = "У этой программы нет идентификатора — привязать профиль не к чему." appProfileMessage = L("settings.uEtoyProgrammyNet", "У этой программы нет идентификатора — привязать профиль не к чему.")
return return
} }
switch model.addAppProfile(bundleID: bundleID, profile: model.promptRecipient) { switch model.addAppProfile(bundleID: bundleID, profile: model.promptRecipient) {
case .added: case .added:
appProfileMessage = "Добавлено. Выберите профиль и нажмите «Сохранить»." appProfileMessage = L("settings.dobavlenoVyberiteProfilI", "Добавлено. Выберите профиль и нажмите «Сохранить».")
case .updated: case .updated:
appProfileMessage = "Эта программа уже была в списке — строка одна, профиль в ней и меняйте." appProfileMessage = L("settings.etaProgrammaUzheByla", "Эта программа уже была в списке — строка одна, профиль в ней и меняйте.")
case .invalidBundleID: case .invalidBundleID:
appProfileMessage = "Идентификатор этой программы разобрать не удалось." appProfileMessage = L("settings.identifikatorEtoyProgrammyRazobr", "Идентификатор этой программы разобрать не удалось.")
case .listFull: case .listFull:
appProfileMessage = "В списке уже \(PromptAppProfileMap.maximumEntries) программ — уберите лишние." appProfileMessage = "В списке уже \(PromptAppProfileMap.maximumEntries) программ — уберите лишние."
} }
@@ -700,7 +700,7 @@ public struct IrizSettingsView: View {
// владельца: «не маленькая, большая, средняя, а прям можно кликать». // владельца: «не маленькая, большая, средняя, а прям можно кликать».
// Плашки настоящие: их рисуют те же классы, что рисуют живую. // Плашки настоящие: их рисуют те же классы, что рисуют живую.
VStack(alignment: .leading, spacing: 6) { VStack(alignment: .leading, spacing: 6) {
Text("Размер плашки") Text(L("settings.razmerPlashki", "Размер плашки"))
.font(.callout) .font(.callout)
HStack(alignment: .bottom, spacing: 4) { HStack(alignment: .bottom, spacing: 4) {
ForEach(DictationHUDSizeChoice.allCases, id: \.self) { choice in ForEach(DictationHUDSizeChoice.allCases, id: \.self) { choice in
@@ -712,10 +712,10 @@ public struct IrizSettingsView: View {
} }
} }
} }
.accessibilityLabel("Размер плашки записи") .accessibilityLabel(L("settings.razmerPlashkiZapisi", "Размер плашки записи"))
VStack(alignment: .leading, spacing: 6) { VStack(alignment: .leading, spacing: 6) {
Text("Как выглядит волна") Text(L("settings.kakVyglyaditVolna", "Как выглядит волна"))
.font(.callout) .font(.callout)
HStack(alignment: .bottom, spacing: 4) { HStack(alignment: .bottom, spacing: 4) {
ForEach(DictationHUDWavePalette.allCases, id: \.self) { palette in ForEach(DictationHUDWavePalette.allCases, id: \.self) { palette in
@@ -727,13 +727,13 @@ public struct IrizSettingsView: View {
} }
} }
} }
.accessibilityLabel("Как выглядит волна на плашке записи") .accessibilityLabel(L("settings.kakVyglyaditVolnaNa", "Как выглядит волна на плашке записи"))
settingsNote { settingsNote {
Text("Переливы — три тона вокруг цвета режима. Спокойная — те же тона, но разлёт вдвое уже. Монохром — без переливов вовсе. Цвет режима палитра не меняет: обычная диктовка остаётся тёплой, промпт — холодным, иначе по плашке было бы не видно, что именно записывается.") Text(L("settings.perelivyTriTonaVokrug", "Переливы — три тона вокруг цвета режима. Спокойная — те же тона, но разлёт вдвое уже. Монохром — без переливов вовсе. Цвет режима палитра не меняет: обычная диктовка остаётся тёплой, промпт — холодным, иначе по плашке было бы не видно, что именно записывается."))
.font(.footnote) .font(.footnote)
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
.accessibilityLabel("Переливы: три тона вокруг цвета режима. Спокойная: те же тона, разлёт вдвое уже. Монохром: без переливов. Цвет режима палитра не меняет — диктовка остаётся тёплой, промпт холодным") .accessibilityLabel(L("settings.perelivyTriTonaVokrug2", "Переливы: три тона вокруг цвета режима. Спокойная: те же тона, разлёт вдвое уже. Монохром: без переливов. Цвет режима палитра не меняет — диктовка остаётся тёплой, промпт холодным"))
} }
} header: { } header: {
sectionHeader(.appearance) sectionHeader(.appearance)
@@ -758,7 +758,7 @@ public struct IrizSettingsView: View {
} }
if let message = model.validationMessage, if let message = model.validationMessage,
message.contains("Конфликт") || message.contains("macOS") || message.contains("раскладка") { message.contains(L("settings.konflikt", "Конфликт")) || message.contains("macOS") || message.contains(L("settings.raskladka", "раскладка")) {
Label(message, systemImage: "exclamationmark.triangle.fill") Label(message, systemImage: "exclamationmark.triangle.fill")
.foregroundStyle(.red) .foregroundStyle(.red)
.accessibilityLabel("Ошибка сочетаний: \(message)") .accessibilityLabel("Ошибка сочетаний: \(message)")
@@ -766,10 +766,10 @@ public struct IrizSettingsView: View {
// Две сноски подряд были про одно и то же - когда сочетание // Две сноски подряд были про одно и то же - когда сочетание
// начинает работать. Осталась одна. // начинает работать. Осталась одна.
Text("Сочетание применяется сразу после сохранения. Отмена переключения — то же сочетание конвертации ещё раз.") Text(L("settings.sochetaniePrimenyaetsyaSrazuPosl", "Сочетание применяется сразу после сохранения. Отмена переключения — то же сочетание конвертации ещё раз."))
.font(.footnote) .font(.footnote)
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
.accessibilityLabel("Сочетание применяется сразу после сохранения. Отмена переключения - то же сочетание конвертации ещё раз") .accessibilityLabel(L("settings.sochetaniePrimenyaetsyaSrazuPosl2", "Сочетание применяется сразу после сохранения. Отмена переключения - то же сочетание конвертации ещё раз"))
} header: { } header: {
sectionHeader(.hotkeys) sectionHeader(.hotkeys)
} }
@@ -782,13 +782,13 @@ public struct IrizSettingsView: View {
// поэтому объяснение переехало под сам выбор и говорит про ВЫБРАННЫЙ // поэтому объяснение переехало под сам выбор и говорит про ВЫБРАННЫЙ
// режим. Три абзаца про три режима сразу читатель всё равно не // режим. Три абзаца про три режима сразу читатель всё равно не
// сравнивает: он выбирает один. // сравнивает: он выбирает один.
Picker("Режим раскладки", selection: $model.layoutMode) { Picker(L("settings.rezhimRaskladki", "Режим раскладки"), selection: $model.layoutMode) {
ForEach(LayoutMode.allCases) { mode in ForEach(LayoutMode.allCases) { mode in
Text(mode.title).tag(mode) Text(mode.title).tag(mode)
} }
} }
.pickerStyle(.radioGroup) .pickerStyle(.radioGroup)
.accessibilityLabel("Режим раскладки") .accessibilityLabel(L("settings.rezhimRaskladki", "Режим раскладки"))
Text(model.layoutMode.explanation) Text(model.layoutMode.explanation)
.font(.footnote) .font(.footnote)
@@ -801,7 +801,7 @@ public struct IrizSettingsView: View {
private var behaviorSection: some View { private var behaviorSection: some View {
Section { Section {
LabeledContent("Задержка Enter") { LabeledContent(L("settings.zaderzhkaEnter", "Задержка Enter")) {
HStack(spacing: 6) { HStack(spacing: 6) {
// labelsHidden обязателен: в Form(.grouped) заголовок TextField // labelsHidden обязателен: в Form(.grouped) заголовок TextField
// рисуется ВТОРЫМ ярлыком рядом с ярлыком LabeledContent и // рисуется ВТОРЫМ ярлыком рядом с ярлыком LabeledContent и
@@ -810,17 +810,17 @@ public struct IrizSettingsView: View {
.labelsHidden() .labelsHidden()
.frame(width: 72) .frame(width: 72)
.multilineTextAlignment(.trailing) .multilineTextAlignment(.trailing)
.accessibilityLabel("Задержка Enter в миллисекундах") .accessibilityLabel(L("settings.zaderzhkaEnterVMillisekundah", "Задержка Enter в миллисекундах"))
Text("мс").foregroundStyle(IRIZ_SUBTLE) Text(L("settings.ms", "мс")).foregroundStyle(IRIZ_SUBTLE)
} }
} }
Picker("Чистить речь", selection: $model.speechCleanupMode) { Picker(L("settings.chistitRech", "Чистить речь"), selection: $model.speechCleanupMode) {
ForEach(SpeechCleanupMode.allCases, id: \.self) { mode in ForEach(SpeechCleanupMode.allCases, id: \.self) { mode in
Text(mode.title).tag(mode) Text(mode.title).tag(mode)
} }
} }
.accessibilityLabel("Где чистится речь") .accessibilityLabel(L("settings.gdeChistitsyaRech", "Где чистится речь"))
// Предупреждение показывается ДО отправки, а не после: оно и есть // Предупреждение показывается ДО отправки, а не после: оно и есть
// то согласие, о котором говорил владелец. Живёт ровно там, где // то согласие, о котором говорил владелец. Живёт ровно там, где
@@ -833,21 +833,21 @@ public struct IrizSettingsView: View {
.accessibilityLabel("Предупреждение: \(warning)") .accessibilityLabel("Предупреждение: \(warning)")
} }
Picker("После вставки", selection: $model.pasteSuffix) { Picker(L("settings.posleVstavki", "После вставки"), selection: $model.pasteSuffix) {
Text("Пробел").tag(PasteSuffix.appendSpace) Text(L("settings.probel", "Пробел")).tag(PasteSuffix.appendSpace)
Text("Ничего").tag(PasteSuffix.none) Text(L("settings.nichego", "Ничего")).tag(PasteSuffix.none)
Text("Перевод строки").tag(PasteSuffix.appendNewline) Text(L("settings.perevodStroki", "Перевод строки")).tag(PasteSuffix.appendNewline)
} }
.accessibilityLabel("Суффикс после вставки") .accessibilityLabel(L("settings.suffiksPosleVstavki", "Суффикс после вставки"))
Toggle("Запускать при входе в систему", isOn: $model.launchAtLogin) Toggle(L("settings.zapuskatPriVhodeV", "Запускать при входе в систему"), isOn: $model.launchAtLogin)
.toggleStyle(.switch) .toggleStyle(.switch)
.accessibilityLabel("Запускать \(IRIZ_NAME) при входе в систему") .accessibilityLabel("Запускать \(IRIZ_NAME) при входе в систему")
Toggle("Показывать окно, если текст никуда не вставился", Toggle(L("settings.pokazyvatOknoEsliTekst", "Показывать окно, если текст никуда не вставился"),
isOn: $model.rescueWindowEnabled) isOn: $model.rescueWindowEnabled)
.toggleStyle(.switch) .toggleStyle(.switch)
.accessibilityLabel("Показывать окно с текстом, когда вставка не удалась") .accessibilityLabel(L("settings.pokazyvatOknoSTekstom", "Показывать окно с текстом, когда вставка не удалась"))
settingsNote { settingsNote {
Text("Вставка не дошла до поля — \(IRIZ_NAME) поднимает окно с готовым текстом: скопировать или вставить ещё раз, Esc — закрыть. Когда сработал запасной прямой ввод, окна не будет: там текст, скорее всего, уже в поле, и предлагать вставить его второй раз опаснее, чем промолчать.") Text("Вставка не дошла до поля — \(IRIZ_NAME) поднимает окно с готовым текстом: скопировать или вставить ещё раз, Esc — закрыть. Когда сработал запасной прямой ввод, окна не будет: там текст, скорее всего, уже в поле, и предлагать вставить его второй раз опаснее, чем промолчать.")
@@ -863,18 +863,18 @@ public struct IrizSettingsView: View {
private var correctionsSection: some View { private var correctionsSection: some View {
Section { Section {
if model.corrections.isEmpty { if model.corrections.isEmpty {
Text("Замен пока нет.") Text(L("settings.zamenPokaNet", "Замен пока нет."))
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
.accessibilityLabel("Словарь замен пуст") .accessibilityLabel(L("settings.slovarZamenPust", "Словарь замен пуст"))
} else { } else {
// Подписи колонок ОДИН раз. Прежде каждая строка несла свои две: // Подписи колонок ОДИН раз. Прежде каждая строка несла свои две:
// на четырнадцати заменах это двадцать восемь повторов «Как // на четырнадцати заменах это двадцать восемь повторов «Как
// распозналось» и «На что менять», из-за которых сами слова // распозналось» и «На что менять», из-за которых сами слова
// владельца терялись в служебном тексте. // владельца терялись в служебном тексте.
HStack(spacing: 8) { HStack(spacing: 8) {
Text("Как распозналось") Text(L("settings.kakRaspoznalos", "Как распозналось"))
Spacer(minLength: 8) Spacer(minLength: 8)
Text("На что менять") Text(L("settings.naChtoMenyat", "На что менять"))
Spacer().frame(width: CORRECTION_TRASH_WIDTH) Spacer().frame(width: CORRECTION_TRASH_WIDTH)
} }
.font(.caption) .font(.caption)
@@ -884,13 +884,13 @@ public struct IrizSettingsView: View {
ForEach(Array(model.corrections.indices), id: \.self) { index in ForEach(Array(model.corrections.indices), id: \.self) { index in
HStack(spacing: 8) { HStack(spacing: 8) {
TextField("Как распозналось", text: correctionSource(at: index)) TextField(L("settings.kakRaspoznalos", "Как распозналось"), text: correctionSource(at: index))
.labelsHidden() .labelsHidden()
.accessibilityLabel("Как распозналось, замена \(index + 1)") .accessibilityLabel("Как распозналось, замена \(index + 1)")
Image(systemName: "arrow.right") Image(systemName: "arrow.right")
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
.accessibilityHidden(true) .accessibilityHidden(true)
TextField("На что менять", text: correctionReplacement(at: index)) TextField(L("settings.naChtoMenyat", "На что менять"), text: correctionReplacement(at: index))
.labelsHidden() .labelsHidden()
.accessibilityLabel("На что менять, замена \(index + 1)") .accessibilityLabel("На что менять, замена \(index + 1)")
Button(role: .destructive) { Button(role: .destructive) {
@@ -903,10 +903,10 @@ public struct IrizSettingsView: View {
} }
} }
Button("Добавить замену", systemImage: "plus") { Button(L("settings.dobavitZamenu", "Добавить замену"), systemImage: "plus") {
model.addCorrection() model.addCorrection()
} }
.accessibilityLabel("Добавить пару в словарь замен") .accessibilityLabel(L("settings.dobavitParuVSlovar", "Добавить пару в словарь замен"))
} header: { } header: {
sectionHeader(.corrections) sectionHeader(.corrections)
} }
@@ -917,15 +917,15 @@ public struct IrizSettingsView: View {
private var snippetsSection: some View { private var snippetsSection: some View {
Section { Section {
if model.snippets.isEmpty { if model.snippets.isEmpty {
Text("Заготовок пока нет.") Text(L("settings.zagotovokPokaNet", "Заготовок пока нет."))
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
.accessibilityLabel("Список заготовок пуст") .accessibilityLabel(L("settings.spisokZagotovokPust", "Список заготовок пуст"))
} }
ForEach(Array(model.snippets.indices), id: \.self) { index in ForEach(Array(model.snippets.indices), id: \.self) { index in
VStack(alignment: .leading, spacing: 6) { VStack(alignment: .leading, spacing: 6) {
HStack(spacing: 8) { HStack(spacing: 8) {
TextField("Что произносится", text: snippetTrigger(at: index)) TextField(L("settings.chtoProiznositsya", "Что произносится"), text: snippetTrigger(at: index))
.accessibilityLabel("Фраза заготовки \(index + 1)") .accessibilityLabel("Фраза заготовки \(index + 1)")
Button(role: .destructive) { Button(role: .destructive) {
model.removeSnippet(at: index) model.removeSnippet(at: index)
@@ -942,16 +942,16 @@ public struct IrizSettingsView: View {
.padding(.vertical, 2) .padding(.vertical, 2)
} }
Button("Добавить заготовку", systemImage: "plus") { Button(L("settings.dobavitZagotovku", "Добавить заготовку"), systemImage: "plus") {
model.addSnippet() model.addSnippet()
} }
.accessibilityLabel("Добавить заготовку") .accessibilityLabel(L("settings.dobavitZagotovku", "Добавить заготовку"))
settingsNote { settingsNote {
Text("Произнесённая фраза заменяется сохранённым текстом — так вставляются шапки, реквизиты и стандартные формулировки. Совпадение точное и по границам слова: «иск» внутри «иска» не сработает, регистр значения не имеет. Заготовки и словарь замен подставляются одним проходом, поэтому текст заготовки словарь уже не переписывает. Сырая расшифровка на диске остаётся нетронутой, а промпт-режим заготовок не видит вовсе.") Text(L("settings.proiznesennayaFrazaZamenyaetsyaS", "Произнесённая фраза заменяется сохранённым текстом — так вставляются шапки, реквизиты и стандартные формулировки. Совпадение точное и по границам слова: «иск» внутри «иска» не сработает, регистр значения не имеет. Заготовки и словарь замен подставляются одним проходом, поэтому текст заготовки словарь уже не переписывает. Сырая расшифровка на диске остаётся нетронутой, а промпт-режим заготовок не видит вовсе."))
.font(.footnote) .font(.footnote)
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
.accessibilityLabel("Произнесённая фраза заменяется сохранённым текстом: шапки, реквизиты, стандартные формулировки. Совпадение точное и по границам слова, регистр не важен. Заготовки и словарь подставляются одним проходом, текст заготовки словарь не переписывает. Сырая расшифровка на диске не меняется, промпт-режим заготовок не видит") .accessibilityLabel(L("settings.proiznesennayaFrazaZamenyaetsyaS2", "Произнесённая фраза заменяется сохранённым текстом: шапки, реквизиты, стандартные формулировки. Совпадение точное и по границам слова, регистр не важен. Заготовки и словарь подставляются одним проходом, текст заготовки словарь не переписывает. Сырая расшифровка на диске не меняется, промпт-режим заготовок не видит"))
} }
} header: { } header: {
sectionHeader(.snippets) sectionHeader(.snippets)
@@ -961,15 +961,15 @@ public struct IrizSettingsView: View {
private var transferSection: some View { private var transferSection: some View {
Section { Section {
HStack { HStack {
Button("Экспортировать…", systemImage: "square.and.arrow.up") { Button(L("settings.eksportirovat", "Экспортировать…"), systemImage: "square.and.arrow.up") {
exportDictionary() exportDictionary()
} }
.accessibilityLabel("Экспортировать словарь и заготовки в файл") .accessibilityLabel(L("settings.eksportirovatSlovarIZagotovki", "Экспортировать словарь и заготовки в файл"))
Button("Импортировать…", systemImage: "square.and.arrow.down") { Button(L("settings.importirovat", "Импортировать…"), systemImage: "square.and.arrow.down") {
importDictionary() importDictionary()
} }
.accessibilityLabel("Импортировать словарь и заготовки из файла") .accessibilityLabel(L("settings.importirovatSlovarIZagotovki", "Импортировать словарь и заготовки из файла"))
} }
if let transferMessage { if let transferMessage {
@@ -981,10 +981,10 @@ public struct IrizSettingsView: View {
} }
settingsNote { settingsNote {
Text("Файл — обычный JSON, его можно открыть и поправить руками. Это единственная копия словаря: всё остальное живёт в настройках системы и исчезает вместе с ними. При импорте совпавшие по фразе записи берутся из файла, а те, которых в файле нет, остаются на месте — импорт ничего не удаляет. Негодный файл отклоняется целиком, с номером испорченной записи: половина восстановленного словаря хуже честного отказа. Импортированное попадает в настройки после кнопки «Сохранить».") Text(L("settings.faylObychnyyJsonEgo", "Файл — обычный JSON, его можно открыть и поправить руками. Это единственная копия словаря: всё остальное живёт в настройках системы и исчезает вместе с ними. При импорте совпавшие по фразе записи берутся из файла, а те, которых в файле нет, остаются на месте — импорт ничего не удаляет. Негодный файл отклоняется целиком, с номером испорченной записи: половина восстановленного словаря хуже честного отказа. Импортированное попадает в настройки после кнопки «Сохранить»."))
.font(.footnote) .font(.footnote)
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
.accessibilityLabel("Файл — обычный JSON, его можно поправить руками. Это единственная копия словаря. При импорте совпавшие по фразе записи берутся из файла, остальные остаются на месте, импорт ничего не удаляет. Негодный файл отклоняется целиком, с номером испорченной записи. Импортированное попадает в настройки после кнопки Сохранить") .accessibilityLabel(L("settings.faylObychnyyJsonEgo2", "Файл — обычный JSON, его можно поправить руками. Это единственная копия словаря. При импорте совпавшие по фразе записи берутся из файла, остальные остаются на месте, импорт ничего не удаляет. Негодный файл отклоняется целиком, с номером испорченной записи. Импортированное попадает в настройки после кнопки Сохранить"))
} }
} header: { } header: {
sectionHeader(.transfer) sectionHeader(.transfer)
@@ -993,7 +993,7 @@ public struct IrizSettingsView: View {
private func exportDictionary() { private func exportDictionary() {
let panel = NSSavePanel() let panel = NSSavePanel()
panel.title = "Экспорт словаря и заготовок" panel.title = L("settings.eksportSlovaryaIZagotovok", "Экспорт словаря и заготовок")
panel.nameFieldStringValue = DictionaryTransfer.suggestedFileName panel.nameFieldStringValue = DictionaryTransfer.suggestedFileName
panel.allowedContentTypes = [.json] panel.allowedContentTypes = [.json]
panel.isExtensionHidden = false panel.isExtensionHidden = false
@@ -1011,7 +1011,7 @@ public struct IrizSettingsView: View {
private func importDictionary() { private func importDictionary() {
let panel = NSOpenPanel() let panel = NSOpenPanel()
panel.title = "Импорт словаря и заготовок" panel.title = L("settings.importSlovaryaIZagotovok", "Импорт словаря и заготовок")
panel.allowedContentTypes = [.json] panel.allowedContentTypes = [.json]
panel.allowsMultipleSelection = false panel.allowsMultipleSelection = false
panel.canChooseDirectories = false panel.canChooseDirectories = false
@@ -1021,7 +1021,7 @@ public struct IrizSettingsView: View {
let data = try Data(contentsOf: url) let data = try Data(contentsOf: url)
let summary = try model.importDictionaryData(data) let summary = try model.importDictionaryData(data)
transferFailed = false transferFailed = false
transferMessage = summary + " Нажмите «Сохранить», чтобы записать." transferMessage = summary + L("settings.nazhmiteSohranitChtobyZapisat", " Нажмите «Сохранить», чтобы записать.")
} catch let error as DictionaryTransferError { } catch let error as DictionaryTransferError {
transferFailed = true transferFailed = true
transferMessage = error.message transferMessage = error.message
@@ -1038,8 +1038,8 @@ public struct IrizSettingsView: View {
Section { Section {
if diskEntries.isEmpty { if diskEntries.isEmpty {
Text(diskCounting Text(diskCounting
? "Считаю…" ? L("settings.schitayu", "Считаю…")
: "Пока ничего не занято: ни модели, ни надиктовок на диске нет.") : L("settings.pokaNichegoNeZanyato", "Пока ничего не занято: ни модели, ни надиктовок на диске нет."))
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
} else { } else {
ForEach(diskEntries) { entry in ForEach(diskEntries) { entry in
@@ -1054,14 +1054,14 @@ public struct IrizSettingsView: View {
Text(diskUsageSizeText(entry.bytes)) Text(diskUsageSizeText(entry.bytes))
.monospacedDigit() .monospacedDigit()
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
Button("Показать") { Button(L("settings.pokazat", "Показать")) {
NSWorkspace.shared.activateFileViewerSelecting([entry.url]) NSWorkspace.shared.activateFileViewerSelecting([entry.url])
} }
.modifier(GlassButton()) .modifier(GlassButton())
} }
} }
HStack { HStack {
Text("Всего") Text(L("settings.vsego", "Всего"))
Spacer() Spacer()
Text(diskUsageSizeText(diskEntries.reduce(0) { $0 + $1.bytes })) Text(diskUsageSizeText(diskEntries.reduce(0) { $0 + $1.bytes }))
.monospacedDigit() .monospacedDigit()
@@ -1069,13 +1069,29 @@ public struct IrizSettingsView: View {
.font(.system(size: 13, weight: .semibold)) .font(.system(size: 13, weight: .semibold))
} }
Text("Удалить отсюда нельзя намеренно: в этих каталогах лежат ваши надиктовки, " Picker(L("settings.hranitNadiktovki", "Хранить надиктовки"), selection: $model.retentionDays) {
+ "а кнопка «очистить», нажатая не глядя, стоит дороже сэкономленного " Text(L("settings.vsegda", "Всегда")).tag(0)
+ "гигабайта. Чистка живёт там, где видно, что именно чистишь, - в окне истории.") Text(L("settings.30Dney", "30 дней")).tag(30)
Text(L("settings.90Dney", "90 дней")).tag(90)
Text(L("settings.god", "Год")).tag(365)
}
.pickerStyle(.menu)
Text(L("settings.srokSchitaetsyaPoDate", "Срок считается по дате папки. Что старше — уходит при следующем запуске, "
+ "молча и без корзины. «Всегда» выключает уборку совсем.\n\n"
+ "Мусор убирается в любом случае и сроку не подчиняется: распакованный "
+ "архив модели, рядом с которым лежит распакованная папка, и карантин "
+ "старше месяца. Терять там нечего — это копии того, что уже есть."))
.font(.footnote)
.foregroundStyle(IRIZ_SUBTLE)
Text(L("settings.knopkiOchistitVseZdes", "Кнопки «очистить всё» здесь нет намеренно: нажатая не глядя, она стоит "
+ "дороже сэкономленного гигабайта. Выборочная чистка живёт там, где видно, "
+ "что именно чистишь, - в окне истории."))
.font(.footnote) .font(.footnote)
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
} header: { } header: {
Text("Место на диске") Text(L("settings.mestoNaDiske", "Место на диске"))
} }
.task(id: page) { .task(id: page) {
guard page == .disk, diskEntries.isEmpty, !diskCounting else { return } guard page == .disk, diskEntries.isEmpty, !diskCounting else { return }
@@ -1090,7 +1106,7 @@ public struct IrizSettingsView: View {
/// настройки на незнакомом языке, ищет именно ее. /// настройки на незнакомом языке, ищет именно ее.
private var languageSection: some View { private var languageSection: some View {
Section { Section {
Picker("Язык интерфейса", selection: $languageChoice) { Picker(L("settings.yazykInterfeysa", "Язык интерфейса"), selection: $languageChoice) {
ForEach(IrizLanguage.allCases, id: \.self) { language in ForEach(IrizLanguage.allCases, id: \.self) { language in
Text(language == .auto Text(language == .auto
? "\(language.ownName) (\(irizResolvedLanguage(choice: .auto, systemPreferred: Locale.preferredLanguages).ownName))" ? "\(language.ownName) (\(irizResolvedLanguage(choice: .auto, systemPreferred: Locale.preferredLanguages).ownName))"
@@ -1101,37 +1117,37 @@ public struct IrizSettingsView: View {
.pickerStyle(.inline) .pickerStyle(.inline)
.onChange(of: languageChoice) { _, choice in .onChange(of: languageChoice) { _, choice in
setIrizLanguageChoice(choice) setIrizLanguageChoice(choice)
statusMessage = "Язык сменится после перезапуска." statusMessage = L("settings.yazykSmenitsyaPoslePerezapuska", "Язык сменится после перезапуска.")
} }
Text("«Авто» берет язык системы. Выбор руками старше системного: " Text(L("settings.avtoBeretYazykSistemy", "«Авто» берет язык системы. Выбор руками старше системного: "
+ "macOS может быть на английском, а интерфейс вам нужен русский.\n\n" + "macOS может быть на английском, а интерфейс вам нужен русский.\n\n"
+ "Смена языка вступает в силу после перезапуска приложения: " + "Смена языка вступает в силу после перезапуска приложения: "
+ "тексты собираются один раз при старте.") + "тексты собираются один раз при старте."))
.font(.footnote) .font(.footnote)
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
} header: { } header: {
Text("Язык") Text(L("settings.yazyk", "Язык"))
} }
} }
/// Расшифровка файлов: бросил запись - получил текст рядом с ней. /// Расшифровка файлов: бросил запись - получил текст рядом с ней.
private var filesSection: some View { private var filesSection: some View {
Section { Section {
IrizDropZone(title: "Перенесите записи сюда", IrizDropZone(title: L("settings.perenesiteZapisiSyuda", "Перенесите записи сюда"),
subtitle: "Диктофон, звонок, экспорт из встречи. Текст ляжет рядом с файлом.", subtitle: L("settings.diktofonZvonokEksportIz", "Диктофон, звонок, экспорт из встречи. Текст ляжет рядом с файлом."),
extensions: AudioFileBatch.supportedExtensions.sorted()) { urls in extensions: AudioFileBatch.supportedExtensions.sorted()) { urls in
enqueue(urls, into: $fileQueue) enqueue(urls, into: $fileQueue)
} }
ForEach(fileQueue) { item in ForEach(fileQueue) { item in
IrizDropRow(item: item) { fileQueue.removeAll { $0.id == item.id } } IrizDropRow(item: item) { fileQueue.removeAll { $0.id == item.id } }
} }
Text("Расшифровка идёт на этом Маке тем же движком, что и диктовка. " Text(L("settings.rasshifrovkaIdetNaEtom", "Расшифровка идёт на этом Маке тем же движком, что и диктовка. "
+ "Звук никуда не отправляется, а сам файл остаётся там, где лежал.") + "Звук никуда не отправляется, а сам файл остаётся там, где лежал."))
.font(.footnote) .font(.footnote)
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
} header: { } header: {
Text("Расшифровка файлов") Text(L("settings.rasshifrovkaFaylov", "Расшифровка файлов"))
} }
} }
@@ -1149,7 +1165,7 @@ public struct IrizSettingsView: View {
private var historySection: some View { private var historySection: some View {
Section { Section {
if historyEntries.isEmpty { if historyEntries.isEmpty {
Text("Пока пусто. Надиктованное появится здесь.") Text(L("settings.pokaPustoNadiktovannoePoyavitsya", "Пока пусто. Надиктованное появится здесь."))
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
} else { } else {
// Системная оправа `.roundedBorder` рисуется непрозрачной // Системная оправа `.roundedBorder` рисуется непрозрачной
@@ -1158,9 +1174,9 @@ public struct IrizSettingsView: View {
HStack(spacing: 8) { HStack(spacing: 8) {
IrizGlyphView(.history, size: 13) IrizGlyphView(.history, size: 13)
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
TextField("Поиск по надиктовкам", text: $historyQuery) TextField(L("settings.poiskPoNadiktovkam", "Поиск по надиктовкам"), text: $historyQuery)
.textFieldStyle(.plain) .textFieldStyle(.plain)
.accessibilityLabel("Поиск по надиктовкам") .accessibilityLabel(L("settings.poiskPoNadiktovkam", "Поиск по надиктовкам"))
} }
.padding(.horizontal, 10) .padding(.horizontal, 10)
.padding(.vertical, 7) .padding(.vertical, 7)
@@ -1182,12 +1198,12 @@ public struct IrizSettingsView: View {
.frame(maxWidth: .infinity, alignment: .leading) .frame(maxWidth: .infinity, alignment: .leading)
.contentShape(Rectangle()) .contentShape(Rectangle())
.contextMenu { .contextMenu {
Button("Копировать") { copyHistory(entry) } Button(L("settings.kopirovat", "Копировать")) { copyHistory(entry) }
} }
} }
} }
} header: { } header: {
Text("История надиктовок") Text(L("settings.istoriyaNadiktovok", "История надиктовок"))
} }
.onAppear { loadHistory() } .onAppear { loadHistory() }
} }
@@ -1196,19 +1212,28 @@ public struct IrizSettingsView: View {
// Читается с диска при каждом открытии страницы, а не держится в // Читается с диска при каждом открытии страницы, а не держится в
// памяти: диктовки пишутся другим процессом окна, и кэш разъехался бы // памяти: диктовки пишутся другим процессом окна, и кэш разъехался бы
// с диском ровно тогда, когда владелец ищет только что сказанное. // с диском ровно тогда, когда владелец ищет только что сказанное.
historyEntries = (try? dictationHistoryEntries(in: DictationStore.dictationsDirectory())) ?? [] //
// В ФОНЕ и с потолком. Здесь стоял тот же дефект, что в окне истории:
// две тысячи каталогов по три файла читались синхронно, 1386 мс, и всё
// это время окно настроек не рисовалось. Владелец поймал это дважды -
// сперва в окне, потом на этой странице.
guard let root = try? DictationStore.dictationsDirectory() else { return }
Task.detached(priority: .userInitiated) {
let found = dictationHistoryEntries(in: root, limit: DICTATION_HISTORY_VISIBLE_LIMIT)
await MainActor.run { historyEntries = found }
}
} }
private func copyHistory(_ entry: DictationHistoryEntry) { private func copyHistory(_ entry: DictationHistoryEntry) {
NSPasteboard.general.clearContents() NSPasteboard.general.clearContents()
NSPasteboard.general.setString(entry.displayText, forType: .string) NSPasteboard.general.setString(entry.displayText, forType: .string)
statusMessage = "Скопировано в буфер обмена." statusMessage = L("settings.skopirovanoVBuferObmena", "Скопировано в буфер обмена.")
} }
private var meetingsSection: some View { private var meetingsSection: some View {
Section { Section {
IrizDropZone(title: "Перенесите запись встречи", IrizDropZone(title: L("settings.perenesiteZapisVstrechi", "Перенесите запись встречи"),
subtitle: "Запись заседания или созвона. Рядом ляжет протокол.", subtitle: L("settings.zapisZasedaniyaIliSozvona", "Запись заседания или созвона. Рядом ляжет протокол."),
extensions: AudioFileBatch.supportedExtensions.sorted()) { urls in extensions: AudioFileBatch.supportedExtensions.sorted()) { urls in
enqueue(urls, into: $meetingQueue) enqueue(urls, into: $meetingQueue)
} }
@@ -1217,10 +1242,10 @@ public struct IrizSettingsView: View {
} }
if !meetingQueue.isEmpty { if !meetingQueue.isEmpty {
Button("Разобрать записи") { runMeetings() } Button(L("settings.razobratZapisi", "Разобрать записи")) { runMeetings() }
.modifier(GlassProminentButton()) .modifier(GlassProminentButton())
.disabled(meetingProgress != nil) .disabled(meetingProgress != nil)
.accessibilityLabel("Разобрать записи встреч") .accessibilityLabel(L("settings.razobratZapisiVstrech", "Разобрать записи встреч"))
} }
if let meetingProgress { if let meetingProgress {
@@ -1243,13 +1268,13 @@ public struct IrizSettingsView: View {
// Здесь продукт нарушает собственное правило, и молчать об этом // Здесь продукт нарушает собственное правило, и молчать об этом
// нельзя: в диктовке звук не сохраняется никогда, а у встречи он // нельзя: в диктовке звук не сохраняется никогда, а у встречи он
// остаётся вместе с расшифровкой. Иначе протокол нечем сверить. // остаётся вместе с расшифровкой. Иначе протокол нечем сверить.
Text("Разница с диктовкой названа прямо: у встречи сохраняется и звук, и расшифровка. " Text(L("settings.raznicaSDiktovkoyNazvana", "Разница с диктовкой названа прямо: у встречи сохраняется и звук, и расшифровка. "
+ "В обычной диктовке звук не сохраняется никогда. Файлы лежат на вашем диске " + "В обычной диктовке звук не сохраняется никогда. Файлы лежат на вашем диске "
+ "открытым текстом под правами 0600: шифрование диска даёт FileVault, а не приложение.") + "открытым текстом под правами 0600: шифрование диска даёт FileVault, а не приложение."))
.font(.footnote) .font(.footnote)
.foregroundStyle(IRIZ_SUBTLE) .foregroundStyle(IRIZ_SUBTLE)
} header: { } header: {
Text("Встречи") Text(L("settings.vstrechi", "Встречи"))
} }
} }
@@ -1295,7 +1320,7 @@ public struct IrizSettingsView: View {
} }
meetingProgress = nil meetingProgress = nil
meetingFailed = !failures.isEmpty meetingFailed = !failures.isEmpty
let base = done > 0 ? "Разобрано записей: \(done)." : "Разобрать не удалось." let base = done > 0 ? "Разобрано записей: \(done)." : L("settings.razobratNeUdalos", "Разобрать не удалось.")
meetingReport = failures.isEmpty ? base : base + " " + failures.joined(separator: "; ") meetingReport = failures.isEmpty ? base : base + " " + failures.joined(separator: "; ")
} }
} }
@@ -1391,19 +1416,19 @@ public enum SettingsPage: String, CaseIterable, Identifiable, Hashable {
public var title: String { public var title: String {
switch self { switch self {
case .history: return "История" case .history: return L("settings.istoriya", "История")
case .language: return "Язык" case .language: return L("settings.yazyk", "Язык")
case .files: return "Расшифровка файлов" case .files: return L("settings.rasshifrovkaFaylov", "Расшифровка файлов")
case .meetings: return "Встречи" case .meetings: return L("settings.vstrechi", "Встречи")
case .keys: return "Клавиши" case .keys: return L("settings.klavishi", "Клавиши")
case .layout: return "Раскладка" case .layout: return L("settings.raskladka2", "Раскладка")
case .dictation: return "Диктовка" case .dictation: return L("settings.diktovka", "Диктовка")
case .plate: return "Плашка" case .plate: return L("settings.plashka", "Плашка")
case .dictionary: return "Словарь замен" case .dictionary: return L("settings.slovarZamen", "Словарь замен")
case .snippets: return "Заготовки" case .snippets: return L("settings.zagotovki", "Заготовки")
case .prompt: return "Промпт-режим" case .prompt: return L("settings.promptRezhim", "Промпт-режим")
case .transfer: return "Перенос" case .transfer: return L("settings.perenos", "Перенос")
case .disk: return "Место на диске" case .disk: return L("settings.mestoNaDiske", "Место на диске")
} }
} }
} }
+12 -5
View File
@@ -1,3 +1,4 @@
import IrizCore
import CoreGraphics import CoreGraphics
import Foundation import Foundation
import IrizDictate import IrizDictate
@@ -72,13 +73,19 @@ public enum MenuKeys {
/// Сторона клавиши по коду: глифа «правый ⌘» в системе нет, а разница /// Сторона клавиши по коду: глифа «правый ⌘» в системе нет, а разница
/// существенная — на левом Command хоткей не сработает. /// существенная — на левом Command хоткей не сработает.
private static let sidedModifierNames: [CGKeyCode: String] = [ /// Слова «левый» и «правый» переводятся, глифы - нет: ⌘ и ⌥ одинаковы во
59: "левый ⌃", 62: "правый ⌃", /// всех языках, а сторона на левом Command решает, сработает хоткей или нет.
58: "левый ⌥", 61: "правый ⌥", private static var sidedModifierNames: [CGKeyCode: String] {
56: "левый ⇧", 60: "правый ⇧", let left = L("key.left", "левый")
55: "левый ⌘", 54: "правый ⌘", let right = L("key.right", "правый")
return [
59: "\(left) ⌃", 62: "\(right) ⌃",
58: "\(left) ⌥", 61: "\(right) ⌥",
56: "\(left) ⇧", 60: "\(right) ⇧",
55: "\(left) ⌘", 54: "\(right) ⌘",
63: "fn", 63: "fn",
] ]
}
/// Клавиши без буквы — глифами macOS, иначе в русском меню всплывёт «Space». /// Клавиши без буквы — глифами macOS, иначе в русском меню всплывёт «Space».
private static let namedKeyGlyphs: [String: String] = [ private static let namedKeyGlyphs: [String: String] = [
+25 -8
View File
@@ -18,12 +18,12 @@ enum HotkeyAction: String, CaseIterable, Identifiable {
var title: String { var title: String {
switch self { switch self {
case .dictation: "Диктовка" case .dictation: L("hotkey.dictation", L("hotkey.dictation", "Диктовка"))
case .dictationAndEnter: "Диктовка с переводом строки" case .dictationAndEnter: L("hotkey.dictationEnter", "Диктовка с переводом строки")
case .prompt: "Речь → промпт" case .prompt: L("hotkey.prompt", L("hotkey.prompt", "Речь → промпт"))
case .history: "История" case .history: L("hotkey.history", L("hotkey.history", "История"))
case .layoutConversion: "Конвертация раскладки" case .layoutConversion: L("hotkey.layoutConversion", L("hotkey.layoutConversion", "Конвертация раскладки"))
case .layoutSwitch: "Переключение раскладки" case .layoutSwitch: L("hotkey.layoutSwitch", L("hotkey.layoutSwitch", "Переключение раскладки"))
} }
} }
} }
@@ -182,6 +182,8 @@ final class SettingsModel: ObservableObject {
@Published var snippets: [DictationSnippet] @Published var snippets: [DictationSnippet]
/// Свои инструкции промпт-режима. Обычная диктовка их не видит. /// Свои инструкции промпт-режима. Обычная диктовка их не видит.
/// Размер плашки записи. /// Размер плашки записи.
/// Через сколько дней уборка стирает надиктовку. 0 - не стирать никогда.
@Published var retentionDays: Int
@Published var hudSize: DictationHUDSizeChoice @Published var hudSize: DictationHUDSizeChoice
@Published var promptGuidanceInstructions: String @Published var promptGuidanceInstructions: String
/// Примеры «как сказал - какой промпт хочу». /// Примеры «как сказал - какой промпт хочу».
@@ -254,6 +256,7 @@ final class SettingsModel: ObservableObject {
speechCleanupMode = dictationSettings.speechCleanupMode speechCleanupMode = dictationSettings.speechCleanupMode
corrections = dictationSettings.transcriptCorrections corrections = dictationSettings.transcriptCorrections
snippets = dictationSettings.snippets snippets = dictationSettings.snippets
retentionDays = dictationSettings.dictationRetentionDays
hudSize = dictationSettings.dictationHUDSize hudSize = dictationSettings.dictationHUDSize
let guidance = dictationSettings.promptUserGuidance let guidance = dictationSettings.promptUserGuidance
promptGuidanceInstructions = guidance.instructions promptGuidanceInstructions = guidance.instructions
@@ -365,8 +368,18 @@ final class SettingsModel: ObservableObject {
hotkeys[action] = HotkeyBinding(choice: choice) hotkeys[action] = HotkeyBinding(choice: choice)
} }
/// Новая замена встаёт СВЕРХУ.
///
/// Слова владельца 06.09.2026: «логичнее, чтобы сверху, потому что чтобы
/// перечитать весь словарь замен, можно потратить время. А если я хочу
/// добавить новую, мне придётся полностью всю эту портянку прокрутить
/// донизу и только потом ставить».
///
/// Порядок в словаре на подстановку не влияет: совпадение точное и по
/// границам слова, а не «первое подошедшее». Значит верх свободен и его
/// занимает то, ради чего список открыли.
func addCorrection(source: String = "", replacement: String = "") { func addCorrection(source: String = "", replacement: String = "") {
corrections.append(TranscriptCorrection(source: source, replacement: replacement)) corrections.insert(TranscriptCorrection(source: source, replacement: replacement), at: 0)
} }
func updateCorrection(at index: Int, source: String? = nil, replacement: String? = nil) { func updateCorrection(at index: Int, source: String? = nil, replacement: String? = nil) {
@@ -385,8 +398,10 @@ final class SettingsModel: ObservableObject {
// MARK: - Заготовки // MARK: - Заготовки
/// Новая заготовка тоже встаёт сверху - по той же причине и тем же
/// правилом, что и замена: список читают редко, дописывают часто.
func addSnippet(trigger: String = "", body: String = "") { func addSnippet(trigger: String = "", body: String = "") {
snippets.append(DictationSnippet(trigger: trigger, body: body)) snippets.insert(DictationSnippet(trigger: trigger, body: body), at: 0)
} }
func updateSnippet(at index: Int, trigger: String? = nil, body: String? = nil) { func updateSnippet(at index: Int, trigger: String? = nil, body: String? = nil) {
@@ -514,6 +529,7 @@ final class SettingsModel: ObservableObject {
dictationSettings.speechCleanupMode = speechCleanupMode dictationSettings.speechCleanupMode = speechCleanupMode
dictationSettings.transcriptCorrections = corrections dictationSettings.transcriptCorrections = corrections
dictationSettings.snippets = snippets dictationSettings.snippets = snippets
dictationSettings.dictationRetentionDays = retentionDays
dictationSettings.dictationHUDSize = hudSize dictationSettings.dictationHUDSize = hudSize
dictationSettings.promptUserGuidance = PromptUserGuidance( dictationSettings.promptUserGuidance = PromptUserGuidance(
instructions: promptGuidanceInstructions, instructions: promptGuidanceInstructions,
@@ -536,6 +552,7 @@ final class SettingsModel: ObservableObject {
agentCustomArguments = customArgumentsList.joined(separator: "\n") agentCustomArguments = customArgumentsList.joined(separator: "\n")
corrections = dictationSettings.transcriptCorrections corrections = dictationSettings.transcriptCorrections
snippets = dictationSettings.snippets snippets = dictationSettings.snippets
retentionDays = dictationSettings.dictationRetentionDays
hudSize = dictationSettings.dictationHUDSize hudSize = dictationSettings.dictationHUDSize
let guidance = dictationSettings.promptUserGuidance let guidance = dictationSettings.promptUserGuidance
promptGuidanceInstructions = guidance.instructions promptGuidanceInstructions = guidance.instructions
@@ -13,15 +13,35 @@ import Testing
@Suite("счётчики: разбивка отказов вставки") @Suite("счётчики: разбивка отказов вставки")
struct InsertionBreakdownTests { struct InsertionBreakdownTests {
private func freshDefaults() -> UserDefaults { /// Домен настроек, который сам за собой убирает.
///
/// Прежде здесь стоял `freshDefaults()`: он чистил домен ТОЛЬКО ДО работы, и
/// каждый прогон тестов оставлял на диске владельца один домен и один plist.
/// К 06.09.2026 их накопилось 858 штук, и нашло их не внимание, а ворота
/// уборки `scripts/tidy_gate.sh`. Класс, а не функция, ровно ради `deinit`:
/// он срабатывает и когда проба падает на полпути.
private final class IsolatedDefaults {
let suite = "iriz.tests.insertion.\(UUID().uuidString)" let suite = "iriz.tests.insertion.\(UUID().uuidString)"
let defaults = UserDefaults(suiteName: suite)! let defaults: UserDefaults
init() {
defaults = UserDefaults(suiteName: suite)!
defaults.removePersistentDomain(forName: suite) defaults.removePersistentDomain(forName: suite)
return defaults }
deinit {
defaults.removePersistentDomain(forName: suite)
// Одного забвения домена мало: cfprefsd дописывает plist обратно уже
// после выхода процесса, и файл остаётся в ~/Library/Preferences.
let url = FileManager.default.homeDirectoryForCurrentUser
.appendingPathComponent("Library/Preferences/\(suite).plist")
try? FileManager.default.removeItem(at: url)
}
} }
@Test func причинаПишетсяРядомСФактом() { @Test func причинаПишетсяРядомСФактом() {
let stats = InsertionStats(defaults: freshDefaults()) let box = IsolatedDefaults()
let stats = InsertionStats(defaults: box.defaults)
stats.record(delivered: false, reason: "targetNeverRequestedText") stats.record(delivered: false, reason: "targetNeverRequestedText")
stats.record(delivered: false, reason: "targetNeverRequestedText") stats.record(delivered: false, reason: "targetNeverRequestedText")
stats.record(delivered: false, reason: "insertionFailed") stats.record(delivered: false, reason: "insertionFailed")
@@ -35,7 +55,8 @@ struct InsertionBreakdownTests {
} }
@Test func суммаПричинНеБольшеОбщегоЧисла() { @Test func суммаПричинНеБольшеОбщегоЧисла() {
let stats = InsertionStats(defaults: freshDefaults()) let box = IsolatedDefaults()
let stats = InsertionStats(defaults: box.defaults)
for reason in INSERTION_FAILURE_REASONS { stats.record(delivered: false, reason: reason) } for reason in INSERTION_FAILURE_REASONS { stats.record(delivered: false, reason: reason) }
let sum = INSERTION_FAILURE_REASONS.reduce(0) { $0 + stats.failures(reason: $1) } let sum = INSERTION_FAILURE_REASONS.reduce(0) { $0 + stats.failures(reason: $1) }
#expect(sum == stats.failures) #expect(sum == stats.failures)
@@ -44,7 +65,8 @@ struct InsertionBreakdownTests {
@Test func нечегоВставлятьСчитаетсяОтдельноОтОтказов() { @Test func нечегоВставлятьСчитаетсяОтдельноОтОтказов() {
// Вставка не провалилась - её не было. На диске эти случаи неотличимы, // Вставка не провалилась - её не было. На диске эти случаи неотличимы,
// и именно поэтому 12,6 % каталогов без вставки спорили с 5,8 % отказов. // и именно поэтому 12,6 % каталогов без вставки спорили с 5,8 % отказов.
let stats = InsertionStats(defaults: freshDefaults()) let box = IsolatedDefaults()
let stats = InsertionStats(defaults: box.defaults)
stats.recordNothingToInsert() stats.recordNothingToInsert()
stats.recordNothingToInsert() stats.recordNothingToInsert()
#expect(stats.nothingToInsert == 2) #expect(stats.nothingToInsert == 2)
@@ -55,7 +77,8 @@ struct InsertionBreakdownTests {
@Test func старыйВызовБезПричиныПродолжаетРаботать() { @Test func старыйВызовБезПричиныПродолжаетРаботать() {
// История владельца лежит в общем ключе, и терять её ради красоты // История владельца лежит в общем ключе, и терять её ради красоты
// нельзя: разбивка добавлена рядом, а не вместо. // нельзя: разбивка добавлена рядом, а не вместо.
let stats = InsertionStats(defaults: freshDefaults()) let box = IsolatedDefaults()
let stats = InsertionStats(defaults: box.defaults)
stats.record(delivered: false) stats.record(delivered: false)
#expect(stats.failures == 1) #expect(stats.failures == 1)
#expect(stats.failureBreakdown(reasons: INSERTION_FAILURE_REASONS).isEmpty) #expect(stats.failureBreakdown(reasons: INSERTION_FAILURE_REASONS).isEmpty)
@@ -0,0 +1,126 @@
// Проба уборки: что удаляется, а что не имеет права удалиться никогда.
//
// Правило живёт здесь, а не во внимании: уборка стирает файлы владельца, и
// цена ошибки - потерянная надиктовка, которую взять больше неоткуда.
import Foundation
import Testing
@testable import IrizDictate
@Suite("уборка: план считается без диска")
struct DictationHousekeepingTests {
private let now = Date(timeIntervalSince1970: 1_800_000_000)
private func entry(_ name: String, days: Double, dir: Bool = true,
bytes: Int64 = 1024, twin: Bool = false) -> DictationHousekeepingEntry {
DictationHousekeepingEntry(url: URL(fileURLWithPath: "/tmp/\(name)"),
isDirectory: dir,
modified: now.addingTimeInterval(-days * 86_400),
bytes: bytes,
hasUnpackedTwin: twin)
}
/// Архив, распакованный каталог которого лежит рядом, - доказуемо лишний.
/// Ровно он съел 1,1 ГБ у владельца.
@Test func распакованныйАрхивУходит() {
let plan = dictationHousekeepingPlan(
models: [entry("ggml-large-v3-encoder.mlmodelc", days: 1),
entry("ggml-large-v3-encoder.mlmodelc.zip", days: 1, dir: false,
bytes: 1_175_711_232, twin: true)],
retentionDays: 90, now: now)
#expect(plan.count == 1)
#expect(plan.first?.kind == .unpackedArchive)
#expect(plan.first?.url.lastPathComponent == "ggml-large-v3-encoder.mlmodelc.zip")
}
/// А архив БЕЗ распакованного близнеца не трогаем: он единственный носитель.
@Test func одинокийАрхивОстаётся() {
let plan = dictationHousekeepingPlan(
models: [entry("model.zip", days: 400, dir: false, twin: false)],
retentionDays: 90, now: now)
#expect(plan.isEmpty, "удалён архив, распаковки которого нет — модель потеряна")
}
/// Ноль дней значит «надиктовки не трогать». Мусор при этом убирается:
/// он не сырьё.
@Test func нольДнейВыключаетУборкуНадиктовок() {
let plan = dictationHousekeepingPlan(
models: [entry("a.mlmodelc", days: 1),
entry("a.mlmodelc.zip", days: 1, dir: false, twin: true)],
dictations: [entry("2020-01-01_00-00-00", days: 3000)],
retentionDays: 0, now: now)
#expect(plan.map(\.kind) == [.unpackedArchive])
}
/// Свежая надиктовка не уходит НИ ПРИ КАКОМ сроке.
@Test func свежаяНадиктовкаОстаётся() {
let plan = dictationHousekeepingPlan(
dictations: [entry("вчерашняя", days: 1), entry("старая", days: 200)],
retentionDays: 90, now: now)
#expect(plan.count == 1)
#expect(plan.first?.url.lastPathComponent == "старая")
#expect(plan.first?.kind == .agedDictation)
}
/// Граница срока не съедает день: ровно на сроке надиктовка ещё живёт.
@Test func границаСрокаНеСъедаетДень() {
let onEdge = dictationHousekeepingPlan(
dictations: [entry("ровно", days: 90)], retentionDays: 90, now: now)
#expect(onEdge.isEmpty)
let past = dictationHousekeepingPlan(
dictations: [entry("на день позже", days: 90.5)], retentionDays: 90, now: now)
#expect(past.count == 1)
}
/// Карантин старше месяца уходит, свежий остаётся.
@Test func карантинУходитПоСроку() {
let plan = dictationHousekeepingPlan(
quarantines: [entry("dictations-quarantine-старый", days: 40),
entry("dictations-quarantine-свежий", days: 3)],
retentionDays: 0, now: now)
#expect(plan.count == 1)
#expect(plan.first?.kind == .staleQuarantine)
}
/// Потолок числа: хранится 500 последних, остальное уходит независимо от
/// срока. Решение владельца 06.09.2026 — «пусть 500 последних».
@Test func потолокЧислаРежетЛишнееДажеБезСрока() {
let many = (0..<12).map { i in
entry(String(format: "2026-09-%02d_10-00-00", 30 - i), days: Double(i))
}
let plan = dictationHousekeepingPlan(dictations: many,
retentionDays: 0, keepLimit: 5, now: now)
#expect(plan.count == 7, "потолок 5 из 12 оставил не то число")
#expect(plan.allSatisfy { $0.kind == .agedDictation })
// Свежие пять - на месте. Свежесть считается ИМЕНЕМ каталога.
let deleted = Set(plan.map { $0.url.lastPathComponent })
#expect(!deleted.contains("2026-09-30_10-00-00"))
#expect(!deleted.contains("2026-09-26_10-00-00"))
#expect(deleted.contains("2026-09-25_10-00-00"))
}
/// Срок и потолок не удаляют одно и то же дважды.
@Test func срокИПотолокНеДублируютДругДруга() {
let many = (0..<8).map { i in
entry(String(format: "2026-01-%02d_10-00-00", 20 - i), days: Double(i) + 200)
}
let plan = dictationHousekeepingPlan(dictations: many,
retentionDays: 90, keepLimit: 3, now: now)
#expect(plan.count == 8, "старое посчиталось дважды")
#expect(Set(plan.map(\.url)).count == plan.count)
}
/// Итог уборки говорит владельцу, что именно стёрли и сколько.
@Test func итогНазываетСоставИРазмер() {
let plan = dictationHousekeepingPlan(
models: [entry("a.mlmodelc", days: 1),
entry("a.mlmodelc.zip", days: 1, dir: false, bytes: 1_000_000_000, twin: true)],
dictations: [entry("старая", days: 200, bytes: 2048)],
retentionDays: 90, now: now)
let text = dictationHousekeepingSummary(plan)
#expect(text.contains("распакованных архивов 1"))
#expect(text.contains("надиктовок старше срока 1"))
#expect(text.contains("ГБ") || text.contains("GB"))
#expect(dictationHousekeepingSummary([]) == "уборка: мусора нет")
}
}
@@ -57,19 +57,12 @@ struct FamilyAccentTests {
#expect(Set(titles).count == titles.count, "имена секций повторяются: \(titles)") #expect(Set(titles).count == titles.count, "имена секций повторяются: \(titles)")
} }
@Test func смыслАкцентаНазванДляКаждойСекции() { @Test func акцентСекцийОдинНаВсех() {
// Золото - личное владельца, голубой - поток. Секции без смысла // Решение владельца 06.09.2026: «какие-то золотые, какие-то синие, это
// не бывает: акцент по вкусу и есть декорация, которую канон запрещает. // странно, они должны быть одинаковые». Проба стережёт именно это -
let personal = SettingsSectionSpec.allCases.filter { $0.accent == .personal } // второй цвет в заголовках секций не имеет права вернуться незаметно.
let flow = SettingsSectionSpec.allCases.filter { $0.accent == .flow } let accents = Set(SettingsSectionSpec.allCases.map(\.accent))
#expect(!personal.isEmpty && !flow.isEmpty) #expect(accents == [.personal], "в заголовках секций больше одного акцента: \(accents)")
#expect(personal.count + flow.count == SettingsSectionSpec.allCases.count)
// Словарь и заготовки - это личное владельца по построению.
#expect(SettingsSectionSpec.corrections.accent == .personal)
#expect(SettingsSectionSpec.snippets.accent == .personal)
// Клавиши и вставка - поток: они про то, что приходит и уходит.
#expect(SettingsSectionSpec.hotkeys.accent == .flow)
#expect(SettingsSectionSpec.behavior.accent == .flow)
} }
@Test func формулаКонтрастаСчитаетИзвестныеЗначения() { @Test func формулаКонтрастаСчитаетИзвестныеЗначения() {
@@ -56,15 +56,18 @@ struct SettingsSnippetsTests {
let fixture = TransferFixture() let fixture = TransferFixture()
let model = fixture.makeModel() let model = fixture.makeModel()
// Новая заготовка встаёт СВЕРХУ (решение владельца 06.09.2026), поэтому
// после двух добавлений первой в списке лежит «вторая фраза».
model.addSnippet(trigger: "первая фраза", body: "тело") model.addSnippet(trigger: "первая фраза", body: "тело")
model.addSnippet(trigger: "вторая фраза", body: "тело") model.addSnippet(trigger: "вторая фраза", body: "тело")
#expect(model.save()) #expect(model.save())
#expect(fixture.dictationSettings.snippets.count == 2) #expect(fixture.dictationSettings.snippets.map(\.trigger)
== ["вторая фраза", "первая фраза"])
model.removeSnippet(at: 0) model.removeSnippet(at: 0)
#expect(model.save()) #expect(model.save())
#expect(fixture.dictationSettings.snippets #expect(fixture.dictationSettings.snippets
== [DictationSnippet(trigger: "вторая фраза", body: "тело")]) == [DictationSnippet(trigger: "первая фраза", body: "тело")])
} }
@Test func сбросКЗаводскимОчищаетЗаготовки() { @Test func сбросКЗаводскимОчищаетЗаготовки() {
+90
View File
@@ -0,0 +1,90 @@
# The conversation at the first install
<!-- owner-greeting:start -->
<p align="center"><img src="assets/pantheon/doc-onboarding.png" alt="Iris sets a tablet on a low table by a column, the gold ribbon of voice settles into the carved groove" width="100%"></p>
Hello. I am Fil, a lawyer who vibe-codes, and I wrote iriz.
From here an agent takes over. It will tell you what it is about to do BEFORE it does it, and
name the price of every step: what appears on the disk, where the time goes, where you have a
choice. If something does not suit you, say so right in the chat — a step can be skipped.
One promise this whole thing was built for: the audio of your speech never leaves the machine.
The single trip to the network is the speech model download, and you start it with a button.
<!-- owner-greeting:end -->
## Step 1: look at what you are running
**What I do:** check the macOS version, the processor, and whether Xcode with Swift 6 is here.
**Why:** iriz lives on macOS 14 and newer. The glass plate and real Liquid Glass are macOS 26;
on 14 and 15 the app works, but the plate is drawn the old way. Better to know that now than
after the build.
**What changes on disk:** nothing. This is reading.
**What you get:** an answer whether we go on, and which visual branch you land on.
**Fork:** no Xcode is not a problem. Take the ready disk image from the Releases page and we
skip the build steps.
## Step 2: bring the sources in
**What I do:** clone the repository into a folder you name, or unpack the ZIP.
**Why:** everything after this happens inside that folder, and it should sit where you will
find it later.
**What changes on disk:** one folder appears, about 40 MB. Nothing else is written anywhere.
**What you get:** a project tree where you can see `Sources`, `Tests`, `scripts` and `docs`.
## Step 3: build the app
**What I do:** run `bash install.sh`, read its report with you, and only then
`bash install.sh --build`.
**Why:** without the flag the installer installs nothing. It explains what the program is,
looks at what your machine is missing, and runs a self-check of the tree. This is your chance
to stop before anything happens.
**What changes on disk:** the first command changes nothing. The second pulls Swift
dependencies (about 300 MB into `.build`) and puts the finished app into `/Applications`.
**What you get:** an icon in the menu bar at the top right, and the welcome window.
**Fork:** if you would rather not hand over `/Applications`, say so — we build into the project
folder and run it from there.
## Step 4: grant the permissions and download the model
**What I do:** walk you through three macOS permissions — microphone, Accessibility, Input
Monitoring — and start the speech model download.
**Why:** without the microphone there is nothing to hear, without Accessibility there is
nowhere to paste, without Input Monitoring the key is not heard at all. The model is the half
a gigabyte for which the app goes online exactly once.
**What changes on disk:** the model lands in `~/Library/Application Support/iriz/Models`. The
permissions are written into the macOS database, not into the app.
**What you get:** working dictation. Press the key, say a sentence, press again — the text
lands where the cursor was blinking.
## Step 5: check that it is all honest
**What I do:** run the project gates and show you their whole output.
**Why:** the promise «the audio never leaves the machine» is checked by an instrument, not by a
paragraph in the README. The gate kicks the set of networking symbols in the built binary and
asks the kernel whether the running app holds a single open socket.
**What changes on disk:** nothing. The gates only read and count.
**What you get:** a green report you saw with your own eyes instead of taking on trust.
```bash
bash scripts/verify.sh && bash scripts/offline_binary_gate.sh
```
+90
View File
@@ -0,0 +1,90 @@
# Разговор при первой установке
<!-- owner-greeting:start -->
<p align="center"><img src="assets/pantheon/doc-onboarding.png" alt="Ирида ставит табличку на низкий стол у колонны, золотая лента голоса ложится в высеченную борозду" width="100%"></p>
Привет. Я Фил, юрист и вайб-кодер, и это я написал iriz.
Дальше вами займется агент. Он будет говорить, что делает, ДО того как сделает, и называть цену
каждого шага: что появится на диске, куда уйдет время, где у вас есть выбор. Если что-то из
сказанного вам не подходит — скажите об этом прямо в чате, шаг можно пропустить.
Одно обещание, ради которого все затевалось: звук вашей речи не уходит с машины. Единственный
поход в сеть — скачивание модели распознавания, и запускаете его вы кнопкой.
<!-- owner-greeting:end -->
## Шаг 1: смотрим, на чем вы запускаете
**Что я делаю:** проверяю версию macOS, процессор и наличие Xcode со Swift 6.
**Зачем:** iriz живет на macOS 14 и новее. Стеклянная плашка и настоящий Liquid Glass — это
macOS 26; на 14 и 15 приложение работает, но плашка рисуется прежним способом. Знать это лучше
сейчас, чем после сборки.
**Что меняется на диске:** ничего. Это чтение.
**Что вы получите:** ответ, пойдет ли дальше, и на какой ветке визуала вы окажетесь.
**Развилка:** нет Xcode — не беда. Возьмите готовый образ со страницы Releases, и шаги про
сборку мы пропустим.
## Шаг 2: приносим исходники
**Что я делаю:** клонирую репозиторий в папку, которую вы назовете, или распаковываю ZIP.
**Зачем:** дальше все делается внутри этой папки, и она должна быть там, где вам удобно ее
потом найти.
**Что меняется на диске:** появляется одна папка, около 40 МБ. Больше ничего никуда не пишется.
**Что вы получите:** дерево проекта, в котором видно `Sources`, `Tests`, `scripts` и `docs`.
## Шаг 3: собираем приложение
**Что я делаю:** запускаю `bash install.sh`, читаю его отчет, и только потом
`bash install.sh --build`.
**Зачем:** без флага установщик ничего не ставит. Он рассказывает, что это за программа,
смотрит, чего не хватает на машине, и гоняет самопроверку дерева. Это ваша возможность
остановиться до того, как что-то произойдет.
**Что меняется на диске:** первая команда не меняет ничего. Вторая тянет зависимости Swift
(около 300 МБ в `.build`) и кладет готовое приложение в `/Applications`.
**Что вы получите:** значок в строке меню наверху справа и окно знакомства.
**Развилка:** не хотите отдавать `/Applications` — скажите, соберем в папку проекта и запустим
оттуда.
## Шаг 4: выдаем разрешения и качаем модель
**Что я делаю:** веду вас по трем разрешениям macOS — микрофон, Универсальный доступ,
Мониторинг ввода — и запускаю скачивание модели распознавания.
**Зачем:** без микрофона нечего слушать, без Универсального доступа некуда вставить текст, без
Мониторинга ввода не слышно клавишу. Модель — это те самые полгигабайта, ради которых
приложение один раз идет в сеть.
**Что меняется на диске:** модель ложится в `~/Library/Application Support/iriz/Models`.
Разрешения записываются в системную базу macOS, а не в приложение.
**Что вы получите:** рабочую диктовку. Нажали клавишу, сказали фразу, нажали еще раз — текст
встал туда, где мигал курсор.
## Шаг 5: проверяем, что все честно
**Что я делаю:** прогоняю ворота проекта и показываю вам их вывод целиком.
**Зачем:** обещание «звук не уходит с машины» проверяется прибором, а не абзацем в README.
Ворота пинают набор сетевых символов в собранном бинарнике и спрашивают у ядра, есть ли у
работающего приложения хоть один открытый сокет.
**Что меняется на диске:** ничего. Ворота только читают и считают.
**Что вы получите:** зеленый отчет, который вы видели своими глазами, а не поверили на слово.
```bash
bash scripts/verify.sh && bash scripts/offline_binary_gate.sh
```
+80
View File
@@ -0,0 +1,80 @@
# 首次安装时的对话
<!-- owner-greeting:start -->
<p align="center"><img src="assets/pantheon/doc-onboarding.png" alt="伊里斯把石板放在柱旁的矮桌上,金色的声音丝带落入刻好的凹槽" width="100%"></p>
你好。我是 Fil,一名会写代码的律师,iriz 是我做的。
接下来由代理带你走。它会在动手之前先说明要做什么,并说清每一步的代价:磁盘上会多出什么、时间花
在哪里、哪里由你选择。如果哪一步不合适,直接在对话里说,可以跳过。
这件事从头到尾只为一个承诺:你说话的声音不会离开这台机器。唯一一次联网是下载识别模型,而且由你
按下按钮才开始。
<!-- owner-greeting:end -->
## 第 1 步:先看看你在什么机器上运行
**我在做什么:** 检查 macOS 版本、处理器,以及有没有装带 Swift 6 的 Xcode。
**为什么:** iriz 需要 macOS 14 或更新。玻璃浮窗和真正的 Liquid Glass 属于 macOS 26;在 14 和
15 上应用能用,但浮窗是按旧方式绘制的。这件事现在知道,比构建完再知道好。
**磁盘上会改变什么:** 什么都不改。这一步只是读取。
**你会得到:** 一个答案——能不能继续,以及你会落在哪条视觉分支上。
**岔路:** 没有 Xcode 也没关系。从 Releases 页面下载现成的磁盘映像,构建那几步就跳过。
## 第 2 步:把源码拿下来
**我在做什么:** 把仓库克隆到你指定的文件夹,或者解压 ZIP。
**为什么:** 之后所有事情都在那个文件夹里进行,它应该放在你以后找得到的地方。
**磁盘上会改变什么:** 多出一个文件夹,约 40 MB。其他地方什么都不写。
**你会得到:** 一棵项目树,里面能看到 `Sources`、`Tests`、`scripts` 和 `docs`。
## 第 3 步:构建应用
**我在做什么:** 先运行 `bash install.sh`,和你一起读它的报告,然后才运行
`bash install.sh --build`。
**为什么:** 不带参数时安装脚本什么都不装。它会讲清这是什么程序、看看你机器上缺什么,并对项目树
做一次自检。这是你在任何事情发生之前叫停的机会。
**磁盘上会改变什么:** 第一条命令什么都不改。第二条会拉取 Swift 依赖(`.build` 里约 300 MB),
并把构建好的应用放进 `/Applications`。
**你会得到:** 屏幕右上角菜单栏里的图标,以及欢迎窗口。
**岔路:** 如果你不想动 `/Applications`,说一声,我们就构建到项目文件夹里,从那里运行。
## 第 4 步:授予权限并下载模型
**我在做什么:** 带你过三项 macOS 权限——麦克风、辅助功能、输入监控——然后开始下载识别模型。
**为什么:** 没有麦克风就没有可听的;没有辅助功能,文字没地方粘贴;没有输入监控,按键根本听不
到。模型就是那半个 GB,应用一生只为它联网一次。
**磁盘上会改变什么:** 模型放到 `~/Library/Application Support/iriz/Models`。权限写进 macOS
的系统数据库,不写进应用。
**你会得到:** 可以用的口述。按键,说一句话,再按一下——文字就落在光标闪烁的地方。
## 第 5 步:验证这一切是不是诚实的
**我在做什么:** 运行项目的闸门,并把它们的完整输出给你看。
**为什么:** “声音不会离开这台机器”这个承诺,要由工具来验证,而不是 README 里的一段话。闸门会
在构建出的二进制里踢一遍网络相关符号,并向内核询问运行中的应用有没有打开任何一个套接字。
**磁盘上会改变什么:** 什么都不改。闸门只读取和统计。
**你会得到:** 一份你亲眼看过的绿色报告,而不是听人保证。
```bash
bash scripts/verify.sh && bash scripts/offline_binary_gate.sh
```
+52
View File
@@ -86,3 +86,55 @@ If iriz saved you from retyping a paragraph, give it a star: [https://github.com
Now that you have run it end to end, you are the person who can improve it. The path is short: fork the repository, create a branch, commit your change, push the branch, then open a Pull Request. Do not push to `main` directly, the release gate rejects it. Now that you have run it end to end, you are the person who can improve it. The path is short: fork the repository, create a branch, commit your change, push the branch, then open a Pull Request. Do not push to `main` directly, the release gate rejects it.
Something broke instead, or a step above lied to you? Open an issue at [https://github.com/zarubinvibe/iriz/issues](https://github.com/zarubinvibe/iriz/issues) and say what you did and what you saw. A wrong step in this file is a bug like any other. Something broke instead, or a step above lied to you? Open an issue at [https://github.com/zarubinvibe/iriz/issues](https://github.com/zarubinvibe/iriz/issues) and say what you did and what you saw. A wrong step in this file is a bug like any other.
## What it looks like
Every surface here was captured from the live app by an instrument: `iriz --capture-docs`. Not a mockup — the same window that will open on your Mac.
### The plate
<p align="center"><img src="assets/shots/plate-resting-light.png" alt="A small glass drop at the bottom of the screen with a thin green line inside" width="45%"></p>
This is how it looks while you are silent. The drop floats above any window and does nothing.
<p align="center"><img src="assets/shots/plate-listening-light.png" alt="The plate while recording: a green sound wave runs inside the glass" width="70%"></p>
And this is how it looks while you talk. The wave inside the glass is the answer to «can it hear me».
<p align="center"><img src="assets/shots/plate-hover-light.png" alt="The plate opened into a row of six round buttons: microphone, prompt, translate, RU, history, settings" width="100%"></p>
Point at it with the mouse and the drop opens into a row of buttons: record, prompt, translate, language, history, settings. You can drag the plate; it snaps to one of twelve spots along the edges of the screen.
<p align="center"><img src="assets/shots/plate-open-text-light.png" alt="The expanded panel: text on a solid card, a Copy button, a close cross and a row of buttons below" width="100%"></p>
A click opens the panel with the text. There are three ways out: the cross, Escape, and a click past the buttons.
### The menu bar
<p align="center"><img src="assets/shots/menu-en.png" alt="The iriz menu: status, layout mode, layout, dictation, prompt, meetings, history, getting started, settings" width="60%"></p>
Everything else opens from here. The top line tells you what the app is doing right now.
### Settings
<p align="center"><img src="assets/shots/settings-en.png" alt="The iriz settings window: pages in the sidebar on the left, the keys page on the right" width="100%"></p>
Thirteen pages: keys, language, transcribing files, meetings, layout, dictation, the plate, replacements, snippets, prompt mode, moving in, disk space.
### Dictation history
<p align="center"><img src="assets/shots/history-en.png" alt="The history window: a search field, a list of dictations with dates and lengths, key hints below" width="100%"></p>
The latest hundred are shown, the latest five hundred are kept. Search looks through everything that is kept.
### Text that did not get pasted
<p align="center"><img src="assets/shots/rescue-en.png" alt="The rescue window: the transcript on a card, «Paste again» and «Copy» buttons" width="100%"></p>
If pasting did not reach the field, the text is not lost: it waits here.
### Getting started
<p align="center"><img src="assets/shots/firstrun-en.png" alt="The first screen of the walkthrough: a plate with a wave and the headline «You talk, I type»" width="80%"></p>
Eleven screens on the first launch. You can open them again at any time from the menu.
+52
View File
@@ -101,3 +101,55 @@
Вы прошли путь целиком, значит, вы и есть тот человек, который заметит в нем кривое место. Дорога короткая: сделайте fork, заведите ветку, оформите commit, отправьте push и откройте Pull Request. Прямо в `main` пушить не нужно, релизный гейт такой пуш отклонит. Вы прошли путь целиком, значит, вы и есть тот человек, который заметит в нем кривое место. Дорога короткая: сделайте fork, заведите ветку, оформите commit, отправьте push и откройте Pull Request. Прямо в `main` пушить не нужно, релизный гейт такой пуш отклонит.
Что-то сломалось или шаг соврал, заведите issue на [https://github.com/zarubinvibe/iriz/issues](https://github.com/zarubinvibe/iriz/issues) и напишите, что делали и что увидели. Неточность в этом файле такая же ошибка, как ошибка в коде. Что-то сломалось или шаг соврал, заведите issue на [https://github.com/zarubinvibe/iriz/issues](https://github.com/zarubinvibe/iriz/issues) и напишите, что делали и что увидели. Неточность в этом файле такая же ошибка, как ошибка в коде.
## Как это выглядит
Каждая поверхность снята прибором из живого приложения: `iriz --capture-docs`. Не рисунок и не макет — то же окно, что откроется у вас.
### Плашка
<p align="center"><img src="assets/shots/plate-resting-light.png" alt="Маленькая стеклянная капля внизу экрана, внутри тонкая зеленая черта" width="45%"></p>
Так она выглядит, пока вы молчите. Капля висит поверх любого окна и ничего не делает.
<p align="center"><img src="assets/shots/plate-listening-light.png" alt="Плашка на записи: внутри стекла бежит зеленая звуковая волна" width="70%"></p>
Так — пока вы говорите. Волна внутри стекла и есть ответ на вопрос «слышит ли меня».
<p align="center"><img src="assets/shots/plate-hover-light.png" alt="Плашка раскрыта в ряд из шести круглых кнопок: микрофон, промпт, перевод, RU, история, настройки" width="100%"></p>
Наведите мышь — капля раскроется в ряд кнопок: запись, промпт, перевод, язык, история, настройки. Плашку можно перетащить, она примагнитится к одному из двенадцати мест по краям экрана.
<p align="center"><img src="assets/shots/plate-open-text-light.png" alt="Раскрытая панель плашки: текст на плотной подложке, кнопка «Скопировать», крестик и ряд кнопок внизу" width="100%"></p>
Щелчок раскрывает панель с текстом. Выйти можно тремя способами: крестиком, клавишей Escape и щелчком мимо кнопок.
### Меню строки меню
<p align="center"><img src="assets/shots/menu-ru.png" alt="Меню iriz: состояние, режим раскладки, раскладка, диктовка, промпт, встречи, история, знакомство, настройки" width="60%"></p>
Отсюда открывается все остальное. Верхняя строка говорит, чем приложение занято прямо сейчас.
### Настройки
<p align="center"><img src="assets/shots/settings-ru.png" alt="Окно настроек iriz: боковик со страницами слева, страница клавиш справа" width="100%"></p>
Тринадцать страниц: клавиши, язык, расшифровка файлов, встречи, раскладка, диктовка, плашка, словарь замен, заготовки, промпт-режим, перенос, место на диске.
### История надиктовок
<p align="center"><img src="assets/shots/history-ru.png" alt="Окно истории: строка поиска, список надиктовок с датами и длиной, подсказки клавиш внизу" width="100%"></p>
Показываются последние сто, хранятся последние пятьсот. Поиск ищет по всему, что хранится.
### Текст, который не вставился
<p align="center"><img src="assets/shots/rescue-ru.png" alt="Окно спасения текста: расшифровка на плите, кнопки «Вставить еще раз» и «Скопировать»" width="100%"></p>
Если вставка не дошла до поля, текст не теряется: он ждет здесь.
### Знакомство
<p align="center"><img src="assets/shots/firstrun-ru.png" alt="Первый экран знакомства: плашка с волной, заголовок «Ты говоришь, я печатаю»" width="80%"></p>
Одиннадцать экранов при первом запуске. Открыть их заново можно в любой момент из меню.
+52
View File
@@ -96,3 +96,55 @@
你刚从头到尾走了一遍,所以你正是最有资格改进它的人。路径很短:先 fork 仓库,建一个分支,提交 commit,push 上去,然后开一个 Pull Request。请不要直接往 `main` 推:这个仓库的改动都走 Pull Request。 你刚从头到尾走了一遍,所以你正是最有资格改进它的人。路径很短:先 fork 仓库,建一个分支,提交 commit,push 上去,然后开一个 Pull Request。请不要直接往 `main` 推:这个仓库的改动都走 Pull Request。
哪一步坏了,或者写得不对?到 [https://github.com/zarubinvibe/iriz/issues](https://github.com/zarubinvibe/iriz/issues) 开一个 issue,写清楚你做了什么、屏幕上出现了什么。这份文件里写错的一步,和代码里的缺陷一样,也是缺陷。 哪一步坏了,或者写得不对?到 [https://github.com/zarubinvibe/iriz/issues](https://github.com/zarubinvibe/iriz/issues) 开一个 issue,写清楚你做了什么、屏幕上出现了什么。这份文件里写错的一步,和代码里的缺陷一样,也是缺陷。
## 界面长什么样
这里的每一个界面都由工具从运行中的应用截取:`iriz --capture-docs`。不是效果图——就是你 Mac 上会打开的那个窗口。
### 浮窗
<p align="center"><img src="assets/shots/plate-resting-light.png" alt="屏幕下方一颗小小的玻璃水滴,里面有一条细细的绿线" width="45%"></p>
你不说话时它就是这样。水滴浮在任何窗口之上,什么也不做。
<p align="center"><img src="assets/shots/plate-listening-light.png" alt="录音中的浮窗:绿色声波在玻璃内部流动" width="70%"></p>
你说话时是这样。玻璃里的声波就是“它有没有听见我”的答案。
<p align="center"><img src="assets/shots/plate-hover-light.png" alt="浮窗展开成一排六个圆形按钮:麦克风、提示词、翻译、RU、历史、设置" width="100%"></p>
把鼠标移上去,水滴会展开成一排按钮:录音、提示词、翻译、语言、历史、设置。浮窗可以拖动,会吸附到屏幕边缘十二个位置之一。
<p align="center"><img src="assets/shots/plate-open-text-light.png" alt="展开的面板:文字在实心卡片上,有“拷贝”按钮、关闭叉号和下方一排按钮" width="100%"></p>
点一下会展开带文字的面板。有三种关法:叉号、Escape,以及点在按钮以外的地方。
### 菜单栏
<p align="center"><img src="assets/shots/menu-zh.png" alt="iriz 菜单:状态、布局模式、键盘布局、口述、提示词、会议、历史、开始使用、设置" width="60%"></p>
其余功能都从这里打开。第一行告诉你应用此刻在做什么。
### 设置
<p align="center"><img src="assets/shots/settings-zh.png" alt="iriz 设置窗口:左侧边栏是各个页面,右侧是按键页面" width="100%"></p>
十三个页面:按键、语言、转写文件、会议、键盘布局、口述、浮窗、替换词典、片段、提示词模式、迁移、磁盘占用。
### 口述记录
<p align="center"><img src="assets/shots/history-zh.png" alt="历史窗口:搜索框、带日期和长度的口述列表、下方的按键提示" width="100%"></p>
显示最近一百条,保留最近五百条。搜索会查遍所有保留的内容。
### 没能粘贴上的文字
<p align="center"><img src="assets/shots/rescue-zh.png" alt="救援窗口:卡片上的转写文字,“再粘贴一次”和“拷贝”按钮" width="100%"></p>
如果粘贴没能到达输入框,文字不会丢:它在这里等着。
### 开始使用
<p align="center"><img src="assets/shots/firstrun-zh.png" alt="引导的第一屏:带声波的浮窗,标题“你说,我来打字”" width="80%"></p>
首次启动共十一屏。之后随时可以从菜单里重新打开。
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 KiB

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

+952
View File
@@ -0,0 +1,952 @@
# Graph Report - zarubinvibe__iriz (2026-09-07)
## Corpus Check
- 228 files · ~1,473,467 words
- Verdict: corpus is large enough that graph structure adds value.
## Summary
- 3329 nodes · 6263 edges · 219 communities (173 shown, 46 thin omitted)
- Extraction: 83% EXTRACTED · 17% INFERRED · 0% AMBIGUOUS · INFERRED: 1058 edges (avg confidence: 0.8)
- Token cost: 0 input · 0 output
## Graph Freshness
- Built from commit: `48771cf1`
- Run `git rev-parse HEAD` and compare to check if the graph is stale.
- Run `graphify update .` after code changes (no API cost).
## Community Hubs (Navigation)
- [[_COMMUNITY_Community 0|Community 0]]
- [[_COMMUNITY_Community 1|Community 1]]
- [[_COMMUNITY_Community 2|Community 2]]
- [[_COMMUNITY_Community 3|Community 3]]
- [[_COMMUNITY_Community 4|Community 4]]
- [[_COMMUNITY_Community 5|Community 5]]
- [[_COMMUNITY_Community 6|Community 6]]
- [[_COMMUNITY_Community 7|Community 7]]
- [[_COMMUNITY_Community 8|Community 8]]
- [[_COMMUNITY_Community 9|Community 9]]
- [[_COMMUNITY_Community 10|Community 10]]
- [[_COMMUNITY_Community 11|Community 11]]
- [[_COMMUNITY_Community 12|Community 12]]
- [[_COMMUNITY_Community 13|Community 13]]
- [[_COMMUNITY_Community 14|Community 14]]
- [[_COMMUNITY_Community 15|Community 15]]
- [[_COMMUNITY_Community 16|Community 16]]
- [[_COMMUNITY_Community 17|Community 17]]
- [[_COMMUNITY_Community 18|Community 18]]
- [[_COMMUNITY_Community 19|Community 19]]
- [[_COMMUNITY_Community 20|Community 20]]
- [[_COMMUNITY_Community 21|Community 21]]
- [[_COMMUNITY_Community 22|Community 22]]
- [[_COMMUNITY_Community 23|Community 23]]
- [[_COMMUNITY_Community 24|Community 24]]
- [[_COMMUNITY_Community 25|Community 25]]
- [[_COMMUNITY_Community 26|Community 26]]
- [[_COMMUNITY_Community 27|Community 27]]
- [[_COMMUNITY_Community 28|Community 28]]
- [[_COMMUNITY_Community 29|Community 29]]
- [[_COMMUNITY_Community 30|Community 30]]
- [[_COMMUNITY_Community 31|Community 31]]
- [[_COMMUNITY_Community 32|Community 32]]
- [[_COMMUNITY_Community 33|Community 33]]
- [[_COMMUNITY_Community 34|Community 34]]
- [[_COMMUNITY_Community 35|Community 35]]
- [[_COMMUNITY_Community 36|Community 36]]
- [[_COMMUNITY_Community 37|Community 37]]
- [[_COMMUNITY_Community 38|Community 38]]
- [[_COMMUNITY_Community 39|Community 39]]
- [[_COMMUNITY_Community 40|Community 40]]
- [[_COMMUNITY_Community 41|Community 41]]
- [[_COMMUNITY_Community 42|Community 42]]
- [[_COMMUNITY_Community 43|Community 43]]
- [[_COMMUNITY_Community 44|Community 44]]
- [[_COMMUNITY_Community 45|Community 45]]
- [[_COMMUNITY_Community 46|Community 46]]
- [[_COMMUNITY_Community 47|Community 47]]
- [[_COMMUNITY_Community 48|Community 48]]
- [[_COMMUNITY_Community 49|Community 49]]
- [[_COMMUNITY_Community 50|Community 50]]
- [[_COMMUNITY_Community 51|Community 51]]
- [[_COMMUNITY_Community 52|Community 52]]
- [[_COMMUNITY_Community 53|Community 53]]
- [[_COMMUNITY_Community 54|Community 54]]
- [[_COMMUNITY_Community 55|Community 55]]
- [[_COMMUNITY_Community 56|Community 56]]
- [[_COMMUNITY_Community 57|Community 57]]
- [[_COMMUNITY_Community 58|Community 58]]
- [[_COMMUNITY_Community 59|Community 59]]
- [[_COMMUNITY_Community 60|Community 60]]
- [[_COMMUNITY_Community 61|Community 61]]
- [[_COMMUNITY_Community 62|Community 62]]
- [[_COMMUNITY_Community 63|Community 63]]
- [[_COMMUNITY_Community 64|Community 64]]
- [[_COMMUNITY_Community 65|Community 65]]
- [[_COMMUNITY_Community 66|Community 66]]
- [[_COMMUNITY_Community 67|Community 67]]
- [[_COMMUNITY_Community 68|Community 68]]
- [[_COMMUNITY_Community 69|Community 69]]
- [[_COMMUNITY_Community 70|Community 70]]
- [[_COMMUNITY_Community 71|Community 71]]
- [[_COMMUNITY_Community 72|Community 72]]
- [[_COMMUNITY_Community 73|Community 73]]
- [[_COMMUNITY_Community 74|Community 74]]
- [[_COMMUNITY_Community 75|Community 75]]
- [[_COMMUNITY_Community 76|Community 76]]
- [[_COMMUNITY_Community 77|Community 77]]
- [[_COMMUNITY_Community 78|Community 78]]
- [[_COMMUNITY_Community 79|Community 79]]
- [[_COMMUNITY_Community 80|Community 80]]
- [[_COMMUNITY_Community 81|Community 81]]
- [[_COMMUNITY_Community 82|Community 82]]
- [[_COMMUNITY_Community 83|Community 83]]
- [[_COMMUNITY_Community 84|Community 84]]
- [[_COMMUNITY_Community 85|Community 85]]
- [[_COMMUNITY_Community 86|Community 86]]
- [[_COMMUNITY_Community 87|Community 87]]
- [[_COMMUNITY_Community 88|Community 88]]
- [[_COMMUNITY_Community 89|Community 89]]
- [[_COMMUNITY_Community 90|Community 90]]
- [[_COMMUNITY_Community 91|Community 91]]
- [[_COMMUNITY_Community 92|Community 92]]
- [[_COMMUNITY_Community 93|Community 93]]
- [[_COMMUNITY_Community 94|Community 94]]
- [[_COMMUNITY_Community 95|Community 95]]
- [[_COMMUNITY_Community 96|Community 96]]
- [[_COMMUNITY_Community 97|Community 97]]
- [[_COMMUNITY_Community 98|Community 98]]
- [[_COMMUNITY_Community 99|Community 99]]
- [[_COMMUNITY_Community 100|Community 100]]
- [[_COMMUNITY_Community 101|Community 101]]
- [[_COMMUNITY_Community 102|Community 102]]
- [[_COMMUNITY_Community 103|Community 103]]
- [[_COMMUNITY_Community 104|Community 104]]
- [[_COMMUNITY_Community 105|Community 105]]
- [[_COMMUNITY_Community 106|Community 106]]
- [[_COMMUNITY_Community 107|Community 107]]
- [[_COMMUNITY_Community 108|Community 108]]
- [[_COMMUNITY_Community 109|Community 109]]
- [[_COMMUNITY_Community 110|Community 110]]
- [[_COMMUNITY_Community 111|Community 111]]
- [[_COMMUNITY_Community 112|Community 112]]
- [[_COMMUNITY_Community 113|Community 113]]
- [[_COMMUNITY_Community 114|Community 114]]
- [[_COMMUNITY_Community 115|Community 115]]
- [[_COMMUNITY_Community 116|Community 116]]
- [[_COMMUNITY_Community 117|Community 117]]
- [[_COMMUNITY_Community 118|Community 118]]
- [[_COMMUNITY_Community 119|Community 119]]
- [[_COMMUNITY_Community 120|Community 120]]
- [[_COMMUNITY_Community 121|Community 121]]
- [[_COMMUNITY_Community 122|Community 122]]
- [[_COMMUNITY_Community 123|Community 123]]
- [[_COMMUNITY_Community 124|Community 124]]
- [[_COMMUNITY_Community 125|Community 125]]
- [[_COMMUNITY_Community 126|Community 126]]
- [[_COMMUNITY_Community 127|Community 127]]
- [[_COMMUNITY_Community 128|Community 128]]
- [[_COMMUNITY_Community 129|Community 129]]
- [[_COMMUNITY_Community 130|Community 130]]
- [[_COMMUNITY_Community 131|Community 131]]
- [[_COMMUNITY_Community 132|Community 132]]
- [[_COMMUNITY_Community 133|Community 133]]
- [[_COMMUNITY_Community 134|Community 134]]
- [[_COMMUNITY_Community 135|Community 135]]
- [[_COMMUNITY_Community 136|Community 136]]
- [[_COMMUNITY_Community 137|Community 137]]
- [[_COMMUNITY_Community 138|Community 138]]
- [[_COMMUNITY_Community 139|Community 139]]
- [[_COMMUNITY_Community 140|Community 140]]
- [[_COMMUNITY_Community 141|Community 141]]
- [[_COMMUNITY_Community 142|Community 142]]
- [[_COMMUNITY_Community 143|Community 143]]
- [[_COMMUNITY_Community 144|Community 144]]
- [[_COMMUNITY_Community 145|Community 145]]
- [[_COMMUNITY_Community 146|Community 146]]
- [[_COMMUNITY_Community 147|Community 147]]
- [[_COMMUNITY_Community 148|Community 148]]
- [[_COMMUNITY_Community 149|Community 149]]
- [[_COMMUNITY_Community 150|Community 150]]
- [[_COMMUNITY_Community 151|Community 151]]
- [[_COMMUNITY_Community 152|Community 152]]
- [[_COMMUNITY_Community 153|Community 153]]
- [[_COMMUNITY_Community 154|Community 154]]
- [[_COMMUNITY_Community 155|Community 155]]
- [[_COMMUNITY_Community 156|Community 156]]
- [[_COMMUNITY_Community 157|Community 157]]
- [[_COMMUNITY_Community 158|Community 158]]
- [[_COMMUNITY_Community 159|Community 159]]
- [[_COMMUNITY_Community 160|Community 160]]
- [[_COMMUNITY_Community 161|Community 161]]
- [[_COMMUNITY_Community 162|Community 162]]
- [[_COMMUNITY_Community 163|Community 163]]
- [[_COMMUNITY_Community 164|Community 164]]
- [[_COMMUNITY_Community 165|Community 165]]
- [[_COMMUNITY_Community 166|Community 166]]
- [[_COMMUNITY_Community 167|Community 167]]
- [[_COMMUNITY_Community 168|Community 168]]
- [[_COMMUNITY_Community 169|Community 169]]
- [[_COMMUNITY_Community 170|Community 170]]
- [[_COMMUNITY_Community 171|Community 171]]
- [[_COMMUNITY_Community 172|Community 172]]
- [[_COMMUNITY_Community 173|Community 173]]
- [[_COMMUNITY_Community 174|Community 174]]
- [[_COMMUNITY_Community 175|Community 175]]
- [[_COMMUNITY_Community 176|Community 176]]
- [[_COMMUNITY_Community 177|Community 177]]
- [[_COMMUNITY_Community 178|Community 178]]
- [[_COMMUNITY_Community 179|Community 179]]
- [[_COMMUNITY_Community 180|Community 180]]
- [[_COMMUNITY_Community 181|Community 181]]
- [[_COMMUNITY_Community 182|Community 182]]
- [[_COMMUNITY_Community 183|Community 183]]
- [[_COMMUNITY_Community 184|Community 184]]
- [[_COMMUNITY_Community 185|Community 185]]
- [[_COMMUNITY_Community 186|Community 186]]
- [[_COMMUNITY_Community 188|Community 188]]
- [[_COMMUNITY_Community 189|Community 189]]
- [[_COMMUNITY_Community 190|Community 190]]
- [[_COMMUNITY_Community 191|Community 191]]
- [[_COMMUNITY_Community 192|Community 192]]
- [[_COMMUNITY_Community 193|Community 193]]
- [[_COMMUNITY_Community 194|Community 194]]
- [[_COMMUNITY_Community 195|Community 195]]
- [[_COMMUNITY_Community 196|Community 196]]
- [[_COMMUNITY_Community 197|Community 197]]
- [[_COMMUNITY_Community 198|Community 198]]
- [[_COMMUNITY_Community 199|Community 199]]
- [[_COMMUNITY_Community 200|Community 200]]
- [[_COMMUNITY_Community 201|Community 201]]
- [[_COMMUNITY_Community 202|Community 202]]
- [[_COMMUNITY_Community 203|Community 203]]
- [[_COMMUNITY_Community 204|Community 204]]
- [[_COMMUNITY_Community 205|Community 205]]
- [[_COMMUNITY_Community 206|Community 206]]
- [[_COMMUNITY_Community 207|Community 207]]
- [[_COMMUNITY_Community 208|Community 208]]
- [[_COMMUNITY_Community 209|Community 209]]
- [[_COMMUNITY_Community 210|Community 210]]
- [[_COMMUNITY_Community 211|Community 211]]
- [[_COMMUNITY_Community 212|Community 212]]
- [[_COMMUNITY_Community 213|Community 213]]
- [[_COMMUNITY_Community 214|Community 214]]
## God Nodes (most connected - your core abstractions)
1. `DictationHUDPanelSurface` - 75 edges
2. `AppDelegate` - 50 edges
3. `verdict()` - 48 edges
4. `PromptEnvelopeBuilder` - 48 edges
5. `DictationHUDCapsuleView` - 43 edges
6. `DictationSettings` - 42 edges
7. `DictationHUDPresenter` - 36 edges
8. `SettingsModel` - 33 edges
9. `PromptField` - 33 edges
10. `PromptSpec` - 33 edges
## Surprising Connections (you probably didn't know these)
- `DictationHUDPresentationTests` --calls--> `dictationHUDAnimatesWaiting()` [INFERRED]
Tests/IrizDictateTests/DictationHUDTests.swift → Sources/IrizDictate/DictationHUD.swift
- `DictationHUDPresentationTests` --calls--> `dictationHUDPhaseSpeed()` [INFERRED]
Tests/IrizDictateTests/DictationHUDTests.swift → Sources/IrizDictate/DictationHUD.swift
- `DictationHUDTextTests` --calls--> `DictationHUDContent` [INFERRED]
Tests/IrizDictateTests/DictationHUDTests.swift → Sources/IrizDictate/DictationHUD.swift
- `DictationHUDTextTests` --calls--> `DictationHUDStage` [INFERRED]
Tests/IrizDictateTests/DictationHUDTests.swift → Sources/IrizDictate/DictationHUD.swift
- `DictationHUDTextTests` --calls--> `DictationHUDVisual` [INFERRED]
Tests/IrizDictateTests/DictationHUDTests.swift → Sources/IrizDictate/DictationHUD.swift
## Communities (219 total, 46 thin omitted)
### Community 0 - "Community 0"
Cohesion: 0.05
Nodes (24): StatusReport, SupportPaths, appendPrivateLogData(), applyPrivatePermission(), createPrivateDirectory(), currentPOSIXError(), irizApplicationSupportDirectory(), irizApplicationSupportDirectoryURL() (+16 more)
### Community 1 - "Community 1"
Cohesion: 0.06
Nodes (22): HotkeyShortcutState, HotkeyTransitionAction, cancel, dismissOverlay, press, pressPrompt, pressTranslation, rejectedBusyPress (+14 more)
### Community 2 - "Community 2"
Cohesion: 0.07
Nodes (17): dictationHUDRibbonStrandParameters(), dictationHUDRibbonStrandWeight(), DictationHUDCapsuleBackgroundStyle, dark, light, system, DictationHUDCapsuleView, WaveGeometry (+9 more)
### Community 3 - "Community 3"
Cohesion: 0.05
Nodes (28): DictationHistoryClipboard, HistoryClipboardTransaction, HistoryPasteboardSnapshot, Item, PasteboardRestoreDecision, restore, skip, millisecondsLabel() (+20 more)
### Community 4 - "Community 4"
Cohesion: 0.05
Nodes (38): main(), wer(), leaks(), main(), terms(), distance(), has_numeral(), in_slice() (+30 more)
### Community 5 - "Community 5"
Cohesion: 0.09
Nodes (3): dictationHUDNeedsDisplayLink(), dictationHUDPhaseSpeed(), DictationHUDPanelSurface
### Community 6 - "Community 6"
Cohesion: 0.06
Nodes (38): dictationHUDPerceptualLevel(), DictationHUDGlassForm, done, listening, resting, thinking, transcript, vanishing (+30 more)
### Community 7 - "Community 7"
Cohesion: 0.06
Nodes (36): DictationHUDAction, DictationHUDActionID, collapse, history, language, modePrompt, modeTranslation, record (+28 more)
### Community 8 - "Community 8"
Cohesion: 0.05
Nodes (11): DictationHUDActionButton, DictationHUDDropMarksView, DictationHUDDropZoneView, makeDictationHUDDropZoneWindow(), DictationHUDGlassStack, DictationHUDHaloView, DictationHUDCloseRing, DictationHUDCopyPill (+3 more)
### Community 9 - "Community 9"
Cohesion: 0.08
Nodes (15): shouldPressEnterAfterVoiceOutput(), DictationReleaseShortcut, alternate, standard, HotkeyChoice, hotkeyIsModifierPrefix(), hotkeyModifierSymbols(), modifierHotkeyName() (+7 more)
### Community 10 - "Community 10"
Cohesion: 0.07
Nodes (52): detectsBesit_BAtStart(), detectsCapsLockWord(), detectsComputerRuTyped(), detectsEshyo_YoAtEnd(), detectsEto_EAtStart(), detectsHelloRuTyped(), detectsHorosho_HAtStart(), detectsKanoe_EAtEnd() (+44 more)
### Community 11 - "Community 11"
Cohesion: 0.07
Nodes (29): consumeProgress(), printProgress(), ProgressLine, refuse(), Transcribe, TranscriptionRunner, TranscriptOutcomeError, cannotWrite (+21 more)
### Community 12 - "Community 12"
Cohesion: 0.15
Nodes (3): CodexPromptGeneratorTests, displayPath(), PromptEnvelopeBuilder
### Community 13 - "Community 13"
Cohesion: 0.12
Nodes (31): applyInputDevicePreference(), applyShutdownPolicyAfterRecording(), AudioEngineStartRetry, audioInputDeviceNominalSampleRate(), AudioPowerEvent, didWake, willSleep, beginRecording() (+23 more)
### Community 14 - "Community 14"
Cohesion: 0.11
Nodes (31): dictationHUDClampedAxis(), dictationHUDClampedFrame(), dictationHUDDetail(), dictationHUDHasLatin(), dictationHUDHintLines(), dictationHUDHistoryDetail(), dictationHUDHistoryHint(), dictationHUDHistoryHintLine() (+23 more)
### Community 16 - "Community 16"
Cohesion: 0.12
Nodes (30): applySettings(), handleAudioConfigurationChange(), handleCancel(), handlePress(), init(), NotificationObserver, observeSettings(), prepareForSystemSleep() (+22 more)
### Community 17 - "Community 17"
Cohesion: 0.13
Nodes (7): dictationHUDDismissDelay(), DictationHUDPresentation, hidden, visible, dictationHUDStageIsTerminal(), DictationHUDPresenter, DictationHUDPresentationTests
### Community 18 - "Community 18"
Cohesion: 0.15
Nodes (6): Codable, PromptCoreV2Tests, PromptAmbiguity, PromptField, PromptOutcomeVerifier, PromptSpec
### Community 19 - "Community 19"
Cohesion: 0.08
Nodes (28): CaseIterable, DictationHistoryShotKind, empty, list, rescue, DictationHUDWavePalette, calm, mono (+20 more)
### Community 21 - "Community 21"
Cohesion: 0.17
Nodes (4): DictationHistoryPanel, DictationHistoryPresenter, DictationHUDPanel, NSPanel
### Community 22 - "Community 22"
Cohesion: 0.07
Nodes (22): Equatable, AudioPowerAction, none, resumeListening, suspendRuntime, DictationHUDHalo, even, none (+14 more)
### Community 23 - "Community 23"
Cohesion: 0.08
Nodes (11): AnyObject, DictationHUDContainerDelegate, DictationHUDContainerView, DictationHUDDisplayLinkProxy, DictationHUDFirstShowMetric, dictationHUDHitTarget(), DictationHUDNotificationObserver, PanelLayout (+3 more)
### Community 25 - "Community 25"
Cohesion: 0.14
Nodes (5): hotkeys, HotkeyBinding, LayoutHotkeyConfig, LayoutHotkeySettingsAccess, SettingsModel
### Community 27 - "Community 27"
Cohesion: 0.14
Nodes (19): Encodable, normalizedTranscriptCorrections(), normalizedTranscriptCorrectionSource(), validatedTranscriptCorrection(), DictionaryImportOutcome, DictionaryTransfer, DictionaryTransferError, badCorrection (+11 more)
### Community 28 - "Community 28"
Cohesion: 0.1
Nodes (22): allRanges(), matches(), PromptAmbiguityKind, blockingUserChoice, discoverable, safeAssumption, PromptModule, actionBoundaries (+14 more)
### Community 29 - "Community 29"
Cohesion: 0.08
Nodes (24): BaselineCategory, additionToPreviousPrompt, agentic, blockingAmbiguity, coding, correctionOfPreviousPrompt, currentProject, currentVoiceFeature (+16 more)
### Community 30 - "Community 30"
Cohesion: 0.12
Nodes (14): MeetingPipelineFailure, audioUnreadable, nothingRecognized, storeFailed, transcriptionFailed, MeetingResult, distance(), speakerForToken() (+6 more)
### Community 31 - "Community 31"
Cohesion: 0.11
Nodes (4): L(), MeetingPipeline, IrizSettingsView, snippets
### Community 32 - "Community 32"
Cohesion: 0.16
Nodes (4): keyboardCallback(), KeyboardMonitor, TriggerConfig, TypedKey
### Community 33 - "Community 33"
Cohesion: 0.1
Nodes (16): PromptAgentAdapter, PromptAgentCatalog, PromptAgentDelivery, argument, file, stdin, PromptAgentDestination, anthropic (+8 more)
### Community 34 - "Community 34"
Cohesion: 0.2
Nodes (5): CodexPromptGenerator, nonZeroExit, terminated, ProcessController, ProcessExitWaiter
### Community 35 - "Community 35"
Cohesion: 0.16
Nodes (13): AsyncParsableCommand, Convert, Fix, HUDPresence, HUDSize, InstallModel, Iriz, Prompt (+5 more)
### Community 36 - "Community 36"
Cohesion: 0.2
Nodes (12): dictationHUDAnchoredFrame(), dictationHUDAnchoredSize(), dictationHUDAnchorZone(), dictationHUDNearestAnchor(), dictationHUDBarCount(), dictationHUDCollapsedSize(), DictationHUDPlateGeometry, dictationHUDRestingSize() (+4 more)
### Community 37 - "Community 37"
Cohesion: 0.09
Nodes (22): EvaluationCoverage, addition, agentic, blockingChoice, codexProfile, coding, correction, currentProject (+14 more)
### Community 38 - "Community 38"
Cohesion: 0.1
Nodes (9): FirstRunHero, LivePlate, MarkImage, MenuBarStrip, IrizBackdropBlur, IrizFloatingPlate, IrizGlassSurface, IrizSearchFieldPlate (+1 more)
### Community 39 - "Community 39"
Cohesion: 0.13
Nodes (12): ASRTimingBreakdown, dictationTokenTimings(), FileSystemNodeType, directory, regularFile, LoadedSpeechEngine, parakeetV3, whisper (+4 more)
### Community 40 - "Community 40"
Cohesion: 0.13
Nodes (15): DictationHUDDisplayLinkStorage, SuperDictateImportResult, imported, nothingToImport, SuperDictateTranscript, CappedOutputCapture, CodexInvocationPlan, ProcessExit (+7 more)
### Community 41 - "Community 41"
Cohesion: 0.16
Nodes (8): dictationHUDFrame(), DictationHUDDismissTests, DictationHUDFrameTests, DictationHUDLevelTests, DictationHUDPresenterTests, DictationHUDTranscriptDismissTests, RecordingHUDSurface, SurfaceFactory
### Community 42 - "Community 42"
Cohesion: 0.12
Nodes (16): DictationHUDStage, buildingPrompt, inserted, listening, notDelivered, nothingRecognized, promptFailed, promptNotDelivered (+8 more)
### Community 43 - "Community 43"
Cohesion: 0.1
Nodes (19): 目录, 第 1 步:按下你的那个键, 快速开始, 简单对比, 简单词汇, 安全与隐私, 局限, 点亮星标与参与 (+11 more)
### Community 44 - "Community 44"
Cohesion: 0.1
Nodes (19): code:bash (git clone https://github.com/zarubinvibe/iriz.git ~/iriz), Contents, How It Works, iriz, License, Limits, Olympuz family, Quickstart (+11 more)
### Community 45 - "Community 45"
Cohesion: 0.1
Nodes (19): Оглавление, Шаг 1: Нажмите свою клавишу, Быстрый старт, Простое сравнение, Простые слова, Безопасность и приватность, Ограничения, Звезда и вклад (+11 more)
### Community 46 - "Community 46"
Cohesion: 0.22
Nodes (11): PromptGenerationTests, PromptRendererV1BaselineCorpusTests, AdditionMarkerTests, FactSupportTests, InflationNormTests, LatestDictationTests, NegationSemanticsTests, PromptTests (+3 more)
### Community 48 - "Community 48"
Cohesion: 0.19
Nodes (15): dictationHUDAccessibilityLabel(), dictationHUDAnimatesLevel(), dictationHUDAnimatesWaiting(), DictationHUDContent, dictationHUDFormShowsChip(), dictationHUDHaloRidge(), dictationHUDHaloRidgeGain(), dictationHUDHaloRidgeMean() (+7 more)
### Community 49 - "Community 49"
Cohesion: 0.11
Nodes (19): DictationLanguage, auto, belarusian, bosnian, bulgarian, croatian, czech, english (+11 more)
### Community 50 - "Community 50"
Cohesion: 0.12
Nodes (12): SpeechModelInstaller, speechModelInstallFraction(), SpeechModelInstallPhase, compiling, downloading, failed, finished, SpeechModelInstallRefusal (+4 more)
### Community 51 - "Community 51"
Cohesion: 0.16
Nodes (10): safePromptFailureLogLabel(), DictationStartRefusal, alreadyRecording, modelNotReady, secureInputActive, transcriptionInFlight, DictationStartRefusalTests, PromptFailureKindTests (+2 more)
### Community 52 - "Community 52"
Cohesion: 0.13
Nodes (8): AnchorView, MenuPanelAnchor, MenuPanelChrome, MenuPanelKey, activate, down, escape, up
### Community 53 - "Community 53"
Cohesion: 0.16
Nodes (13): AgentRow, FirstRunAgentConnect, FirstRunKeyTrial, KeyCap, LevelBar, FirstRunModelInstall, FirstRunTranslateTrial, KeyCapLabel (+5 more)
### Community 54 - "Community 54"
Cohesion: 0.17
Nodes (3): FirstRunAgent, FirstRunModel, firstRunPermissionGranted()
### Community 55 - "Community 55"
Cohesion: 0.2
Nodes (15): allRanges(), between(), linesForDeicticVerification(), parseSections(), promptSectionHeading(), quotedStrings(), RegexMatch, removingPaths() (+7 more)
### Community 56 - "Community 56"
Cohesion: 0.25
Nodes (7): ModelIntegrity, ModelIntegrityError, digestMismatch, invalidFileType, invalidManifestPath, missingFile, unexpectedFile
### Community 57 - "Community 57"
Cohesion: 0.22
Nodes (12): dictationHistoryClearConfirmation(), dictationHistoryDirectories(), dictationHistoryEntries(), DictationHistoryEntry, dictationHistoryMatches(), dictationHistoryRemovalTarget(), filteredDictationHistory(), removeDictationHistoryEntry() (+4 more)
### Community 58 - "Community 58"
Cohesion: 0.19
Nodes (11): AudioBatchPlanError, destinationCollision, destinationExists, destinationOverwritesSource, directoryHasNoAudio, outputFileForManySources, pathNotFound, pathNotReadable (+3 more)
### Community 59 - "Community 59"
Cohesion: 0.15
Nodes (17): cleanedExternally(), finishTranscription(), generateAndDeliverPrompt(), handleRelease(), offerRecovery(), promptFailureKind(), PromptPipelineError, artifactAlreadyExists (+9 more)
### Community 60 - "Community 60"
Cohesion: 0.16
Nodes (6): Coordinator, FirstRunDictationField, FirstRunFieldBox, FirstRunTextView, NSTextView, NSTextViewDelegate
### Community 61 - "Community 61"
Cohesion: 0.15
Nodes (5): Keys, SettingsManager, LayoutSettingsAccess, AppProfilesFixture, SettingsAppProfilesTests
### Community 62 - "Community 62"
Cohesion: 0.17
Nodes (6): MeetingProtocolDocument, meetingTimestamp(), MeetingArtifacts, MeetingStore, MeetingPipelineTests, MeetingProtocolTests
### Community 63 - "Community 63"
Cohesion: 0.18
Nodes (12): DictationHousekeepingEntry, DictationHousekeepingItem, dictationHousekeepingPlan(), dictationHousekeepingRun(), dictationHousekeepingSnapshot(), dictationHousekeepingSummary(), diskUsageBytesForHousekeeping(), Kind (+4 more)
### Community 64 - "Community 64"
Cohesion: 0.2
Nodes (8): DictationFeedbackSound, done, error, TextInsertionVerdict, delivered, notDelivered, waiting, TextInsertionVerdictTests
### Community 65 - "Community 65"
Cohesion: 0.11
Nodes (16): CodingKey, DictationRecoverySilence, delivered, mayHaveBeenInserted, nothingToShow, turnedOff, verdictNotFinal, DictationRescueRetryOutcome (+8 more)
### Community 66 - "Community 66"
Cohesion: 0.2
Nodes (7): BlindMechanicalEvaluator, BlindRubric, BlindScore, BlindTrial, BlindVariant, EvaluationCase, RenderedPair
### Community 67 - "Community 67"
Cohesion: 0.16
Nodes (13): Decodable, AmbiguityExpectation, blocking, nonBlocking, none, BaselineCase, BaselineExpected, FailureStage (+5 more)
### Community 68 - "Community 68"
Cohesion: 0.14
Nodes (14): Identifiable, AppMode, fixing, paused, shadow, DictationHint, fault, key (+6 more)
### Community 69 - "Community 69"
Cohesion: 0.21
Nodes (9): dictationHistoryShotEntries(), dictationHistoryShotView(), DictationHistoryView, DictationRescue, dictationRescueExplanation(), dictationRescueRetryNotice(), DictationRecoveryPresentationTests, DictationRescueModelTests (+1 more)
### Community 70 - "Community 70"
Cohesion: 0.23
Nodes (7): PromptAppProfileMapTests, normalizedPromptAppProfileEntries(), PromptAppProfileEntry, promptAppProfileLookupKey(), PromptAppProfileMap, validatedPromptAppProfileBundleID(), appProfiles
### Community 71 - "Community 71"
Cohesion: 0.14
Nodes (8): DictationLearningInsertion, DictationLearningRefusal, fieldUnreadable, focusMovedToAnotherApp, noPairs, nothingRemembered, tooLate, DictationLearningWatcher
### Community 72 - "Community 72"
Cohesion: 0.14
Nodes (7): AudioPowerLifecycle, AudioEngineStartRetryTests, AudioGraphRecoveryFailureTests, AudioPowerLifecycleTests, SyntheticAudioStartError, first, second
### Community 73 - "Community 73"
Cohesion: 0.17
Nodes (9): audioDurationSeconds(), SpeakerDiarizationFailure, audioUnreadable, engineFailed, modelsMissing, tooShort, SpeakerDiarizer, speakerSpans() (+1 more)
### Community 74 - "Community 74"
Cohesion: 0.13
Nodes (14): Происхождение кода, Сверка 06.09.2026, Сверка 06.09.2026, Перенесенные файлы (13), Проверка изменений апстрима, Что взято, Что осознанно НЕ взято, 1. RuSwitcher - переключение раскладки (+6 more)
### Community 75 - "Community 75"
Cohesion: 0.13
Nodes (14): 上手引导, 界面长什么样, 浮窗, 菜单栏, 设置, 口述记录, 没能粘贴上的文字, 开始使用 (+6 more)
### Community 76 - "Community 76"
Cohesion: 0.16
Nodes (5): irizDropAccepts(), IrizDropItem, IrizDropRow, IrizDropZone, IrizDropZoneButton
### Community 77 - "Community 77"
Cohesion: 0.15
Nodes (7): FirstRunTrialButtonStyle, FirstRunTrialButton, FirstRunProminentButton, IrizGlassPill, GlassButton, GlassProminentButton, ViewModifier
### Community 78 - "Community 78"
Cohesion: 0.19
Nodes (8): dictationHUDAnimationDuration(), DictationHUDHoverLayers, dictationHUDLevelIsStale(), dictationHUDNormalizedLevel(), DictationHUDRevealLayers, dictationHUDSmoothedLevel(), dictationHUDSmootherstep(), DictationHUDAnimationModelTests
### Community 79 - "Community 79"
Cohesion: 0.29
Nodes (12): speechCleanupFillerIsRemovable(), speechCleanupFillers(), speechCleanupIsStutterRepeat(), speechCleanupLeadingNu(), speechCleanupLocal(), speechCleanupOpenText(), speechCleanupQuoteSegments(), speechCleanupRepeatedPreposition() (+4 more)
### Community 80 - "Community 80"
Cohesion: 0.14
Nodes (14): IrizGlyph, dictation, dictionary, disk, files, history, keys, language (+6 more)
### Community 81 - "Community 81"
Cohesion: 0.2
Nodes (8): dictationHistoryDate(), dictationHistoryPreview(), dictationHistoryTimeLabel(), appendPrivateLogData(), ISO8601DateFormatter, Logger, DictationHistoryPreviewTests, LoggerRedirectTests
### Community 84 - "Community 84"
Cohesion: 0.19
Nodes (11): Color, familyAccentColor(), familyAccentComponents(), FamilyAccentRole, flow, personal, FamilyPalette, FamilySurface (+3 more)
### Community 85 - "Community 85"
Cohesion: 0.26
Nodes (11): BlindLabel, a, b, DictationLearnedPair, dictationLearnedPairs(), dictationLearningDistance(), dictationLearningPairIsUsable(), dictationLearningSimilar() (+3 more)
### Community 86 - "Community 86"
Cohesion: 0.14
Nodes (13): Знакомство, Как это выглядит, Плашка, Меню строки меню, Настройки, История надиктовок, Текст, который не вставился, Знакомство (+5 more)
### Community 87 - "Community 87"
Cohesion: 0.21
Nodes (5): DictationHUDSurface, DictationHUDOpenStateTests, OpenStateSurface, DictationHUDExitTests, ExitSurface
### Community 88 - "Community 88"
Cohesion: 0.18
Nodes (11): DictationRecordingPurpose, dictation, meeting, prompt, translation, promptInsertionAllowed(), TextInsertionFailure, deliveryNotObservable (+3 more)
### Community 90 - "Community 90"
Cohesion: 0.24
Nodes (8): Int, exportUISurfaceShots(), renderUISurface(), uiShotMenuStates(), uiShotOnOpaqueBackdrop(), UISurfaceShot, uiSurfaceShots(), SpeechCleanupRequest
### Community 91 - "Community 91"
Cohesion: 0.23
Nodes (11): exit, alpha(), alphaMatrix(), bandMax(), bandMean(), inkHeight(), makeContext(), makePlainContext() (+3 more)
### Community 92 - "Community 92"
Cohesion: 0.15
Nodes (13): SettingsPage, dictation, dictionary, disk, files, history, keys, language (+5 more)
### Community 93 - "Community 93"
Cohesion: 0.15
Nodes (13): DictationHUDAnchor, bottomCenter, bottomLeading, bottomTrailing, leftBottom, leftCenter, leftTop, rightBottom (+5 more)
### Community 95 - "Community 95"
Cohesion: 0.18
Nodes (12): DictationHistoryKeyAction, close, copySelected, insertSelected, moveSelection, passThrough, DictationRescueKeyOutcome, close (+4 more)
### Community 97 - "Community 97"
Cohesion: 0.15
Nodes (13): Error, DictationSnippetDefect, bodyTooLong, emptyBody, emptyTrigger, forbiddenCharacter, triggerTooLong, triggerWithoutLetterOrDigit (+5 more)
### Community 98 - "Community 98"
Cohesion: 0.15
Nodes (13): CodexPromptGeneratorError, invalidExecutable, invalidPromptOutcome, invalidPromptSpec, invalidResultJSON, invalidTimeout, launchFailed, missingResult (+5 more)
### Community 99 - "Community 99"
Cohesion: 0.15
Nodes (12): code:bash (git clone https://github.com/zarubinvibe/iriz.git ~/iriz), code:bash (bash install.sh --build), Dictation history, Getting started, If this helped, Keeping it current, Onboarding, Settings (+4 more)
### Community 100 - "Community 100"
Cohesion: 0.3
Nodes (6): dictationHUDStripButtonSide(), dictationHUDStripLayout(), dictationHUDStripSize(), DictationHUDStripView, DictationHUDStripLayoutTests, DictationHUDHitDispatchTests
### Community 102 - "Community 102"
Cohesion: 0.21
Nodes (4): irizLocalizationBundle(), irizResolvedLanguage(), LocalizationTablesTests, LocalizationTests
### Community 103 - "Community 103"
Cohesion: 0.17
Nodes (12): FirstRunStep, accessibility, agent, inputMonitoring, microphone, model, plate, translate (+4 more)
### Community 104 - "Community 104"
Cohesion: 0.21
Nodes (5): firstRunCanAdvance(), firstRunNextStep(), firstRunPreviousStep(), firstRunShouldShow(), irizAnimation()
### Community 105 - "Community 105"
Cohesion: 0.24
Nodes (3): DictationHUDHintView, DictationHUDHintSizeTests, MeetingStoreTests
### Community 106 - "Community 106"
Cohesion: 0.26
Nodes (4): DictationTextProcessingResult, pastedText(), processedDictationText(), ProcessedDictationTextTests
### Community 107 - "Community 107"
Cohesion: 0.24
Nodes (8): Kind, correction, snippet, Match, Outcome, removingFinalPeriod(), Rule, TranscriptCorrector
### Community 108 - "Community 108"
Cohesion: 0.35
Nodes (9): пауза3с(), DictationHistoryClipboardLiveTests, DictationHistoryOrderTests, InsertedTextStoreTests, LogBox, makeEntryOnDisk(), privateTestPasteboard(), put() (+1 more)
### Community 109 - "Community 109"
Cohesion: 0.27
Nodes (5): PromptUserGuidanceTests, normalizedPromptUserGuidance(), PromptUserExample, PromptUserGuidance, promptUserGuidanceBlock()
### Community 110 - "Community 110"
Cohesion: 0.27
Nodes (6): saveTokenTimings(), DictationTimings, DictationTokenTiming, DictationTimingsShapeTests, DictationTimingsStoreTests, withTimingsRoot()
### Community 111 - "Community 111"
Cohesion: 0.25
Nodes (3): dictationHUDGlassInset(), DictationHUDGlassShape, DictationHUDSizeGeometryTests
### Community 112 - "Community 112"
Cohesion: 0.22
Nodes (10): Hashable, MarkAlarm, none, noPermission, MarkMode, dictating, fixing, paused (+2 more)
### Community 113 - "Community 113"
Cohesion: 0.25
Nodes (6): BlindLabelDecision, first, second, tie, PromptV2EvaluationTests, renderPair()
### Community 114 - "Community 114"
Cohesion: 0.31
Nodes (3): Counters, Day, File
### Community 115 - "Community 115"
Cohesion: 0.29
Nodes (4): MenuState, MenuStateHeroTests, MenuStatePromiseTests, ObservableObject
### Community 116 - "Community 116"
Cohesion: 0.33
Nodes (6): DictationSnippet, normalizedDictationSnippets(), normalizedDictationSnippetTrigger(), validatedDictationSnippet(), DictationSnippetNormalizationTests, DictationSnippetSubstitutionTests
### Community 117 - "Community 117"
Cohesion: 0.33
Nodes (7): AudioDecodingError, noAudioTrack, silentOrEmpty, tooShort, unreadable, AudioFileDecoder, DecodedAudio
### Community 118 - "Community 118"
Cohesion: 0.29
Nodes (7): captureDocShots(), docMenuState(), DocShot, docShots(), makeDocWindow(), makeIrizSettingsWindow(), IrizGlassBackdrop
### Community 119 - "Community 119"
Cohesion: 0.24
Nodes (4): Dict, iz_dereva(), selftest(), sobrat()
### Community 120 - "Community 120"
Cohesion: 0.31
Nodes (5): formattedOSStatus(), formattedOSStatusCode(), fourCharacterCodeString(), normalizedAudioLevel(), AudioLevelTests
### Community 121 - "Community 121"
Cohesion: 0.27
Nodes (4): AudioConverterInputProvider, AudioSampleAccumulator, CapturedAudioSegments, handleTap()
### Community 122 - "Community 122"
Cohesion: 0.31
Nodes (3): MenuActionRow, MenuBarLabelView, MenuContentView
### Community 123 - "Community 123"
Cohesion: 0.2
Nodes (10): FocusTarget, dictation, history, layout, meeting, mode, permissions, quit (+2 more)
### Community 124 - "Community 124"
Cohesion: 0.24
Nodes (4): DictationHUDLevelPump, DictationHUDSurface, dictationHUDTimer(), DictationHUDLevelPumpTests
### Community 125 - "Community 125"
Cohesion: 0.24
Nodes (6): WhisperEngine, WhisperEngineError, contextFailed, modelMissing, transcribeFailed, LocalizedError
### Community 126 - "Community 126"
Cohesion: 0.2
Nodes (4): IrizGlyphShape, IrizGlyphView, irizWriteGlyphSheet(), Shape
### Community 128 - "Community 128"
Cohesion: 0.2
Nodes (9): SettingsSectionSpec, appearance, behavior, corrections, layout, promptGuidance, promptMode, snippets (+1 more)
### Community 129 - "Community 129"
Cohesion: 0.22
Nodes (5): IrizConnector, googleCalendar, zoom, IrizConnectorConsent, ConnectorsTests
### Community 131 - "Community 131"
Cohesion: 0.24
Nodes (5): LayoutDetector, LayoutVerdict, keep, switchToConverted, undecided
### Community 132 - "Community 132"
Cohesion: 0.2
Nodes (9): 安全, 这些是怎么被验证的,而不是被口头保证的, 如果你发现了漏洞, 这个项目不承诺什么, 为什么这条界线画在这里, 出问题时会发生什么, 你可以自己检查什么, 这里真正值钱的是什么 (+1 more)
### Community 133 - "Community 133"
Cohesion: 0.33
Nodes (3): dictationHUDTranscriptLineCount(), dictationHUDTranscriptSize(), DictationHUDTranscriptLayoutTests
### Community 134 - "Community 134"
Cohesion: 0.28
Nodes (8): finishMeetingRecording(), MeetingRecorderFailure, alreadyRecording, cannotWriteFile, nothingRecorded, MeetingRecording, meetingRecordingScratchURL(), writeMeetingWAV()
### Community 135 - "Community 135"
Cohesion: 0.28
Nodes (8): irizCurrentLanguage(), IrizLanguage, auto, en, ru, zh, irizLanguageChoice(), setIrizLanguageChoice()
### Community 136 - "Community 136"
Cohesion: 0.36
Nodes (4): dictationLearningDemoToast(), DictationLearningToastClose, DictationLearningToastPresenter, DictationLearningToastView
### Community 139 - "Community 139"
Cohesion: 0.25
Nodes (5): Permission, accessibility, inputMonitoring, microphone, Permissions
### Community 140 - "Community 140"
Cohesion: 0.28
Nodes (5): ButtonStyle, Animation, IrizPressStyle, IrizSegments, View
### Community 141 - "Community 141"
Cohesion: 0.31
Nodes (4): RecordingReleaseAction, discardTooShort, transcribe, RecordingReleaseActionTests
### Community 143 - "Community 143"
Cohesion: 0.36
Nodes (7): applyDefaults(), DefaultCorrectionsSyntheticCorpusTests, DefaultCorrectionsTrapTests, PunctuationMetrics, SyntheticCorpusEntry, SyntheticCorrectionCorpus, SyntheticPunctuationGuardTests
### Community 144 - "Community 144"
Cohesion: 0.31
Nodes (6): DictationHUDFrameLog, DictationHUDPrewarmMode, full, none, wave, measureDictationHUDFirstShow()
### Community 146 - "Community 146"
Cohesion: 0.22
Nodes (9): PromptOutcomeIssue, blockingChoiceMissingQuestion, discoverableBlocks, emptyPrompt, excessiveLength, missingAmbiguity, missingExplicitField, notActionable (+1 more)
### Community 147 - "Community 147"
Cohesion: 0.22
Nodes (9): DictationHUDAccent, blue, cyan, green, neutral, orange, red, violet (+1 more)
### Community 148 - "Community 148"
Cohesion: 0.22
Nodes (8): 参与进来, 提交之前, 这里的代码怎么写, 一次改动的路线, 现在最缺的是什么, 你需要什么, code:bash (git clone https://github.com/zarubinvibe/iriz.git ~/iriz), code:bash (swift test)
### Community 149 - "Community 149"
Cohesion: 0.22
Nodes (8): Before you send a change, code:bash (git clone https://github.com/zarubinvibe/iriz.git ~/iriz), code:bash (swift test), Contributing, How code is written here, The path of a change, What is needed most right now, What you need
### Community 150 - "Community 150"
Cohesion: 0.22
Nodes (8): Как помочь, Прежде чем присылать правку, Как тут пишут, Путь правки, Что сейчас нужнее всего, Что нужно на машине, code:bash (git clone https://github.com/zarubinvibe/iriz.git ~/iriz), code:bash (swift test)
### Community 153 - "Community 153"
Cohesion: 0.46
Nodes (5): DictationLanguage, whisperCoreMLEncoderURL(), whisperModelCacheDirectory(), whisperModelURL(), WhisperEngineTests
### Community 154 - "Community 154"
Cohesion: 0.25
Nodes (5): IrizSelection, Kind, capsLock, combo, modifier
### Community 156 - "Community 156"
Cohesion: 0.39
Nodes (5): DictionaryTransferDocument, DictionaryTransferMergeTests, DictionaryTransferRefusalTests, DictionaryTransferRoundTripTests, json()
### Community 157 - "Community 157"
Cohesion: 0.36
Nodes (4): clampedHistorySelection(), movedHistorySelection(), DictationHistoryModel, DictationHistorySelectionTests
### Community 158 - "Community 158"
Cohesion: 0.36
Nodes (4): DictationHUDSettingsModelTests, DictationSnippetStorageTests, removeSuiteFile(), PromptAppProfileSettingsTests
### Community 159 - "Community 159"
Cohesion: 0.25
Nodes (8): DictationHUDForm, ellipsis, exclamation, historyLine, line, processing, slash, waveform
### Community 161 - "Community 161"
Cohesion: 0.5
Nodes (6): matches(), numberMatches(), PromptMarkup, termMatches(), TermReplacement, TextMatch
### Community 162 - "Community 162"
Cohesion: 0.25
Nodes (7): Правила проекта, Контекст уходит в модель сжатым, Ворота приемки, Конвейер Гелиоза в этом доме, Knowledge graph, Каждая задача делается по /ponytail, Поправки в сам прибор - `queue/UPSTREAM.md`
### Community 163 - "Community 163"
Cohesion: 0.25
Nodes (7): 首次安装时的对话, 第 1 步:先看看你在什么机器上运行, 第 2 步:把源码拿下来, 第 3 步:构建应用, 第 4 步:授予权限并下载模型, 第 5 步:验证这一切是不是诚实的, code:bash (bash scripts/verify.sh && bash scripts/offline_binary_gate.s)
### Community 164 - "Community 164"
Cohesion: 0.25
Nodes (7): code:bash (bash scripts/verify.sh && bash scripts/offline_binary_gate.s), Step 1: look at what you are running, Step 2: bring the sources in, Step 3: build the app, Step 4: grant the permissions and download the model, Step 5: check that it is all honest, The conversation at the first install
### Community 165 - "Community 165"
Cohesion: 0.25
Nodes (7): Разговор при первой установке, Шаг 1: смотрим, на чем вы запускаете, Шаг 2: приносим исходники, Шаг 3: собираем приложение, Шаг 4: выдаем разрешения и качаем модель, Шаг 5: проверяем, что все честно, code:bash (bash scripts/verify.sh && bash scripts/offline_binary_gate.s)
### Community 167 - "Community 167"
Cohesion: 0.29
Nodes (7): PromptTaskKind, agentic, coding, general, passthrough, research, writing
### Community 168 - "Community 168"
Cohesion: 0.57
Nodes (6): captureBareGlass(), captureOverBackdrop(), captureSettingsWindowLive(), captureWindowLive(), makeBackdropWindow(), probeSettingsGlass()
### Community 169 - "Community 169"
Cohesion: 0.48
Nodes (6): otslezhivaemye(), podhodit(), publikuemye(), Тот же перевод глоба в регулярку, что и у публикующего прибора. fnmatch тут, selftest(), v_regulyarku()
### Community 170 - "Community 170"
Cohesion: 0.29
Nodes (7): audioDeviceHasInputChannels(), AudioInputDevice, audioObjectStringProperty(), availableAudioInputDevices(), isDefaultAggregateAudioInputDevice(), isDefaultAggregateAudioInputPreference(), normalizedInputDevicePreference()
### Community 172 - "Community 172"
Cohesion: 0.33
Nodes (5): SpeechCleanupMode, external, local, off, SpeechCleanupModeTests
### Community 173 - "Community 173"
Cohesion: 0.29
Nodes (7): HotkeyAction, dictation, dictationAndEnter, history, layoutConversion, layoutSwitch, prompt
### Community 174 - "Community 174"
Cohesion: 0.29
Nodes (7): State, generatingPrompt, ready, recording, transcribing, unavailable, warmingUp
### Community 175 - "Community 175"
Cohesion: 0.29
Nodes (6): Безопасность, Чем это проверяется, а не обещается, Если вы нашли дыру, Чего этот проект не обещает, Что здесь вообще есть ценного, code:bash (bash scripts/offline_binary_gate.sh # сетевые символы в би)
### Community 176 - "Community 176"
Cohesion: 0.29
Nodes (6): code:bash (bash scripts/offline_binary_gate.sh # networking symbols i), How this is checked, not promised, If you found a hole, Security, What is actually valuable here, What this project does not promise
### Community 178 - "Community 178"
Cohesion: 0.47
Nodes (5): bar_rects(), olympus_profile(), Верхний обвод Олимпа с референса: гора красная, небо бледное, вода синяя., Прямоугольники столбиков волны. Одна геометрия и на свет, и на сами стержни:, render()
### Community 181 - "Community 181"
Cohesion: 0.47
Nodes (3): diskUsageBytes(), diskUsageEntries(), DiskUsageEntry
### Community 182 - "Community 182"
Cohesion: 0.33
Nodes (6): PromptFailureKind, artifactConflict, executableConfiguration, invalidResult, launchRuntime, timeout
### Community 183 - "Community 183"
Cohesion: 0.73
Nodes (3): SettingsDictionaryTransferTests, SettingsSnippetsTests, TransferFixture
### Community 185 - "Community 185"
Cohesion: 0.33
Nodes (6): TranscriptCorrectionDefect, emptyReplacement, emptySource, forbiddenCharacter, replacementTooLong, sourceTooLong
### Community 188 - "Community 188"
Cohesion: 0.4
Nodes (5): IrizBackdrop, black, gradient, stripes, white
### Community 190 - "Community 190"
Cohesion: 0.4
Nodes (5): PromptMode, addition, correction, prompt, undefined
### Community 191 - "Community 191"
Cohesion: 0.4
Nodes (5): DictationHUDAnchorEdge, bottom, left, right, top
### Community 192 - "Community 192"
Cohesion: 0.4
Nodes (5): VerificationVerdict, needsEyes, no, notApplicable, yes
### Community 194 - "Community 194"
Cohesion: 0.4
Nodes (5): AppProfileAddOutcome, added, invalidBundleID, listFull, updated
### Community 195 - "Community 195"
Cohesion: 0.4
Nodes (3): App, IrizAppMain, SettingsPreviewApp
### Community 198 - "Community 198"
Cohesion: 0.5
Nodes (4): BlindDecision, tie, v1, v2
### Community 201 - "Community 201"
Cohesion: 0.5
Nodes (4): EngineShutdownPolicy, idleTimeout, immediate, keepWarm
### Community 202 - "Community 202"
Cohesion: 0.5
Nodes (4): FirstRunPermission, accessibility, inputMonitoring, microphone
## Knowledge Gaps
- **650 isolated node(s):** `first`, `second`, `SyntheticCorrectionCorpus`, `shortCommand`, `fragmentedSpeech` (+645 more)
These have ≤1 connection - possible missing edges or undocumented components.
- **46 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
## Suggested Questions
_Questions this graph is uniquely positioned to answer:_
- **Why does `DictationSettings` connect `Community 20` to `Community 0`, `Community 40`, `Community 172`, `Community 143`, `Community 213`, `Community 25`, `Community 61`, `Community 158`, `Community 127`?**
_High betweenness centrality (0.051) - this node is a cross-community bridge._
- **Why does `AppDelegate` connect `Community 15` to `Community 136`, `Community 144`, `Community 83`, `Community 23`, `Community 126`?**
_High betweenness centrality (0.030) - this node is a cross-community bridge._
- **Why does `DictationHUDContent` connect `Community 48` to `Community 5`, `Community 7`, `Community 78`, `Community 14`, `Community 144`, `Community 17`, `Community 22`, `Community 87`?**
_High betweenness centrality (0.030) - this node is a cross-community bridge._
- **Are the 4 inferred relationships involving `DictationHUDPanelSurface` (e.g. with `wireHUD()` and `captureDictationHUDPlateScenes()`) actually correct?**
_`DictationHUDPanelSurface` has 4 INFERRED edges - model-reasoned connections that need verification._
- **What connects `first`, `second`, `SyntheticCorrectionCorpus` to the rest of the system?**
_650 weakly-connected nodes found - possible documentation gaps or missing edges._
- **Should `Community 0` be split into smaller, more focused modules?**
_Cohesion score 0.05 - nodes in this community are weakly interconnected._
- **Should `Community 1` be split into smaller, more focused modules?**
_Cohesion score 0.06 - nodes in this community are weakly interconnected._
File diff suppressed because it is too large Load Diff
+17
View File
@@ -29,6 +29,23 @@ mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources"
cp .build/release/IrizApp "$APP/Contents/MacOS/iriz" cp .build/release/IrizApp "$APP/Contents/MacOS/iriz"
cp .build/AppIcon.icns "$APP/Contents/Resources/AppIcon.icns" cp .build/AppIcon.icns "$APP/Contents/Resources/AppIcon.icns"
# Ресурсные бандлы SwiftPM. Сборщик копирует ТОЛЬКО исполняемый файл, а таблицы
# перевода и картинки живут в `*_*.bundle` рядом с ним в `.build`. Без этой
# строки `Bundle.module` в приложении не находит ничего, и продукт молча
# показывает русский на любом выбранном языке: английский и китайский падают в
# оригинал, потому что `L()` возвращает исходную строку, когда таблицы нет.
# Поймано кадром 06.09.2026: `settings-zh.png` вышел целиком по-русски.
# `-L`, потому что `.build/release` - симлинк на каталог с тройкой платформы,
# а find без него по симлинку не идёт и молча находит пусто.
BUNDLES=$(find -L .build/release -maxdepth 1 -type d -name '*.bundle')
if [ -z "$BUNDLES" ]; then
echo "build_app: ресурсные бандлы не найдены - переводов в приложении не будет" >&2
exit 1
fi
for bundle in $BUNDLES; do
cp -R "$bundle" "$APP/Contents/Resources/"
done
# Движок кандидата приходит бинарным фреймворком SwiftPM (whisper.cpp собран # Движок кандидата приходит бинарным фреймворком SwiftPM (whisper.cpp собран
# заранее, исходников у него в пакете нет). В бандл он сам не попадает: сборщик # заранее, исходников у него в пакете нет). В бандл он сам не попадает: сборщик
# копирует только исполняемый файл. Без этой строки приложение падало на старте # копирует только исполняемый файл. Без этой строки приложение падало на старте
+101
View File
@@ -0,0 +1,101 @@
#!/bin/bash
# Ворота устойчивости плашки: две съёмки подряд дают ОДИН И ТОТ ЖЕ кадр.
#
# Владелец 06.09.2026: «в очередной раз вижу глюк на самой плашке, она глючит и
# открывается по-разному и периодически криво». Жалоба повторялась, а спорить
# было не с чем: «по-разному» глазами не измеряется.
#
# Замер нашёл первую причину сразу: пять прогонов подряд разошлись на 97,8 %
# пикселей в форме «на записи». Плашку двигал сам прибор съёмки - сцена переноса
# тащила её в угол, отпускание сохраняло новое место в настройках, и каждая
# следующая съёмка начиналась с другой точки экрана.
#
# Форма «на записи» из сравнения исключена намеренно: в ней бежит волна, и
# пиксели обязаны отличаться. Сравниваются формы БЕЗ движения.
#
# scripts/plate_stability_gate.sh два прогона и сравнение
# scripts/plate_stability_gate.sh --selftest проверка самих ворот
set -uo pipefail
cd "$(dirname "$0")/.."
APP=/Applications/iriz.app/Contents/MacOS/iriz
STATIC_FORMS="plate-resting-light plate-resting-dark plate-hover-light plate-hover-dark plate-open-empty-light plate-open-empty-dark"
sravnit() {
python3 - "$1" "$2" <<'PYCMP'
import sys
from PIL import Image, ImageChops
a, b = (Image.open(p).convert("RGB") for p in sys.argv[1:3])
if a.size != b.size:
print(f"размер разошёлся: {a.size} против {b.size}")
sys.exit(1)
diff = ImageChops.difference(a, b)
data = diff.get_flattened_data() if hasattr(diff, "get_flattened_data") else diff.getdata()
bad = sum(1 for p in data if sum(p) > 24)
share = bad / (a.size[0] * a.size[1])
# Порог не ноль: стекло сэмплирует подложку живьём, и единичные пиксели по
# кромке гуляют от кадра к кадру. Форма, съехавшая хоть на пункт, даёт проценты.
if share > 0.005:
print(f"расхождение {share*100:.2f}%")
sys.exit(1)
sys.exit(0)
PYCMP
}
if [ "${1:-}" = "--selftest" ]; then
TMP=$(mktemp -d); trap 'rm -rf "$TMP"' EXIT
ok=0
python3 - "$TMP" <<'PYGEN'
import sys
from PIL import Image
d = sys.argv[1]
Image.new("RGB", (40, 20), (10, 20, 30)).save(f"{d}/a.png")
Image.new("RGB", (40, 20), (10, 20, 30)).save(f"{d}/b.png")
im = Image.new("RGB", (40, 20), (10, 20, 30))
for x in range(40):
for y in range(20):
im.putpixel((x, y), (200, 200, 200))
im.save(f"{d}/c.png")
PYGEN
if sravnit "$TMP/a.png" "$TMP/b.png" >/dev/null; then
echo " OK одинаковые кадры приняты"
else
echo "ПРОВАЛ: одинаковые кадры отвергнуты"; ok=1
fi
if sravnit "$TMP/a.png" "$TMP/c.png" >/dev/null; then
echo "ПРОВАЛ: разные кадры не пойманы"; ok=1
else
echo " OK разные кадры отвергнуты"
fi
[ $ok -eq 0 ] && echo "SELFTEST OK"
exit $ok
fi
if [ ! -x "$APP" ]; then
echo "ВОРОТА ПЛАШКИ: нет собранного приложения" >&2
echo "собери: bash scripts/build_app.sh" >&2
exit 2
fi
ODIN=$(mktemp -d); DVA=$(mktemp -d)
trap 'rm -rf "$ODIN" "$DVA"' EXIT
"$APP" --capture-plate "$ODIN" >/dev/null 2>&1 || { echo "ВОРОТА ПЛАШКИ: первая съёмка не удалась" >&2; exit 1; }
"$APP" --capture-plate "$DVA" >/dev/null 2>&1 || { echo "ВОРОТА ПЛАШКИ: вторая съёмка не удалась" >&2; exit 1; }
FAIL=0
for form in $STATIC_FORMS; do
if out=$(sravnit "$ODIN/$form.png" "$DVA/$form.png"); then
echo " OK $form"
else
echo " РАЗОШЛОСЬ $form: $out"
FAIL=1
fi
done
echo
if [ $FAIL -eq 0 ]; then
echo "ВОРОТА ПЛАШКИ: форма повторяется от прогона к прогону"
else
echo "ВОРОТА ПЛАШКИ: плашка открывается по-разному" >&2
fi
exit $FAIL
+114
View File
@@ -0,0 +1,114 @@
#!/usr/bin/env bash
# Снять ОДИН кадр Пантеона через встроенный image_gen Кодекса.
#
# Один кадр за вызов — не пожелание, а измеренный факт: просьба сгенерировать
# несколько изображений одним заданием зависает без вывода (проверено трижды:
# 24, 34 и 20 минут впустую). Один кадр идет 3-4 минуты.
#
# scripts/snyat_kadr.sh <файл-промпта> <выходной-png> [референс ...]
#
# Якоря канона (стиль + колонна) подставляются сами и идут первыми. Обертка
# ждет появления файла и проверяет, что это настоящий PNG непустого размера:
# отчет модели «готово» без файла на диске — не результат.
set -euo pipefail
DOM="$(cd "$(dirname "$0")/.." && pwd)"
SKILL="${PANTHEON_SKILL_DIR:-$HOME/.agents/skills/public-repo-release-gate}"
YAKOR_STIL="$SKILL/assets/pantheon-style-anchor.png"
YAKOR_KOLONNA="$SKILL/assets/pantheon-column.png"
if [ "$#" -lt 2 ]; then
echo "использование: $0 <файл-промпта> <выходной-png> [референс ...]" >&2
exit 2
fi
PROMPT_FILE="$1"; shift
VYHOD="$1"; shift
[ -f "$PROMPT_FILE" ] || { echo "нет файла промпта: $PROMPT_FILE" >&2; exit 2; }
for f in "$YAKOR_STIL" "$YAKOR_KOLONNA"; do
[ -f "$f" ] || { echo "нет якоря канона: $f" >&2; exit 2; }
done
VYHOD_ABS="$(python3 -c 'import os,sys;print(os.path.abspath(sys.argv[1]))' "$VYHOD")"
mkdir -p "$(dirname "$VYHOD_ABS")"
rm -f "$VYHOD_ABS"
REFS=("$YAKOR_STIL" "$YAKOR_KOLONNA")
for r in "$@"; do
[ -f "$r" ] || { echo "нет референса: $r" >&2; exit 2; }
REFS+=("$(python3 -c 'import os,sys;print(os.path.abspath(sys.argv[1]))' "$r")")
done
SPISOK=""
i=1
for r in "${REFS[@]}"; do
SPISOK="${SPISOK}Image ${i}: ${r}"$'\n'
i=$((i + 1))
done
ZADANIE="$(cat <<EOF
Call the image_gen tool exactly once. Pass these files as referenced_image_paths, in this order:
${SPISOK}
Save the generated image to this exact absolute path, creating no other files:
${VYHOD_ABS}
Use the prompt below verbatim as the image prompt. Do not summarize it, do not rewrite it, do not add to it. Do not write any code, do not run any other tool, do not explain. When the file exists, answer with the single word DONE.
--- PROMPT ---
$(cat "$PROMPT_FILE")
EOF
)"
echo "снимаю кадр: $(basename "$VYHOD_ABS") (референсов: ${#REFS[@]})"
NACHALO="$(date +%s)"
# </dev/null обязателен. Без него codex, запущенный без терминала (фоном, из
# скрипта, из агента), печатает «Reading additional input from stdin...» и ждет
# вечно: кадр не снимается, файл не появляется, а обертка молчит до таймаута.
# Ловилось живьем 05.09.2026 на двух кадрах подряд.
codex exec \
--cd "$DOM" \
--sandbox danger-full-access \
--skip-git-repo-check \
"$ZADANIE" >"${VYHOD_ABS}.log" 2>&1 </dev/null || true
KONETS="$(date +%s)"
# Дважды кадр «готов» по отчету модели, а файла на месте нет: инструмент сохранил
# его мимо пути и отчитался словом DONE. Слово не проверяется, файл проверяется.
# Поэтому перед отказом ищем PNG, появившийся за время прогона в очевидных местах.
if [ ! -s "$VYHOD_ABS" ]; then
MARKER="$(mktemp "${TMPDIR:-/tmp}/kadr-marker.XXXXXX")"
touch -t "$(date -r "$NACHALO" +%Y%m%d%H%M.%S)" "$MARKER" 2>/dev/null || true
# `|| true` тут обязателен: find возвращает ненулевой код, если хоть одного из
# каталогов нет, и под set -e обертка умирала молча вместо честного отказа.
NAYDEN="$(find "$DOM" "${TMPDIR:-/tmp}" "$HOME/Downloads" -maxdepth 4 -name '*.png' \
-newer "$MARKER" -not -path '*/.git/*' 2>/dev/null | head -2 || true)"
rm -f "$MARKER"
if [ "$(printf '%s\n' "$NAYDEN" | grep -c .)" = "1" ]; then
echo "кадр нашелся мимо пути, переношу: $NAYDEN"
mv "$NAYDEN" "$VYHOD_ABS"
fi
fi
if [ ! -s "$VYHOD_ABS" ]; then
echo "ОТКАЗ: файл не появился за $((KONETS - NACHALO)) с — $VYHOD_ABS" >&2
tail -20 "${VYHOD_ABS}.log" >&2 || true
exit 1
fi
if ! python3 - "$VYHOD_ABS" <<'PY'
import struct, sys
p = sys.argv[1]
with open(p, 'rb') as f:
head = f.read(24)
if head[:8] != b'\x89PNG\r\n\x1a\n':
sys.exit('не PNG')
w, h = struct.unpack('>II', head[16:24])
if w < 512 or h < 512:
sys.exit(f'слишком мелкий кадр {w}x{h}')
print(f'{w}x{h}')
PY
then
echo "ОТКАЗ: выход не прошел проверку PNG — $VYHOD_ABS" >&2
exit 1
fi
echo "готов за $((KONETS - NACHALO)) с: $VYHOD_ABS"
+46
View File
@@ -0,0 +1,46 @@
#!/usr/bin/env bash
# Снять серию кадров ПО ОДНОМУ, подряд. Драйвер поверх snyat_kadr.sh.
#
# scripts/snyat_seriyu.sh <имя> [<имя> ...]
#
# Для каждого имени берется .github/pantheon/<имя>-prompt.txt и снимается
# docs/assets/pantheon/<имя>.png. В референсы, кроме двух якорей канона, идут
# оба листа свода: без них каждая сцена придумывает фигуру и предметы заново.
# Уже снятый кадр пропускается, чтобы повтор прогона не стоил еще получаса.
set -uo pipefail
# Дом, по которому работает прибор. PANTHEON_DOM позволяет снимать серию для
# соседнего проекта семьи: кадры и свод живут в выпускаемом доме, а не там, где
# лежит скрипт.
DOM="$(cd "${PANTHEON_DOM:-$(dirname "$0")/..}" && pwd)"
# Снималка берётся РЯДОМ С ДРАЙВЕРОМ, а не в доме миссии. Иначе обещание PANTHEON_DOM
# («снимаем серию для соседнего проекта») ломается о собственную реализацию: у соседа
# scripts/snyat_kadr.sh нет и не должно быть - приборы выпуска живут в одном доме.
# Поймано 07.09.2026 на съёмке серии Койза: шесть отказов подряд «No such file or directory».
KADR="$(cd "$(dirname "$0")" && pwd)/snyat_kadr.sh"
[ -x "$KADR" ] || { echo "нет снималки кадра: $KADR" >&2; exit 2; }
SVOD_LICO="$DOM/docs/assets/pantheon/bible-character.png"
SVOD_REKVIZIT="$DOM/docs/assets/pantheon/bible-props.png"
for f in "$SVOD_LICO" "$SVOD_REKVIZIT"; do
[ -f "$f" ] || { echo "свод не снят: $f" >&2; exit 2; }
done
otkazy=0
for imya in "$@"; do
vyhod="$DOM/docs/assets/pantheon/$imya.png"
if [ -s "$vyhod" ]; then
echo "пропуск, кадр уже есть: $imya"
continue
fi
"$KADR" \
"$DOM/.github/pantheon/$imya-prompt.txt" \
"$vyhod" \
"$SVOD_LICO" "$SVOD_REKVIZIT" || otkazy=$((otkazy + 1))
done
if [ "$otkazy" -gt 0 ]; then
echo "серия закончена с отказами: $otkazy" >&2
exit 1
fi
echo "серия снята целиком"
+133
View File
@@ -0,0 +1,133 @@
#!/bin/bash
# Ворота уборки: продукт не оставляет мусора ни на диске, ни в настройках.
#
# Повод измеренный, не гипотетический. 06.09.2026 диск владельца встал на нуле
# свободных байт ПОСРЕДИ работы: ни одна команда не могла создать даже файл
# вывода. Разбор нашёл три вида мусора, и каждый копился месяцами молча:
#
# 1,1 ГБ архив `ggml-large-v3-encoder.mlmodelc.zip` рядом с распакованным
# каталогом того же имени. После распаковки не нужен никому.
# 2000+ доменов `iriz.tests.insertion.<UUID>` в UserDefaults: каждый прогон
# тестов вставки заводит suite и не убирает за собой.
# каталоги `dictations-quarantine-…` месячной давности.
#
# Слова владельца: «вот мусор весь, который нужно убирать, всегда нужно убирать.
# Это прям надо зашить в правила, причём опять же инструментом».
#
# scripts/tidy_gate.sh доклад; красный, если мусор есть
# scripts/tidy_gate.sh --clean убрать и доложить
# scripts/tidy_gate.sh --selftest проверка самих ворот
set -uo pipefail
cd "$(dirname "$0")/.."
SUPPORT="$HOME/Library/Application Support/iriz"
FAIL=0
CLEAN=0
[ "${1:-}" = "--clean" ] && CLEAN=1
# Настройки, которые заводят тесты. Живой домен продукта сюда не подходит по
# построению: у него нет суффикса-UUID.
#
# Считаются ФАЙЛЫ, а не домены. Одного `defaults delete` мало: он забывает домен
# в cfprefsd, а plist остаётся в ~/Library/Preferences, и демон поднимает домен
# обратно из файла. Поймано живьём: после чистки 858 доменов их снова стало 862
# при 2105 файлах на диске.
# Берутся ТОЛЬКО наши домены и только те, в имени которых есть `test`. Чужие
# настройки не трогаются никогда: рядом лежит, например,
# `com.google.chrome.for.testing.plist`, и он не наш.
test_prefs() {
ls "$HOME/Library/Preferences" 2>/dev/null \
| grep -E '^(iriz|smltlk|ru\.iriz|ru\.smltlk)' \
| grep -E 'test' \
| sed "s|^|$HOME/Library/Preferences/|" || true
}
# Архив, распакованный каталог которого лежит рядом.
unpacked_archives() {
local dir="$SUPPORT/Models/whisper"
[ -d "$dir" ] || return 0
local zip base
for zip in "$dir"/*.zip; do
[ -e "$zip" ] || continue
base="${zip%.zip}"
[ -d "$base" ] && echo "$zip"
done
}
stale_quarantines() {
[ -d "$SUPPORT" ] || return 0
find "$SUPPORT" -maxdepth 1 -type d -name 'dictations-quarantine-*' -mtime +30 2>/dev/null || true
}
if [ "${1:-}" = "--selftest" ]; then
# Ворота обязаны краснеть на заведомом мусоре и молчать на чистом доме.
TMP=$(mktemp -d); trap 'rm -rf "$TMP"' EXIT
ok=0
mkdir -p "$TMP/Models/whisper/model.mlmodelc"
: > "$TMP/Models/whisper/model.mlmodelc.zip"
: > "$TMP/Models/whisper/одинокий.zip"
found=$(SUPPORT="$TMP"; dir="$TMP/Models/whisper"
for z in "$dir"/*.zip; do b="${z%.zip}"; [ -d "$b" ] && echo "$z"; done)
case "$found" in
*model.mlmodelc.zip) echo " OK распакованный архив пойман" ;;
*) echo "ПРОВАЛ: распакованный архив не пойман"; ok=1 ;;
esac
case "$found" in
*одинокий.zip) echo "ПРОВАЛ: одинокий архив назван мусором — модель потеряли бы"; ok=1 ;;
*) echo " OK одинокий архив не тронут" ;;
esac
[ $ok -eq 0 ] && echo "SELFTEST OK"
exit $ok
fi
echo "=== мусор на диске ==="
ARCHIVES=$(unpacked_archives)
if [ -n "$ARCHIVES" ]; then
while IFS= read -r zip; do
echo " распакованный архив: $zip ($(du -h "$zip" | cut -f1))"
[ $CLEAN -eq 1 ] && rm -f "$zip" && echo " удалён"
done <<< "$ARCHIVES"
[ $CLEAN -eq 0 ] && FAIL=1
else
echo " архивов-дублей нет"
fi
QUARANTINES=$(stale_quarantines)
if [ -n "$QUARANTINES" ]; then
while IFS= read -r dir; do
echo " карантин старше месяца: $dir"
[ $CLEAN -eq 1 ] && rm -rf "$dir" && echo " удалён"
done <<< "$QUARANTINES"
[ $CLEAN -eq 0 ] && FAIL=1
else
echo " карантинов старше месяца нет"
fi
echo
echo "=== мусор в настройках ==="
PREFS=$(test_prefs)
COUNT=$(printf '%s' "$PREFS" | grep -c . || true)
if [ "$COUNT" -gt 0 ]; then
echo " настроек от тестов: $COUNT файлов"
if [ $CLEAN -eq 1 ]; then
# Файлы сносятся пачкой, а домены забываются одним перезапуском
# демона. Прежде на каждый файл звался `defaults delete` — 29 684
# процесса, полчаса работы и никакого выигрыша: cfprefsd всё равно
# перечитывает каталог целиком.
printf '%s\n' "$PREFS" | tr '\n' '\0' | xargs -0 rm -f 2>/dev/null
killall cfprefsd >/dev/null 2>&1
echo " удалены"
else
FAIL=1
fi
else
echo " настроек от тестов нет"
fi
echo
if [ $FAIL -eq 0 ]; then
echo "ВОРОТА УБОРКИ: чисто"
else
echo "ВОРОТА УБОРКИ: мусор есть — убери: bash scripts/tidy_gate.sh --clean" >&2
fi
exit $FAIL
+24 -1
View File
@@ -9,7 +9,14 @@
# Три правила: # Три правила:
# T01 каждый ключ из кода присутствует в каждой таблице; # T01 каждый ключ из кода присутствует в каждой таблице;
# T02 ни одна строка нерусской таблицы не осталась русской; # T02 ни одна строка нерусской таблицы не осталась русской;
# T03 экранированные последовательности не потеряны при переводе. # T03 экранированные последовательности не потеряны при переводе;
# T04 таблица читается системой вообще.
#
# T04 добавлено 06.09.2026 по живому дефекту. Один незаэкранированный апостроф
# ломает НЕ строку, а ВСЮ таблицу: система молча отдаёт пусто, и весь язык
# показывается по-русски. Так и вышло с английским: три строки с кавычками
# внутри текста погасили весь английский интерфейс, и увидеть это можно было
# только кадром. Проверяется тем же plutil, которым таблицу читает система.
set -uo pipefail set -uo pipefail
cd "$(dirname "$0")/.." cd "$(dirname "$0")/.."
@@ -95,6 +102,22 @@ if [ "${1:-}" = "--selftest" ]; then
exit $ok exit $ok
fi fi
# T04: таблица обязана читаться. Проверяется ДО остальных правил: на битой
# таблице все прочие проверки говорят о ключах, которых система всё равно не
# увидит.
SINTAKSIS=0
for tablica in "$EN" "$ZH"; do
if ! plutil -lint "$tablica" >/dev/null 2>&1; then
echo "T04: таблица не читается системой: $tablica" >&2
plutil -lint "$tablica" 2>&1 | tail -1 >&2
SINTAKSIS=1
fi
done
if [ $SINTAKSIS -ne 0 ]; then
echo "ВОРОТА ПЕРЕВОДА: битая таблица гасит ВЕСЬ язык, а не одну строку" >&2
exit 1
fi
if out=$(check); then if out=$(check); then
echo "ворота перевода: чисто" echo "ворота перевода: чисто"
exit 0 exit 0
+8
View File
@@ -41,6 +41,14 @@ echo "=== ворота постоянства плашки ==="
# его уже собрали, поэтому ворота стоят после них. # его уже собрали, поэтому ворота стоят после них.
bash scripts/hud_always_on_gate.sh || FAIL=1 bash scripts/hud_always_on_gate.sh || FAIL=1
echo
echo "=== уборка ==="
# Убирает, а не докладывает: тесты заводят домены настроек, а cfprefsd
# дописывает их plist уже ПОСЛЕ выхода процесса, и победить это из теста нельзя.
# Значит убирает машина, и делает это на каждом прогоне. К 06.09.2026 в
# ~/Library/Preferences накопилось 29 684 файла на 120 МБ.
bash scripts/tidy_gate.sh --clean || FAIL=1
echo echo
echo "=== ворота стекла (рецепт) ===" echo "=== ворота стекла (рецепт) ==="
bash scripts/glass_gate.sh --static || FAIL=1 bash scripts/glass_gate.sh --static || FAIL=1