ai_co_discuss 0.4.25 → 0.4.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/runner.md +1 -1
- package/package.json +1 -1
- package/runner/admin_panel.mjs +9 -3
- package/runner/discussion_launch.mjs +2320 -2310
- package/runner/discussion_setup.mjs +35 -11
- package/runner/launcher.mjs +231 -129
- package/runner/workflows.mjs +7 -2
- package/web/app.js +5411 -5409
- package/web/modern.css +1 -1
- package/web/modern.js +38 -38
- package/workflows/story-serial/agents/critic.md +1 -1
- package/workflows/story-serial/agents/critic_people.md +2 -3
- package/workflows/story-serial/agents/recorder.md +2 -3
package/docs/runner.md
CHANGED
|
@@ -41,7 +41,7 @@ codiscuss setup
|
|
|
41
41
|
|
|
42
42
|
不选项目目录时,房间使用**草稿空间**:程序在草稿空间里为这个房间单独建一个文件夹(房间名加短编号)并作为它的项目目录,成员生成的文件存在这里,“文件”页可以浏览,成员也可以设为可写。草稿空间默认在服务目录旁(`~/.codiscuss-workspace`)。房间画的图除了作为附件随消息发出,成员对项目目录可写时、或房间在草稿空间时,还会在该目录的 `images/` 下留一份。
|
|
43
43
|
|
|
44
|
-
Windows
|
|
44
|
+
Windows 上在终端运行 `codiscuss setup` 时,“安装配置”一步有“桌面快捷方式”:还没有时默认勾选“创建‘共议’快捷方式”,已有时显示为“重新生成”、默认不勾(非交互运行不创建);也可随时运行 `codiscuss launcher` 生成或重新生成。它会生成“共议”程序,桌面和开始菜单各有一个快捷方式,双击即可启动服务并打开网站。服务运行时任务栏右下角有共议图标:左键打开**管理面板**,右键可打开共议、重启或关闭服务(也可运行 `codiscuss panel`)。第一次需要在“设置 → 个性化 → 任务栏 → 其他系统托盘图标”里打开“共议”,图标才会常驻任务栏。面板只在这台电脑上打开,用来管理托管的用户、为每个用户建立独立的 Windows 用户、登录 Claude Code / Codex / Antigravity 命令行,以及给用户配置 API 密钥。
|
|
45
45
|
|
|
46
46
|
### 浏览项目文件
|
|
47
47
|
|
package/package.json
CHANGED
package/runner/admin_panel.mjs
CHANGED
|
@@ -246,9 +246,11 @@ const EDGE_PATHS = [join(process.env['ProgramFiles(x86)'] || 'C:\\Program Files
|
|
|
246
246
|
/**
|
|
247
247
|
* Show the panel in a window of its own: Edge, which every Windows 10/11 has, in app mode (no address bar or tabs, its
|
|
248
248
|
* own taskbar entry), with a profile kept in the owner's service directory. A window already open is brought forward
|
|
249
|
-
* instead of opening another; without Edge the default browser opens the page.
|
|
249
|
+
* instead of opening another; without Edge the default browser opens the page. `look_first` is false when the taskbar
|
|
250
|
+
* icon asks: it has just looked for the window itself, and looking again here delays the new window by a second.
|
|
250
251
|
*/
|
|
251
|
-
function open_panel_window(data, url) {
|
|
252
|
+
function open_panel_window(data, url, look_first = true) {
|
|
253
|
+
if (!look_first) return launch_panel_window(data, url);
|
|
252
254
|
// The title goes in a script file with a byte-order mark: on a command line Windows would pass it in the ANSI code page,
|
|
253
255
|
// the Chinese title would no longer match, and every call would open another window.
|
|
254
256
|
const script = join(tmpdir(), `codiscuss-focus-${process.pid}.ps1`);
|
|
@@ -256,6 +258,10 @@ function open_panel_window(data, url) {
|
|
|
256
258
|
const focused = spawnSync('powershell.exe', ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', script], { encoding: 'utf8', windowsHide: true, timeout: 10_000 });
|
|
257
259
|
rmSync(script, { force: true });
|
|
258
260
|
if (focused.stdout?.trim() === 'focused') return;
|
|
261
|
+
launch_panel_window(data, url);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
function launch_panel_window(data, url) {
|
|
259
265
|
const edge = EDGE_PATHS.find(path => existsSync(path));
|
|
260
266
|
if (!edge) return open_browser(url);
|
|
261
267
|
spawn(edge, [`--app=${url}`, `--user-data-dir=${join(data, 'panel-window')}`, `--window-size=${WINDOW_SIZE}`, '--no-first-run', '--no-default-browser-check', '--lang=zh-CN', '--disable-features=Translate,msTranslate'],
|
|
@@ -302,7 +308,7 @@ function run_panel(data, port) {
|
|
|
302
308
|
});
|
|
303
309
|
const rendered = join(data, 'launcher', 'codiscuss.ico');
|
|
304
310
|
const tray = show_tray({ title: '共议 · 管理面板', icon_path: existsSync(rendered) ? rendered : '', window_title: WINDOW_TITLE, host: join(data, 'launcher', '共议.exe'), on_action: action => {
|
|
305
|
-
if (action === 'open') open_panel_window(data, panel_url(state));
|
|
311
|
+
if (action === 'open') open_panel_window(data, panel_url(state), false);
|
|
306
312
|
if (action === 'site') open_browser(site_url(data));
|
|
307
313
|
if (action === 'restart') run_owner_service(data, 'stop').then(() => run_owner_service(data, 'start')).catch(() => {});
|
|
308
314
|
if (action === 'stop') run_owner_service(data, 'stop').catch(() => {}).finally(shutdown);
|