ai_co_discuss 0.3.44 → 0.3.45
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/backend/server.py +2555 -2555
- package/package.json +1 -1
- package/runner/discussion_setup.mjs +11 -4
- package/web/app.js +3 -6
package/package.json
CHANGED
|
@@ -402,7 +402,8 @@ function report_setup(result, options = {}) {
|
|
|
402
402
|
if (result.command.path) lines.push(`持久命令:${result.command.path}(${result.command.status})`);
|
|
403
403
|
if (result.local?.running) {
|
|
404
404
|
lines.push(`本机网站:${result.local.url}${options['no-open'] ? '' : '(已在浏览器打开)'}`,
|
|
405
|
-
'网站与讨论服务在后台运行,关闭此终端不影响;查看状态 codiscuss local status,停止 codiscuss local stop;电脑重启后运行 codiscuss local open
|
|
405
|
+
'网站与讨论服务在后台运行,关闭此终端不影响;查看状态 codiscuss local status,停止 codiscuss local stop;电脑重启后运行 codiscuss local open 重新启动并打开浏览器(codiscuss local start 不打开浏览器);codiscuss service restart 重启讨论服务(使新环境变量生效)'
|
|
406
|
+
+ (process.platform === 'win32' ? ';codiscuss service autostart on 登录时自动启动。' : '。'));
|
|
406
407
|
}
|
|
407
408
|
lines.push(...result.issues, '真实 AI 执行尚未验证;可从网页创建讨论,或在新会话调用 Skill。');
|
|
408
409
|
if (result.skills.length) lines.push('若新会话未发现技能,请让 AI 读取上述目录内的 discuss-host/SKILL.md 和 discuss-participant/SKILL.md。');
|
|
@@ -424,9 +425,15 @@ function report_styled(result, options) {
|
|
|
424
425
|
if (result.skills.length) rows.push(['技能', result.skills.map(group => `${group.client} ${group.results.filter(skill => skill.status !== 'conflict').length}/${group.results.length}`).join(' · '), 'discuss-host · discuss-participant · discuss-report']);
|
|
425
426
|
if (result.command.path) rows.push(['命令', `codiscuss ${tone.dim(`(${result.command.status})`)}`, short_path(result.command.path)]);
|
|
426
427
|
const notes = result.issues.map(issue => tone.yellow(`▲ ${issue}`));
|
|
427
|
-
if (result.local?.running)
|
|
428
|
-
|
|
429
|
-
|
|
428
|
+
if (result.local?.running) {
|
|
429
|
+
const commands = [['codiscuss local status', '查看状态'], ['codiscuss local stop', '停止'], ['codiscuss local open', '启动并打开浏览器(重启电脑后用)'],
|
|
430
|
+
['codiscuss local start', '启动但不打开浏览器'],
|
|
431
|
+
['codiscuss service restart', '重启讨论服务(使新环境变量生效)']];
|
|
432
|
+
if (process.platform === 'win32') commands.push(['codiscuss service autostart on', '登录时自动启动']);
|
|
433
|
+
const width = Math.max(...commands.map(([command]) => command.length)) + 2;
|
|
434
|
+
notes.push(tone.dim('网站与讨论服务在后台运行,关闭此终端不影响'),
|
|
435
|
+
...commands.map(([command, label]) => `${tone.cyan(command.padEnd(width))}${tone.dim(label)}`));
|
|
436
|
+
}
|
|
430
437
|
const closing = result.local?.running ? `在网页新建讨论,或在 AI 会话里调用 ${tone.cyan('discuss-host')} ${tone.dim('· 真实 AI 执行尚未验证')}`
|
|
431
438
|
: `运行 ${tone.cyan('codiscuss local open')} 启动网站`;
|
|
432
439
|
outro(title, rows, notes, closing, mark);
|
package/web/app.js
CHANGED
|
@@ -2749,8 +2749,7 @@ function write_create_host_workflows(value) {
|
|
|
2749
2749
|
/** Grant or withdraw this room's host the right to save and enable workflows by itself. */
|
|
2750
2750
|
async function set_room_host_workflows(allowed) {
|
|
2751
2751
|
const room_id = state.room.id;
|
|
2752
|
-
const token = localStorage.getItem(`discuss-access:${room_id}`);
|
|
2753
|
-
if (!token) throw new Error("此浏览器缺少房间控制凭据,请使用创建房间的浏览器");
|
|
2752
|
+
const token = localStorage.getItem(`discuss-access:${room_id}`) || "";
|
|
2754
2753
|
await local_launch_request("room-workflow", { room_id, token, action: "host", allowed: Boolean(allowed) });
|
|
2755
2754
|
await reload_room_models();
|
|
2756
2755
|
}
|
|
@@ -2789,8 +2788,7 @@ function create_workflow_label(name) {
|
|
|
2789
2788
|
/** Bind a workflow to this room after its cards were invited (or brought back); the host reads it from the next task. */
|
|
2790
2789
|
async function enable_room_workflow({ id, members }) {
|
|
2791
2790
|
const room_id = state.room.id;
|
|
2792
|
-
const token = localStorage.getItem(`discuss-access:${room_id}`);
|
|
2793
|
-
if (!token) throw new Error("此浏览器缺少房间控制凭据,请使用创建房间的浏览器");
|
|
2791
|
+
const token = localStorage.getItem(`discuss-access:${room_id}`) || "";
|
|
2794
2792
|
await local_launch_request("room-workflow", { room_id, token, action: "enable", workflow: { id, members } });
|
|
2795
2793
|
notify("info", "工作流已启用,主持人下一次任务起按它组织工作");
|
|
2796
2794
|
await reload_room_models();
|
|
@@ -2799,8 +2797,7 @@ async function enable_room_workflow({ id, members }) {
|
|
|
2799
2797
|
/** Release the room's workflow: its members leave (the host stays), and the host stops following it. */
|
|
2800
2798
|
async function disable_room_workflow() {
|
|
2801
2799
|
const room_id = state.room.id;
|
|
2802
|
-
const token = localStorage.getItem(`discuss-access:${room_id}`);
|
|
2803
|
-
if (!token) throw new Error("此浏览器缺少房间控制凭据,请使用创建房间的浏览器");
|
|
2800
|
+
const token = localStorage.getItem(`discuss-access:${room_id}`) || "";
|
|
2804
2801
|
await local_launch_request("room-workflow", { room_id, token, action: "disable" });
|
|
2805
2802
|
notify("info", "工作流已停用,它带来的成员已离开");
|
|
2806
2803
|
await refresh_room();
|