ai_co_discuss 0.4.67 → 0.4.68
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/en/runner.md +1 -1
- package/docs/runner.md +1 -1
- package/frontend/locales/en/external.json +5 -7
- package/package.json +1 -1
- package/web/app.js +21 -4
- package/web/i18n.js +1 -1
- package/web/markdown.css +1 -1
- package/web/markdown.js +1 -1
- package/web/modern.css +1 -1
- package/web/modern.js +43 -43
package/docs/en/runner.md
CHANGED
|
@@ -87,7 +87,7 @@ Invite an AI on another computer into your room: it reads only the project files
|
|
|
87
87
|
**Before you start**: both computers install CoDiscuss and run the local service; your computer is [connected to a hosted site](#from-a-hosted-site) with the relay deployed, and the other side reaches your room through that site's encrypted relay. While your computer is off or codiscuss is not running, the other side gets nothing.
|
|
88
88
|
|
|
89
89
|
**Invite (your computer)**:
|
|
90
|
-
1. In the new-room panel or Invite members, choose External →
|
|
90
|
+
1. In the new-room panel or Invite members, choose External → External expert and select the access, folders and membership duration after check-in.
|
|
91
91
|
2. Choose Add a seat awaiting check-in (automatic when creating the room). The seat appears immediately in the right-hand roster; share its link, QR code or pairing code. The link lasts 10 minutes and binds one member; regenerating it invalidates the previous link. Without a connected hosted site, the seat shows that it is waiting for a link and explains why; generate it from the seat menu after connecting. Before check-in, the panel shows the automatic expiry deadline and Remove seat. Usage, read logs and access adjustments appear after check-in.
|
|
92
92
|
3. Redemption completes check-in and starts the membership duration, with **no extra approval step**. Pending seats receive no work and do not participate in group replies or discussions; they end automatically after 7 days. An expired link leaves the seat intact.
|
|
93
93
|
4. `@` it in the room; its answers appear in the conversation as usual. "Read log and access" in the member menu lists every file it read (recorded by your computer) and lets you extend, downgrade to discussion only, or revoke; revoking takes effect immediately.
|
package/docs/runner.md
CHANGED
|
@@ -118,7 +118,7 @@ codiscuss local connect https://你的站点
|
|
|
118
118
|
**前提**:两台电脑都安装共议并运行本机服务;你的电脑已[连接线上网站](#线上网页连接本机)并部署了中转,对方经这个网站的加密中转访问你的房间。你的电脑关机或 codiscuss 未运行时,对方什么也拿不到。
|
|
119
119
|
|
|
120
120
|
**邀请(你的电脑)**:
|
|
121
|
-
1. 建房面板或右栏“邀请成员”里选择“外部 ·
|
|
121
|
+
1. 建房面板或右栏“邀请成员”里选择“外部 · 外部专家”,设置开放内容、目录和签到后的有效期。
|
|
122
122
|
2. 点“添加待签到席位”(建房时自动添加),右栏名单立即显示待签到成员;把席位的链接、二维码或配对码发给对方。链接 10 分钟有效,只能绑定一位成员;重新生成会立即作废旧链接。未绑定线上站点时显示“待生成链接”及原因,绑定站点后从席位菜单生成。待签到面板显示自动结束期限,可“移除席位”;签到后才显示用量、读取记录和授权调整。
|
|
123
123
|
3. 对方兑换即完成签到,成员有效期从兑换时开始,**没有额外批准步骤**。未签到不收任务、不参与全体回应或讨论,7 天后自动结束;链接过期不会删除席位。
|
|
124
124
|
4. 在房间里 `@` 它,回答照常出现在对话中。成员菜单的“读取记录与权限”列出它读过的每个文件(由你的电脑记录),可延长、降为只讨论或撤销授权,撤销立即生效。
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"已拒绝,对方会看到“对方未同意”": "Declined; the other side will see \"Not accepted\"",
|
|
29
29
|
"已在这台电脑上退出;对方电脑不在线,它那边要等撤销或到期才会移除": "Left on this computer; the other computer is offline, so it removes you only when it revokes or the membership expires",
|
|
30
30
|
"已退出该房间": "Left the room",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
31
|
+
"邀请外部专家": "Invite an external expert",
|
|
32
|
+
"外部专家": "External expert",
|
|
33
33
|
"移除这张卡片": "Remove this card",
|
|
34
34
|
"能做什么": "What it may do",
|
|
35
35
|
"开放目录": "Open directories",
|
|
@@ -61,7 +61,6 @@
|
|
|
61
61
|
"已结束:不能再领取请求或读取文件": "Ended: can no longer take requests or read files",
|
|
62
62
|
"已到期:不能再领取请求或读取文件": "Expired: can no longer take requests or read files",
|
|
63
63
|
"{name} 经邀请加入了房间(外部 · {level});不是你邀请的就在成员菜单里撤销": "{name} joined the room by invitation ({level}); if you did not invite it, revoke it from its member menu",
|
|
64
|
-
"邀请另一台电脑上的 AI 只读本房间项目": "Invite an AI on another computer to read this room's project",
|
|
65
64
|
"等你同意": "Waiting for you",
|
|
66
65
|
"你未同意": "You declined",
|
|
67
66
|
"超时未确认": "Timed out",
|
|
@@ -167,7 +166,7 @@
|
|
|
167
166
|
"无法读取这个邀请链接": "This invitation link can't be read",
|
|
168
167
|
"链接可能被截断或改动过。请让对方重新复制完整链接发给你。": "The link may have been cut off or changed. Ask them to copy the complete link and send it again.",
|
|
169
168
|
"也可以在自己共议左栏“被邀请的房间”里输入对方给的配对码。": "You can also enter the pairing code they gave you under \"Invited rooms\" in your own CoDiscuss sidebar.",
|
|
170
|
-
"
|
|
169
|
+
"对方电脑上的 AI,只读本房间开放的内容": "An AI on their computer; reads only what this room opens",
|
|
171
170
|
"用量": "Usage",
|
|
172
171
|
"这位外部成员已结束,不能再调整;需要时重新邀请。": "This external member has ended and can no longer be changed; invite again if needed.",
|
|
173
172
|
"正在读取读取记录": "Loading the read log",
|
|
@@ -180,17 +179,16 @@
|
|
|
180
179
|
"剩 {count} 分": "{count}m",
|
|
181
180
|
"{used} / {limit} · 本小时 {hour} / {hour_limit} · 被拒 {denied} 次": "{used} / {limit} · this hour {hour} / {hour_limit} · {denied} refused",
|
|
182
181
|
"还没有选项目目录,只能选“只讨论”。": "No project directory chosen yet, so only \"Discuss only\" is available.",
|
|
183
|
-
"
|
|
182
|
+
"外部专家 · 待签到": "External expert · Awaiting check-in",
|
|
184
183
|
"待签到": "Awaiting check-in",
|
|
185
184
|
"重新生成链接": "Regenerate link",
|
|
186
185
|
"添加待签到席位": "Add a seat awaiting check-in",
|
|
187
186
|
"待生成链接": "Waiting for a link",
|
|
188
187
|
"邀请链接": "Invitation link",
|
|
189
|
-
"创建房间后添加待签到席位并生成邀请链接,再发给对方。": "After creating the room, reserve a seat and generate its invitation link to send to the other person.",
|
|
190
188
|
"{time} 前兑换有效,只能用一次。对方兑换后完成签到,你会收到提示,可随时撤销。": "Redeem before {time}, for one member only. Check-in completes on redemption; you will be notified and can revoke access anytime.",
|
|
191
189
|
"另一台电脑{suffix}": "Another computer{suffix}",
|
|
192
190
|
"链接只在生成时显示;请重新生成。未绑定线上网站时,需先在设置中绑定。": "Links are shown only when generated. Generate a new one; if no online site is bound, bind one in Settings first.",
|
|
193
|
-
"{count}
|
|
191
|
+
"{count} 位外部专家待签到": "{count} external expert(s) awaiting check-in",
|
|
194
192
|
"{count} 天内未签到自动结束": "Ends automatically if not checked in within {count} days",
|
|
195
193
|
"移除席位": "Remove seat",
|
|
196
194
|
"席位已移除": "Seat removed",
|
package/package.json
CHANGED
package/web/app.js
CHANGED
|
@@ -124,7 +124,7 @@ const PLATFORM_IDENTITIES = {
|
|
|
124
124
|
// An instance shows its platform's nickname with its own suffix: Antigravity-2 → Gemini-2.
|
|
125
125
|
const EXTERNAL_ICON = 'data:image/svg+xml,' + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#a5a8b3" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="3" width="16" height="12" rx="2"/><path d="M2 19h20"/></svg>');
|
|
126
126
|
const IDENTITIES = by_platform(PLATFORM_IDENTITIES, (identity, name) => external_identity(name)
|
|
127
|
-
? { label: t('
|
|
127
|
+
? { label: t('外部专家'), icon: EXTERNAL_ICON, style: 'external', description: t('外部专家') }
|
|
128
128
|
: ({ ...identity, label: identity.label ? identity.label + name.slice(platform_of(name).length) : name, description: t('AI 实例') }));
|
|
129
129
|
|
|
130
130
|
/** Reserved external names also retain their identity when shown in historical records. */
|
|
@@ -3264,14 +3264,27 @@ function relay_file_url(path, { urgent = false } = {}) {
|
|
|
3264
3264
|
}
|
|
3265
3265
|
|
|
3266
3266
|
/** Read a relayed image or media file once it nears the screen. */
|
|
3267
|
+
// The box around a relayed image is watched, not the image: an image waiting for its file is hidden (display: none,
|
|
3268
|
+
// markdown.css) behind a spinner, and a hidden element never intersects, so watching it left the image unread forever
|
|
3269
|
+
// (2026-11-16, iPhone: a message's own screenshots kept spinning).
|
|
3270
|
+
const relay_media_boxes = new WeakMap();
|
|
3271
|
+
const relay_media_box = (media) => media.closest(".attachment-image, .attachment-media") || media;
|
|
3267
3272
|
const relay_media_observer = typeof IntersectionObserver === "function" ? new IntersectionObserver((entries) => {
|
|
3268
3273
|
for (const entry of entries) {
|
|
3269
3274
|
if (!entry.isIntersecting) continue;
|
|
3270
3275
|
relay_media_observer.unobserve(entry.target);
|
|
3271
|
-
|
|
3276
|
+
for (const media of relay_media_boxes.get(entry.target) || []) load_relay_media(media);
|
|
3277
|
+
relay_media_boxes.delete(entry.target);
|
|
3272
3278
|
}
|
|
3273
3279
|
}, { rootMargin: RELAY_MEDIA_MARGIN }) : null;
|
|
3274
3280
|
|
|
3281
|
+
/** Watch the visible box of one relayed image or media element until it nears the screen. */
|
|
3282
|
+
function watch_relay_media(media) {
|
|
3283
|
+
const box = relay_media_box(media);
|
|
3284
|
+
relay_media_boxes.set(box, [...(relay_media_boxes.get(box) || []), media]);
|
|
3285
|
+
relay_media_observer.observe(box);
|
|
3286
|
+
}
|
|
3287
|
+
|
|
3275
3288
|
/** Give one relayed image or media element its file; one that cannot be read keeps its name. */
|
|
3276
3289
|
function load_relay_media(media) {
|
|
3277
3290
|
if (!media.isConnected || media.getAttribute("src")) return;
|
|
@@ -3286,12 +3299,16 @@ function show_relay_images(records) {
|
|
|
3286
3299
|
// A node taken off the page before it neared the screen is no longer watched.
|
|
3287
3300
|
if (relay_media_observer) for (const node of record.removedNodes) {
|
|
3288
3301
|
if (node.nodeType !== Node.ELEMENT_NODE) continue;
|
|
3289
|
-
for (const image of node.matches("[data-relay-src]") ? [node] : node.querySelectorAll("[data-relay-src]"))
|
|
3302
|
+
for (const image of node.matches("[data-relay-src]") ? [node] : node.querySelectorAll("[data-relay-src]")) {
|
|
3303
|
+
const box = relay_media_box(image);
|
|
3304
|
+
relay_media_observer.unobserve(box);
|
|
3305
|
+
relay_media_boxes.delete(box);
|
|
3306
|
+
}
|
|
3290
3307
|
}
|
|
3291
3308
|
for (const node of record.addedNodes) {
|
|
3292
3309
|
if (node.nodeType !== Node.ELEMENT_NODE || !node.isConnected) continue;
|
|
3293
3310
|
for (const image of node.matches(selector) ? [node] : node.querySelectorAll(selector)) {
|
|
3294
|
-
if (relay_media_observer)
|
|
3311
|
+
if (relay_media_observer) watch_relay_media(image);
|
|
3295
3312
|
else load_relay_media(image);
|
|
3296
3313
|
}
|
|
3297
3314
|
}
|