Skip to content

知了 Cicada · 任何会议和直播的实时字幕、同声传译、AI 会议纪要,Mac、Windows、Linux、Android 免费开源。Live subtitles, interpreting and meeting notes for any call or stream, on Mac, Windows, Linux and Android.

chore: debug commands to open People and Edit Notes as windows for screenshots

wquguru5ffc74edd4f9
diff --git a/Sources/Cicada/AppModel.swift b/Sources/Cicada/AppModel.swift
index c018109..063e970 100644
--- a/Sources/Cicada/AppModel.swift
+++ b/Sources/Cicada/AppModel.swift
@@ -2393,6 +2393,17 @@ final class AppModel: ObservableObject {
if let img = r.nsImage, let tiff = img.tiffRepresentation, let rep = NSBitmapImageRep(data: tiff) {
try? rep.representation(using: .png, properties: [:])?.write(to: URL(fileURLWithPath: p[1]))
}
+ case "peopleShow", "notesEditShow":
+ // peopleShow (设置 › 通用 › 人员库) and notesEditShow:<会议 id> (编辑纪要) in a window of
+ // their own, for `screencapture -l` (winall): sheets a synthetic click can't reach.
+ let view: AnyView = parts.first == "peopleShow"
+ ? AnyView(SpeakerLibraryView(model: self))
+ : AnyView(NotesEditorView(model: self, sessionID: arg))
+ let w = NSWindow(contentViewController: NSHostingController(rootView: view))
+ w.title = parts.first ?? ""
+ w.isReleasedWhenClosed = false
+ w.center()
+ w.makeKeyAndOrderFront(nil)
case "windowsRender":
// Every visible window as drawn (<dir>/<n>-<class>.png), without Screen Recording permission.
for (i, w) in NSApp.windows.enumerated() where w.isVisible {
diff --git a/tools/README.md b/tools/README.md
index b082cff..41b493a 100644
--- a/tools/README.md
+++ b/tools/README.md
@@ -29,7 +29,7 @@
- 显示与字幕:`display:<notes|bar|none>`、`subtitles:<both|translation|original>`、`meetingSubtitles:<…>`、`overlayState`、`overlayToggle`、`pillClick`(等于点主窗口顶部的“正在听”)、`overlayAuto[:off]`、`hideAfter:<秒>`
- 纪要:`notesLang:<mine|source>`、`meetingNotesLang:<…>`、`notesRegenerate:<id>=<mine|source>`、`notesWindow[:x,y,w,h]`、`notesClose`、`notesMinimize`、`notesFrame`、`notesNow`、`notesState`、`notesShow:<id>`、`notesReplay:<id>[,<每次几句>]`(按会议时的节奏重写一遍纪要,默认每次 4 句;回复被 max_tokens 截断时日志写 `cut at max_tokens`)、`notesCapturable[:off]`(只改窗口能否被截屏)、`notesShare:<on|off>`(改“共享屏幕时让对方看到”这个设置,等于点图标或开关)
- 结束会议:`endSim:<应用名>[,…]` 假装这些会议应用在通话(`endSim:` 全部挂断,`endSim:off` 回到真实情况),`endTimes:<静默秒>,<倒计时秒>,<挂断宽限秒>` 缩短等待(`endTimes:` 回到设置),`endKeep` 等于点“继续记录”,`endState` 写进日志
- - 渲染(不需要录屏权限):`panelRender:<png>`(菜单栏面板,离屏画)、`windowsRender:<目录>`、`settingsRender:<栏目>=<png>`、`notesRender:<png>`、`mainShow:<id>[,transcript]`、`mainWindow:x,y,宽,高`(摆好主窗口并暂时浮在最上层,方便模拟点击;不带参数恢复)、`mainRender:<png>`、`speakTestRender:<png>`
+ - 渲染(不需要录屏权限):`panelRender:<png>`(菜单栏面板,离屏画)、`windowsRender:<目录>`、`settingsRender:<栏目>=<png>`、`notesRender:<png>`、`mainShow:<id>[,transcript]`、`mainWindow:x,y,宽,高`(摆好主窗口并暂时浮在最上层,方便模拟点击;不带参数恢复)、`mainRender:<png>`、`speakTestRender:<png>`;`peopleShow`(人员库)、`notesEditShow:<会议 id>`(编辑纪要)单独开成窗口,用 `winall` + `screencapture -l` 截
- AI:`aiKeyFile:<路径>`(从 0600 文件读 key,不经过日志;测完就删掉文件)、`aiCheck`、`aiRemove`、`aiHide:<on|off>`(只在内存里当作没有 key,文件不动;用于截图)、`aiState`、`lingSimulate:<429|hijack|timeout|off>`、`translateFail:<n>`(接下来 n 句在所有翻译来源都失败,用来测重试)、`googleDown:<on|off>`(Google 翻译当作连不上,测提示和暂停)
- 声音:`voice:<语言>[=<id>]`、`voicePreview:<语言>=<id>`、`voiceCloneFile:<wav>`、`voicePicker:<on|off>`
- 诊断:`diagnostics:<on|off>`、`diagReport`