ai_co_discuss 0.5.13 → 0.5.15

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.
Files changed (43) hide show
  1. package/.agents/skills/discuss-host/references/members.md +1 -0
  2. package/.agents/skills/discuss-participant/SKILL.md +4 -2
  3. package/.agents/skills/discuss-participant/references/interactive-html.md +44 -61
  4. package/.agents/skills/discuss-participant/references/visual-examples.md +196 -0
  5. package/README.md +1 -0
  6. package/README.zh-CN.md +1 -0
  7. package/backend/free_room.py +56 -9
  8. package/backend/schema.sql +46 -0
  9. package/backend/server.py +211 -9
  10. package/backend/visual_fences.py +59 -0
  11. package/docs/deployment.md +2 -20
  12. package/docs/en/deployment.md +2 -20
  13. package/docs/en/guide/faq.md +2 -0
  14. package/docs/en/guide/members.md +1 -1
  15. package/docs/en/guide/rooms.md +1 -1
  16. package/docs/en/guide/scheduling.md +1 -0
  17. package/docs/en/guide/working.md +18 -7
  18. package/docs/guide/faq.md +2 -0
  19. package/docs/guide/members.md +1 -1
  20. package/docs/guide/rooms.md +1 -1
  21. package/docs/guide/scheduling.md +1 -0
  22. package/docs/guide/working.md +18 -7
  23. package/frontend/locales/en/app.json +42 -2
  24. package/frontend/locales/en/backend.json +1 -0
  25. package/frontend/locales/en/core.json +1 -0
  26. package/frontend/locales/en/discussion.json +16 -6
  27. package/frontend/locales/en/room.json +28 -6
  28. package/frontend/locales/en/settings.json +7 -1
  29. package/package.json +1 -1
  30. package/runner/codiscuss.mjs +2 -0
  31. package/runner/discuss.py +3 -2
  32. package/runner/discussion_launch.mjs +31 -5
  33. package/runner/expert_prompts.mjs +1 -1
  34. package/runner/free_runner.mjs +13 -4
  35. package/runner/i18n_en.mjs +23 -2
  36. package/runner/remote_launch.mjs +2 -0
  37. package/runner/site_deploy.mjs +890 -0
  38. package/web/admin.js +1 -1
  39. package/web/app.js +261 -78
  40. package/web/i18n.js +2 -2
  41. package/web/markdown.js +2 -1
  42. package/web/modern.css +1 -1
  43. package/web/modern.js +94 -66
package/backend/server.py CHANGED
@@ -42,12 +42,13 @@ from .free_room import adopt_recommendation, recommend_member, register_member,
42
42
  from .private_chat import chat_action, member_chat
43
43
  from .external_members import external_api, guard_route as guard_external_route, is_external_path, owner_api as external_owner_api
44
44
  from .free_room import describe_members, execution_notes, label_members, check_relay, record_room_link, save_message_relay, set_host_checkin, withdraw_dispatch, member_descriptions, member_display_names, member_handles, member_labels, reorder_speakers, resolve_member_fields, set_chain_rounds, speaking_order, stop_room, stop_room_work
45
- from .free_room import (ADAPTER_VALUE, LAYOUT_AFTER_SQL, LAYOUT_AT_SQL, continue_chain, execution_timeline, group_route_plan, retract_message, rewind_plan, rewind_room,
45
+ from .free_room import (ADAPTER_VALUE, LAYOUT_AFTER_SQL, LAYOUT_AT_SQL, continue_chain, execution_segments, execution_timeline, group_route_plan, retract_message, rewind_plan, rewind_room,
46
46
  host_event, host_hidden_event, room_event_log, withdrawals)
47
47
  from .free_room import review_capability, review_roster, checked_review_plan, save_review_plan, check_review_retry
48
48
  from .free_room import review_ready, advance_review, late_answer, execution_diffs
49
49
  from .free_room import checked_sequence, continue_sequence, sequence_view
50
50
  from . import questions
51
+ from .visual_fences import fold_message_visuals
51
52
  from .identity import MAX_ROOM_AGENTS, PARTICIPANTS, default_label_text, is_ai, is_participant
52
53
  from .message_queue import drain as drain_queue, enqueue, enqueue_share, queue_action, queue_split, queue_view
53
54
  from .room_import import import_room, imported_attachment
@@ -86,6 +87,7 @@ DIRECTORY_OPERATIONS = ("move", "folder")
86
87
  INVITE_COMMANDS = ("room-invite", "room-invites", "room-invite-revoke")
87
88
  INVITED_COMMANDS = ("invited-list", "invited-join", "invited-trust", "invited-ai", "invited-pause", "invited-approve", "invited-refuse",
88
89
  "invited-lend", "invited-leave", "invited-remove", "invited-room")
90
+ SITE_COMMANDS = ("site-stage", "site-publish", "site-list", "site-renew", "site-rollback", "site-revoke")
89
91
  ADMIN_OPERATIONS = ("rename", "archive", "restore", "delete", "auto-destroy")
90
92
  # A room may destroy itself after this many days without a message; 0 keeps it. How often the website checks.
91
93
  AUTO_DESTROY_DAYS = (0, 1, 7, 30)
@@ -989,6 +991,158 @@ def save_share_link(connection, room_id, payload):
989
991
  return share_link_record(connection, room_id)
990
992
 
991
993
 
994
+ SITE_ID_PATTERN = re.compile(r"[a-z2-7]{10}")
995
+ STAGE_ID_PATTERN = re.compile(r"[a-zA-Z0-9_-]{8,64}")
996
+ SITE_STATUSES = ("active", "expired", "taken_down", "revoked")
997
+
998
+
999
+ def _json_list(raw):
1000
+ try:
1001
+ parsed = json.loads(raw or "[]")
1002
+ return parsed if isinstance(parsed, list) else []
1003
+ except ValueError:
1004
+ return []
1005
+
1006
+
1007
+ def _site_public_row(row, now_iso):
1008
+ status = row["status"]
1009
+ if status == "active" and row["expires_at"] and row["expires_at"] <= now_iso:
1010
+ status = "expired"
1011
+ result = {
1012
+ "site_id": row["site_id"], "room_id": row["room_id"], "message_id": row["message_id"],
1013
+ "execution_id": row["execution_id"], "member": row["member"], "title": row["title"],
1014
+ "url": row["url"], "directory": row["directory"],
1015
+ "current_version": row["current_version"], "previous_version": row["previous_version"],
1016
+ "file_count": row["file_count"], "bytes": row["bytes"], "status": status,
1017
+ "versions": _json_list(row["versions_json"]), "files": _json_list(row["files_json"]),
1018
+ "expires_at": row["expires_at"], "created_at": row["created_at"], "updated_at": row["updated_at"],
1019
+ }
1020
+ if "room_title" in row.keys():
1021
+ result["room_title"] = row["room_title"]
1022
+ return result
1023
+
1024
+
1025
+ def _stage_public_row(row):
1026
+ return {
1027
+ "stage_id": row["id"], "room_id": row["room_id"], "execution_id": row["execution_id"],
1028
+ "message_id": row["message_id"], "member": row["member"], "title": row["title"],
1029
+ "directory": row["directory"], "kind": row["kind"], "file_count": row["file_count"],
1030
+ "bytes": row["bytes"], "ready": bool(row["ready"]), "site_id": row["site_id"] or None,
1031
+ "files": _json_list(row["files_json"]), "spots": _json_list(row["spots_json"]),
1032
+ "rejected_files": _json_list(row["rejected_json"]),
1033
+ "created_at": row["created_at"], "updated_at": row["updated_at"],
1034
+ }
1035
+
1036
+
1037
+ def list_room_sites(connection, room_id):
1038
+ """Public metadata of deployed websites and staged directories in one room (never exposes device_token)."""
1039
+ require_room(connection, room_id)
1040
+ now_iso = utc_iso_now()
1041
+ sites = [_site_public_row(row, now_iso) for row in connection.execute(
1042
+ "SELECT * FROM room_sites WHERE room_id=? ORDER BY updated_at DESC", (room_id,))]
1043
+ stages = [_stage_public_row(row) for row in connection.execute(
1044
+ "SELECT * FROM room_site_stages WHERE room_id=? ORDER BY updated_at DESC LIMIT 50", (room_id,))]
1045
+ return {"room_id": room_id, "sites": sites, "stages": stages}
1046
+
1047
+
1048
+ def list_all_sites(connection):
1049
+ """Public metadata of deployed websites across all rooms for the left sidebar published list."""
1050
+ now_iso = utc_iso_now()
1051
+ rows = connection.execute(
1052
+ """SELECT s.*, r.title AS room_title FROM room_sites s JOIN rooms r ON r.id=s.room_id
1053
+ ORDER BY s.updated_at DESC LIMIT 200""")
1054
+ return {"sites": [_site_public_row(row, now_iso) for row in rows]}
1055
+
1056
+
1057
+ def save_room_site(connection, room_id, payload):
1058
+ """Persist public website or stage metadata written by local runner commands; never accepts device_token."""
1059
+ require_room(connection, room_id)
1060
+ if not isinstance(payload, dict) or "device_token" in payload:
1061
+ raise ValueError("Invalid site payload")
1062
+ action = payload.get("action")
1063
+ now_iso = utc_iso_now()
1064
+ if action == "stage":
1065
+ stage_id = str(payload.get("stage_id") or "")
1066
+ if not STAGE_ID_PATTERN.fullmatch(stage_id):
1067
+ raise ValueError("Invalid stage_id")
1068
+ kind = payload.get("kind") or "directory"
1069
+ if kind not in ("directory", "file"):
1070
+ raise ValueError("Invalid stage kind")
1071
+ connection.execute(
1072
+ """INSERT INTO room_site_stages
1073
+ (id,room_id,execution_id,message_id,member,title,directory,kind,file_count,bytes,files_json,spots_json,rejected_json,ready,site_id,created_at,updated_at)
1074
+ VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
1075
+ ON CONFLICT(id) DO UPDATE SET
1076
+ execution_id=excluded.execution_id,message_id=excluded.message_id,member=excluded.member,
1077
+ title=excluded.title,directory=excluded.directory,kind=excluded.kind,file_count=excluded.file_count,
1078
+ bytes=excluded.bytes,files_json=excluded.files_json,spots_json=excluded.spots_json,
1079
+ rejected_json=excluded.rejected_json,ready=excluded.ready,site_id=excluded.site_id,updated_at=excluded.updated_at""",
1080
+ (stage_id, room_id, payload.get("execution_id"), payload.get("message_id"),
1081
+ str(payload.get("member") or "")[:120], str(payload.get("title") or "")[:200],
1082
+ str(payload.get("directory") or "")[:300], kind, int(payload.get("file_count") or 0),
1083
+ int(payload.get("bytes") or 0), json.dumps(payload.get("files") or [], ensure_ascii=False),
1084
+ json.dumps(payload.get("spots") or [], ensure_ascii=False),
1085
+ json.dumps(payload.get("rejected_files") or [], ensure_ascii=False),
1086
+ 1 if payload.get("ready", True) else 0, str(payload.get("site_id") or "")[:32], now_iso, now_iso))
1087
+ row = connection.execute("SELECT * FROM room_site_stages WHERE id=?", (stage_id,)).fetchone()
1088
+ return {"stage": _stage_public_row(row)}
1089
+ if action == "upsert":
1090
+ site_id = str(payload.get("site_id") or "")
1091
+ url = str(payload.get("url") or "")
1092
+ status = str(payload.get("status") or "active")
1093
+ if not SITE_ID_PATTERN.fullmatch(site_id) or not url.startswith("https://") or len(url) > 300 or status not in SITE_STATUSES:
1094
+ raise ValueError("Invalid site metadata")
1095
+ connection.execute(
1096
+ """INSERT INTO room_sites
1097
+ (site_id,room_id,message_id,execution_id,member,title,url,directory,current_version,previous_version,file_count,bytes,status,versions_json,files_json,expires_at,created_at,updated_at)
1098
+ VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
1099
+ ON CONFLICT(site_id) DO UPDATE SET
1100
+ message_id=COALESCE(excluded.message_id, room_sites.message_id),
1101
+ execution_id=COALESCE(excluded.execution_id, room_sites.execution_id),
1102
+ member=CASE WHEN excluded.member<>'' THEN excluded.member ELSE room_sites.member END,
1103
+ title=CASE WHEN excluded.title<>'' THEN excluded.title ELSE room_sites.title END,
1104
+ url=excluded.url,
1105
+ directory=CASE WHEN excluded.directory<>'' THEN excluded.directory ELSE room_sites.directory END,
1106
+ current_version=excluded.current_version,previous_version=excluded.previous_version,
1107
+ file_count=excluded.file_count,bytes=excluded.bytes,status=excluded.status,
1108
+ versions_json=excluded.versions_json,files_json=excluded.files_json,
1109
+ expires_at=excluded.expires_at,updated_at=excluded.updated_at""",
1110
+ (site_id, room_id, payload.get("message_id"), payload.get("execution_id"),
1111
+ str(payload.get("member") or "")[:120], str(payload.get("title") or "")[:200],
1112
+ url, str(payload.get("directory") or "")[:300], int(payload.get("current_version") or 1),
1113
+ int(payload.get("previous_version") or 0), int(payload.get("file_count") or 0),
1114
+ int(payload.get("bytes") or 0), status, json.dumps(payload.get("versions") or [], ensure_ascii=False),
1115
+ json.dumps(payload.get("files") or [], ensure_ascii=False), str(payload.get("expires_at") or ""),
1116
+ str(payload.get("created_at") or now_iso), now_iso))
1117
+ if payload.get("stage_id"):
1118
+ connection.execute("UPDATE room_site_stages SET site_id=?, updated_at=? WHERE id=? AND room_id=?",
1119
+ (site_id, now_iso, str(payload["stage_id"]), room_id))
1120
+ row = connection.execute("SELECT * FROM room_sites WHERE site_id=?", (site_id,)).fetchone()
1121
+ return {"site": _site_public_row(row, now_iso)}
1122
+ if action == "update_status":
1123
+ site_id = str(payload.get("site_id") or "")
1124
+ status = str(payload.get("status") or "")
1125
+ if not SITE_ID_PATTERN.fullmatch(site_id) or status not in SITE_STATUSES:
1126
+ raise ValueError("Invalid site status")
1127
+ updates = ["status=?", "updated_at=?"]
1128
+ values = [status, now_iso]
1129
+ for col, key in (("expires_at", "expires_at"), ("current_version", "current_version"),
1130
+ ("previous_version", "previous_version"), ("file_count", "file_count"), ("bytes", "bytes")):
1131
+ if key in payload and payload[key] is not None:
1132
+ updates.append(f"{col}=?")
1133
+ values.append(payload[key])
1134
+ if "versions" in payload and isinstance(payload["versions"], list):
1135
+ updates.append("versions_json=?")
1136
+ values.append(json.dumps(payload["versions"], ensure_ascii=False))
1137
+ values.extend([site_id, room_id])
1138
+ connection.execute(f"UPDATE room_sites SET {', '.join(updates)} WHERE site_id=? AND room_id=?", values)
1139
+ row = connection.execute("SELECT * FROM room_sites WHERE site_id=? AND room_id=?", (site_id, room_id)).fetchone()
1140
+ if not row:
1141
+ raise LookupError("Site record not found")
1142
+ return {"site": _site_public_row(row, now_iso)}
1143
+ raise ValueError("Unknown site write action")
1144
+
1145
+
992
1146
  def last_room(connection):
993
1147
  """The room last opened by the site's manager on any device, or '' when none or it no longer exists."""
994
1148
  row = connection.execute("""SELECT p.value FROM site_preferences p JOIN rooms r ON r.id=p.value
@@ -2365,6 +2519,33 @@ def message_filters(room_id, params):
2365
2519
  return " AND ".join(clauses), values
2366
2520
 
2367
2521
 
2522
+ def latest_messages(connection, room_id, params, where, values, size, bounded=False):
2523
+ """Read the room's transcript from the newest end: the `size` messages before `before` (0: the latest), oldest first.
2524
+
2525
+ The page shows the latest messages first and reads the earlier ones after (#8131), so a long room opens without
2526
+ waiting for its whole history. `has_earlier` says whether older messages remain; with `cards=1` the batch also takes
2527
+ the cards placed after its messages, over a span that meets the next older batch's, so batches read back to the
2528
+ start cover every card once: (the message before this batch, this batch's last] and, for the latest, to the end. A reader held to a reading boundary (`bounded`) gets no cards.
2529
+ """
2530
+ before = int(params["before"])
2531
+ if before < 0 or "after" in params or int(params.get("page", 1)) != 1:
2532
+ raise ValueError(Text('before 需为非负消息编号,不能与 after 或翻页同时使用'))
2533
+ if before:
2534
+ where += " AND messages.id<?"
2535
+ values = [*values, before]
2536
+ rows = connection.execute(f"{MESSAGE_QUERY} WHERE {where} ORDER BY messages.id DESC LIMIT ?", [*values, size + 1]).fetchall()
2537
+ has_earlier = len(rows) > size
2538
+ shown = member_display_names(connection, room_id)
2539
+ messages = [{**message, "author_label": shown.get(message["author"], message["author"])}
2540
+ for message in (message_with_attachments(connection, row) for row in reversed(rows[:size]))]
2541
+ result = {"messages": messages, "has_earlier": has_earlier}
2542
+ unfiltered = not any(params.get(name) for name in ("q", "author", "mention", "kind", "host", "submission_id"))
2543
+ if params.get("cards") == "1" and not bounded and unfiltered and params.get("withdrawn") == INCLUDE_WITHDRAWN and messages:
2544
+ low = rows[size]["id"] if has_earlier else 0
2545
+ result["cards"] = history_cards(connection, room_id, (low, messages[-1]["id"] if before else None))
2546
+ return result
2547
+
2548
+
2368
2549
  def query_messages(connection, room_id, params, token=""):
2369
2550
  """Read one bounded page; incremental cursors advance only through returned rows."""
2370
2551
  require_room(connection, room_id)
@@ -2378,11 +2559,15 @@ def query_messages(connection, room_id, params, token=""):
2378
2559
  if cutoff is not None:
2379
2560
  where += " AND messages.id<=?"
2380
2561
  values.append(cutoff)
2562
+ if "before" in params:
2563
+ return latest_messages(connection, room_id, params, where, values, size, bounded=cutoff is not None)
2381
2564
  total = connection.execute(f"SELECT COUNT(*) FROM ({MESSAGE_QUERY} WHERE {where})", values).fetchone()[0]
2382
2565
  rows = connection.execute(f"{MESSAGE_QUERY} WHERE {where} ORDER BY messages.id LIMIT ? OFFSET ?", [*values, size + 1, (page - 1) * size]).fetchall()
2383
2566
  shown = member_display_names(connection, room_id)
2384
2567
  messages = [{**message, "author_label": shown.get(message["author"], message["author"])}
2385
2568
  for message in (message_with_attachments(connection, row) for row in rows[:size])]
2569
+ if params.get("fold_visuals") in ("1", "en"):
2570
+ messages = [fold_message_visuals(message, params["fold_visuals"] == "en") for message in messages]
2386
2571
  has_more = len(rows) > size
2387
2572
  budget_stopped = False
2388
2573
  if params.get("max_chars") not in (None, ""):
@@ -3165,7 +3350,7 @@ class DiscussionHandler(BaseHTTPRequestHandler):
3165
3350
  site = self.local_request_site(method)
3166
3351
  route = parts[2:]
3167
3352
  if method == "OPTIONS" and route in (["settings"], ["launch"], ["wipe-histories"], ["room-models"], ["room-skills"], ["room-files"], ["room-page"], ["room-media"], ["execution-details"], ["room-member"], ["room-member-access"], ["room-member-allow"], ["room-member-adapter"], ["room-member-model"], ["room-profiles"], ["room-restore"], ["room-fork"], ["models"], ["sessions"], ["api-key"], ["api-check"],
3168
- ["scheduler-check"], ["image-check"], ["image-settings"], ["tts-settings"], ["tts"], ["tts-release"], ["local-speech"], ["stt"], ["weixin"], ["pick-directory"], ["browse-directory"], ["projects"], ["presets"], ["workflows"], ["room-workflow"], ["room-settings"], ["machine-link"], ["device-pairing"], ["devices"]) or (method == "OPTIONS" and len(route) == 1 and route[0] in INVITE_COMMANDS + INVITED_COMMANDS):
3353
+ ["scheduler-check"], ["image-check"], ["image-settings"], ["tts-settings"], ["tts"], ["tts-release"], ["local-speech"], ["stt"], ["weixin"], ["pick-directory"], ["browse-directory"], ["projects"], ["presets"], ["workflows"], ["room-workflow"], ["room-settings"], ["machine-link"], ["device-pairing"], ["devices"]) or (method == "OPTIONS" and len(route) == 1 and route[0] in INVITE_COMMANDS + INVITED_COMMANDS + SITE_COMMANDS):
3169
3354
  return self.respond({"ok": True})
3170
3355
  if route == ["settings"] and method in ("GET", "POST"):
3171
3356
  command = "settings"
@@ -3210,9 +3395,9 @@ class DiscussionHandler(BaseHTTPRequestHandler):
3210
3395
  command = route[0]
3211
3396
  elif route == ["machine-link"] and method == "POST":
3212
3397
  command = "machine-link"
3213
- elif len(route) == 1 and route[0] in INVITE_COMMANDS + INVITED_COMMANDS and method == "POST":
3214
- # Invites for members on other computers (runner/external_gateway.mjs) and the rooms this computer was invited to
3215
- # (runner/external_client.mjs); the latter are this computer's own records and need no room credential.
3398
+ elif len(route) == 1 and route[0] in INVITE_COMMANDS + INVITED_COMMANDS + SITE_COMMANDS and method == "POST":
3399
+ # Invites for members on other computers (runner/external_gateway.mjs), invited rooms (runner/external_client.mjs),
3400
+ # and website publishing commands (runner/site_deploy.mjs).
3216
3401
  command = route[0]
3217
3402
  else:
3218
3403
  raise LookupError(Text('本机入口不存在'))
@@ -3221,10 +3406,10 @@ class DiscussionHandler(BaseHTTPRequestHandler):
3221
3406
  if self.headers.get_content_type() != "application/json":
3222
3407
  raise ValueError(Text('本机操作须使用 application/json'))
3223
3408
  payload = self.read_payload(MAX_FILE_PART_BODY_BYTES if command == "room-files" else MAX_BODY_BYTES)
3224
- if command in ("start", "room-config", "room-models", "room-skills", "room-files", "room-page", "room-media", "execution-details", "room-member", "room-member-access", "room-member-allow", "room-member-adapter", "room-member-model", "room-profiles", "room-restore", "room-fork", "room-workflow", "room-settings", "workflows"):
3409
+ if command in ("start", "room-config", "room-models", "room-skills", "room-files", "room-page", "room-media", "execution-details", "room-member", "room-member-access", "room-member-allow", "room-member-adapter", "room-member-model", "room-profiles", "room-restore", "room-fork", "room-workflow", "room-settings", "workflows") + SITE_COMMANDS:
3225
3410
  payload.pop("access_file", None)
3226
3411
  payload.update(site=site, entry="web")
3227
- if command in ("room-skills", "room-files", "room-page", "room-media", "execution-details", "room-workflow", "room-settings", "room-member", "room-member-access", "room-member-allow", "room-member-model", "room-member-adapter") and not payload.get("token") and not self.bridge_origin:
3412
+ if command in ("room-skills", "room-files", "room-page", "room-media", "execution-details", "room-workflow", "room-settings", "room-member", "room-member-access", "room-member-allow", "room-member-model", "room-member-adapter") + SITE_COMMANDS and payload.get("room_id") and not payload.get("token") and not self.bridge_origin:
3228
3413
  with closing(connect_db(self.server.database)) as connection:
3229
3414
  self.admin_as_owner(connection, payload.get("room_id", ""))
3230
3415
  payload["token"] = self.headers.get("X-Discussion-Token", "")
@@ -3329,7 +3514,10 @@ class DiscussionHandler(BaseHTTPRequestHandler):
3329
3514
  failure = json.loads(result.stderr.strip())
3330
3515
  except ValueError:
3331
3516
  raise ValueError(result.stderr.strip())
3332
- return 400, failure
3517
+ status_code = failure.pop("http_status", 400) if isinstance(failure, dict) else 400
3518
+ if not isinstance(status_code, int) or not 400 <= status_code <= 599:
3519
+ status_code = 400
3520
+ return status_code, failure
3333
3521
  return 200, json.loads(result.stdout)
3334
3522
 
3335
3523
  def admin_token(self):
@@ -3513,6 +3701,8 @@ class DiscussionHandler(BaseHTTPRequestHandler):
3513
3701
  return self.handle_remote_launch_api(connection, parts, method)
3514
3702
  if parts == ["api", "revisions"] and method == "GET":
3515
3703
  return self.respond(room_revisions(connection, params))
3704
+ if parts == ["api", "sites"] and method == "GET":
3705
+ return self.respond(list_all_sites(connection))
3516
3706
  if parts == ["api", "rooms"]:
3517
3707
  if method == "GET":
3518
3708
  return self.respond({**list_rooms(connection, params), "participants": PARTICIPANTS, "last_room": last_room(connection),
@@ -3630,8 +3820,10 @@ class DiscussionHandler(BaseHTTPRequestHandler):
3630
3820
  result = continue_chain(connection, room_id, token, int(parts[4]), self.read_payload())
3631
3821
  connection.commit()
3632
3822
  return self.respond(result)
3823
+ if parts[3:] == ["timeline", "segments"] and method == "GET":
3824
+ return self.respond(execution_segments(connection, room_id, str(params.get("ids", "")).split(",")))
3633
3825
  if parts[3:] == ["timeline"] and method == "GET":
3634
- timeline = execution_timeline(connection, room_id, int(params.get("after", 0)))
3826
+ timeline = execution_timeline(connection, room_id, int(params.get("after", 0)), int(params.get("before", 0)), params.get("segments") != "0")
3635
3827
  boundary = session_read_boundary(connection, room_id, token)
3636
3828
  if boundary is not None:
3637
3829
  for execution in timeline["executions"]:
@@ -3727,6 +3919,16 @@ class DiscussionHandler(BaseHTTPRequestHandler):
3727
3919
  result = save_share_link(connection, room_id, self.read_payload())
3728
3920
  connection.commit()
3729
3921
  return self.respond(result)
3922
+ if parts[3:] == ["sites"] and method in ("GET", "POST"):
3923
+ if method == "GET":
3924
+ return self.respond(list_room_sites(connection, room_id))
3925
+ if token:
3926
+ require_owner(connection, room_id, token)
3927
+ else:
3928
+ self.require_entry_owner(connection, room_id, token)
3929
+ result = save_room_site(connection, room_id, self.read_payload())
3930
+ connection.commit()
3931
+ return self.respond(result)
3730
3932
  free_actor = None
3731
3933
  if method == "POST" and len(parts) == 4 and (parts[3] in DIRECTORY_OPERATIONS
3732
3934
  or parts[3] in ADMIN_OPERATIONS and self.admin_session(connection)):
@@ -0,0 +1,59 @@
1
+ """Text-only folding for the CLI and its server-side page budget."""
2
+
3
+ import re
4
+
5
+
6
+ QUOTE = re.compile(r"^(?: {0,3}>[ \t]?)+")
7
+ LIST = re.compile(r"^ {0,3}(?:[-+*]|[0-9]{1,9}[.)])[ \t]{1,4}")
8
+ FENCE = re.compile(r"^ {0,3}(`{3,}|~{3,})([^\n]*)$")
9
+
10
+
11
+ def fold_visual_fences(text, english=False):
12
+ """Replace visual fences with their code-point count, leaving other fenced code alone."""
13
+ if "visual" not in text:
14
+ return text
15
+ lines = text.replace("\r\n", "\n").replace("\r", "\n").split("\n")
16
+ output, fence, indent, previous_depth = [], None, 0, 0
17
+ for index, line in enumerate(lines):
18
+ quote = QUOTE.match(line)
19
+ prefix = quote[0] if quote else ""
20
+ depth = prefix.count(">")
21
+ rest = line[len(prefix):]
22
+ if depth != previous_depth:
23
+ indent = 0
24
+ previous_depth = depth
25
+ if fence and (depth != fence[2] or (rest.strip() and not rest.startswith(" " * fence[3]))):
26
+ finish_fence(output, lines, fence, index, english)
27
+ fence = None
28
+ if fence:
29
+ close = FENCE.match(rest[fence[3]:])
30
+ if close and close[1][0] == fence[0][0] and len(close[1]) >= len(fence[0]) and not close[2].strip():
31
+ finish_fence(output, lines, fence, index, english, closed=True)
32
+ fence = None
33
+ continue
34
+ item = LIST.match(rest)
35
+ indent = len(item[0]) if item else indent if not rest.strip() or rest.startswith(" " * indent) else 0
36
+ opening = FENCE.match(rest[indent:])
37
+ if opening and (opening[1][0] != "`" or "`" not in opening[2]):
38
+ fence = (opening[1], opening[2].strip() == "visual", depth, indent, index, prefix + (item[0] if item else " " * indent))
39
+ else:
40
+ output.append(line)
41
+ if fence:
42
+ finish_fence(output, lines, fence, len(lines), english)
43
+ return "\n".join(output)
44
+
45
+
46
+ def finish_fence(output, lines, fence, end, english, *, closed=False):
47
+ """Write the original ordinary fence, or one line in place of a visual fence."""
48
+ _marker, visual, _depth, _indent, start, prefix = fence
49
+ if not visual:
50
+ output.extend(lines[start:end + closed])
51
+ return
52
+ count = len("\n".join(lines[start + 1:end]))
53
+ label = f"[Interactive visualization · {count} characters]" if english else f"[交互式可视化 · {count} 字符]"
54
+ output.append(prefix + label)
55
+
56
+
57
+ def fold_message_visuals(message, english=False):
58
+ """Return only the list projection with visual sources folded."""
59
+ return {**message, **{key: fold_visual_fences(message[key], english) for key in ("text", "summary") if isinstance(message.get(key), str)}}
@@ -188,24 +188,6 @@ npx wrangler deploy --config deploy/entry.wrangler.jsonc
188
188
  - **`no such table`**:所连接的数据库尚未执行 schema,先核对配置文件指向的数据库。
189
189
  - **端口被占用**:服务拒绝两个实例监听同一端口,改用其他端口。
190
190
 
191
- ## 官方房间分享站(运营方)
191
+ ## 官方分享站与网站托管(运营方)
192
192
 
193
- 在线分享由独立的 Worker、D1 和自定义域名提供。访客无需安装,发布者无需自行部署。以下命令从源码仓库根目录运行,需要运营方的 Cloudflare 账号和该账号已接管的域名。
194
-
195
- 1. 运行 `npm ci`、`npm run build` 和 `npx wrangler login`。把 `deploy/share.wrangler.jsonc` 复制为同目录的 `deploy/wrangler.local.jsonc`,保留原有绑定与 Cron 配置;若该私有文件已用于其他服务,请为分享站另选私有路径并调整下列命令。
196
- 2. 创建独立数据库,将返回的 ID 写入私有配置的 `d1_databases[0].database_id`。在该配置顶层添加 `"routes": [{ "pattern": "<分享站完整主机名>", "custom_domain": true }]`,并将 `web/app.js` 的 `SHARE_SITE` 指向同一 HTTPS 域名。使用与配对和登录站点隔离的主机名。
197
-
198
- ```sh
199
- npx wrangler d1 create codiscuss-share --config deploy/wrangler.local.jsonc
200
- npx wrangler d1 execute DB --remote --file backend/share_schema.sql --config deploy/wrangler.local.jsonc
201
- ```
202
-
203
- 3. 用下列交互命令分别录入两段独立生成的随机 secret。`ADMIN_TOKEN` 只给运营方审核工具,`SOURCE_SALT` 用于给来源 IP 做 HMAC,保持稳定。确认域名和数据库后部署。Cron 每小时删除到期分享,访客访问在到期时即返回 410。
204
-
205
- ```sh
206
- npx wrangler secret put ADMIN_TOKEN --config deploy/wrangler.local.jsonc
207
- npx wrangler secret put SOURCE_SALT --config deploy/wrangler.local.jsonc
208
- npx wrangler deploy --config deploy/wrangler.local.jsonc
209
- ```
210
-
211
- 程序按原始快照字节限制单份 5 MiB、每个来源 20 份及 50 MiB、全站 5 GB。勾选“包含附件”发布时,附件作为文件存进 R2 存储桶(绑定名 `FILES`):单份合计 100 MiB,每个来源的有效分享合计 500 MB,全站 8 GB(R2 免费额度 10 GB);撤销、更新或到期时一并删除。部署前先开通 R2 并执行 `npx wrangler r2 bucket create codiscuss-share-files --config deploy/wrangler.local.jsonc`,私有配置里保留 `r2_buckets` 绑定。免费 D1 的单库物理上限是 500 MB,账号合计 5 GB;压缩后的数据、索引和其他记录都占用单库空间。部署使用一个库,先达到的平台限额会先影响写入。分享页面每次检查状态,撤销或下架后停止提供内容;已由读者保存的副本无法收回。[Cloudflare D1 限额](https://developers.cloudflare.com/d1/platform/limits/)
193
+ 在线分享链接(`share.codiscuss.com`)与“部署为网站”(`*.bimcanvas.com`)由运营方的官方服务提供,访客与发布者都无需部署。这两项服务的代码与部署说明不在本仓库。
@@ -186,24 +186,6 @@ To connect a hosted computer: in the admin panel of your computer (the one that
186
186
  - **`no such table`** — the connected database has no schema yet; check which database your configuration points to.
187
187
  - **Port already in use** — the service refuses to share a port; choose another one.
188
188
 
189
- ## Official room sharing site (operators)
189
+ ## Official share site and website hosting (operators)
190
190
 
191
- The online sharing service uses a dedicated Worker, D1 database and custom domain. Visitors can read links without installing the app, and publishers use the operator's service. Run the following from the repository root with a Cloudflare account that manages the chosen domain.
192
-
193
- 1. Run `npm ci`, `npm run build` and `npx wrangler login`. Copy `deploy/share.wrangler.jsonc` to `deploy/wrangler.local.jsonc`, retaining its bindings and Cron configuration. If that private file is already used by another service, choose a separate private path and adjust the commands below.
194
- 2. Create the dedicated database and enter the returned ID in `d1_databases[0].database_id` in the private configuration. Add `"routes": [{ "pattern": "<full-share-hostname>", "custom_domain": true }]` at the top level, and set `SHARE_SITE` in `web/app.js` to that HTTPS origin. Use a hostname separate from the pairing and sign-in sites.
195
-
196
- ```sh
197
- npx wrangler d1 create codiscuss-share --config deploy/wrangler.local.jsonc
198
- npx wrangler d1 execute DB --remote --file backend/share_schema.sql --config deploy/wrangler.local.jsonc
199
- ```
200
-
201
- 3. Enter two independently generated random secrets at the prompts below. Give `ADMIN_TOKEN` only to the operator's moderation tool. Keep `SOURCE_SALT` stable for source IP hashing. Verify the domain and database before deploying. An hourly Cron removes expired shares. Views return 410 as soon as a link expires.
202
-
203
- ```sh
204
- npx wrangler secret put ADMIN_TOKEN --config deploy/wrangler.local.jsonc
205
- npx wrangler secret put SOURCE_SALT --config deploy/wrangler.local.jsonc
206
- npx wrangler deploy --config deploy/wrangler.local.jsonc
207
- ```
208
-
209
- The service limits raw snapshot data to 5 MiB per share, 20 shares and 50 MiB per source, and 5 GB across the site. Shares published with “Include attachments” keep their attachments as files in an R2 bucket (binding `FILES`): at most 100 MiB per share, 500 MB across one source’s live shares and 8 GB across the site (R2’s free tier is 10 GB); they are deleted with the share when it is revoked, updated or expires. Before deploying, enable R2 and run `npx wrangler r2 bucket create codiscuss-share-files --config deploy/wrangler.local.jsonc`, keeping the `r2_buckets` binding in the private config. Free D1 allows 500 MB of physical storage per database and 5 GB across the account. Compressed data, indexes and other records occupy space in the single configured database. Platform limits can therefore stop writes earlier. Every page request checks visibility. Revocation or moderation stops subsequent views, while copies already saved by readers remain available to them. [Cloudflare D1 limits](https://developers.cloudflare.com/d1/platform/limits/)
191
+ Online share links (`share.codiscuss.com`) and “Deploy as website” (`*.bimcanvas.com`) are provided by the operator's official services; neither visitors nor publishers deploy anything. The code and deployment notes for these services are not in this repository.
@@ -62,6 +62,8 @@ Shutdown and sleep interrupt local execution. During an internet outage, the loc
62
62
 
63
63
  ## Settings index
64
64
 
65
+ To see what changed in this version, click the version number after "AI CoDiscuss" at the top left to open "Changelog". It shows the current version; click "Show earlier versions" for older ones.
66
+
65
67
  | Section | Controls | Where to learn more |
66
68
  | --- | --- | --- |
67
69
  | Account | Set up admin account, Sign in, Sign out | [Python deployment](../deployment.md#python) |
@@ -29,7 +29,7 @@ Use “History” to bring context from an existing local AI conversation into a
29
29
 
30
30
  ## Change a model, name, or private prompt
31
31
 
32
- - **Model and reasoning effort.** Set these on the back of a member card when creating a room or inviting a member. In an existing room, open **Room → Members and settings** in the tabs at the top of the room and find the member. Change the model or effort, or refresh the model list. Changes take effect on the next run. For app connections, choose the model and effort in the app itself. Where supported, you can switch between CLI and app connections here. A manually connected member that is now woken by this computer shows “Existing session” next to its connection. It keeps its original session’s project access, but you can still change its model and effort here.
32
+ - **Model and reasoning effort.** Set these on the back of a member card when creating a room or inviting a member. In an existing room, open **Room → Members and settings** in the tabs at the top of the room and find the member. Change the model or effort, or refresh the model list. Changes take effect on the next run. For app connections, choose the model and effort in the app itself. Where supported, you can switch between CLI and app connections here. A manually connected member that is now woken by this computer shows “Existing session” next to its connection. It keeps its original session’s project access, but you can still change its model and effort here. While its own window is open, tasks go straight into that window and run with the window’s model; this setting applies once the window is closed. Until a change has been used, the model field shows the model that last ran followed by “(set to …, applies from the next run)” or “(set to …, applies once its own window is closed)”.
33
33
  - **Display name and role description.** Open the member menu in the right sidebar and select “Name and description”. When adding a member, use the name and description button on the card. On cards that flip, these settings are on the back. Change the room display name and role description. Inside a room there are quicker ways: double-click a member’s name in the right sidebar or on the members and settings page to rename it in place (Enter or clicking elsewhere saves, Esc cancels). Member rows in the right sidebar do not show descriptions: point at a member with the mouse and its member card floats out on the left with the description and an “Edit name and description” button. In the editor, click a common kind of work to add it. The host and smart scheduling use the description to route work. You can also save it as the app’s default description.
34
34
  - **Private prompt.** Flip the member card and select “Expert prompt” on its back. Write instructions for this member alone, such as “Start with the conclusion”. This does not change its permissions. Restore the app’s default prompt at any time.
35
35
 
@@ -47,7 +47,7 @@ You can also send a message from the blank home page to create a room and send i
47
47
 
48
48
  - **Attach files.** Paste or drag files into the composer, or use the paperclip button at the bottom-left. Each message can contain up to 10 files, 20 MiB each. Thumbnails appear above the composer. A placeholder such as `[Image #1]` or `[File #2]` is inserted at the cursor. Removing the thumbnail or deleting its placeholder with Backspace removes both.
49
49
  - **View attachments.** After sending a message, select its placeholder or attachment card. Images can be enlarged full-screen, zoomed, rotated, and saved. Audio and video play in the message. Documents and code open in the file preview.
50
- - **Use HTML in an answer.** A self-contained `.html` attachment that a member references with a file placeholder appears at that point in the answer and follows the room theme. It runs when you scroll to it. “Collapse” saves your choice. The row below also lets you open a larger preview, view the source, or download the file. The larger preview, mobile full-screen preview, and “Open in new tab” also use the room theme. Unreferenced HTML attachments still have an “Expand in message” button. For files over 2 MiB or files that fail to load, use the file preview. On a phone, referenced demos also appear in place; select the card of an unreferenced attachment for a full-screen preview.
50
+ - **Interactive visualizations.** A member can place a small web page you can operate (drag a slider, press a button, watch the result change) inside the answer text. It appears at that point in the answer, follows the room theme and light or dark mode, and also appears in place on a phone. It starts running when you scroll near it. The row below lets you “Collapse” it (your choice is remembered), view the “Source”, “Open larger preview” in the file preview, open it in a “New tab”, or “Download” it as an `.html` file. Read-only share pages, read-aloud, and collapsed message previews show a single “Interactive visualization” line instead, so rely on the member's written conclusion. `.html` attachments do not run inside messages; select the file card to open them in the preview or a new tab. Some visualizations are question panels: after you rank, allocate, or adjust and press the panel's submit button, the result is added above the message box as a quote rather than sent. You can edit or remove it, and it counts as your reply only when you send it. Submitting the same panel again replaces its earlier result.
51
51
  - **Member access to attachments.** For supported automatic runs, the local service downloads the file and passes its information to the receiving member. Claude Code and Codex CLI can view images directly. For API members, enable “Images” on the member card to view images. UTF-8 text attachments can be read on request. Members will say when they cannot read a format such as PDF.
52
52
 
53
53
  ### 5. Export, import, and branch rooms
@@ -14,6 +14,7 @@ Connect a lightweight decision model to handle routine assignment and turn hando
14
14
  - Write long answers, judge whether code or a proposal is correct, change member order, or choose a different reviewer.
15
15
  - Reroute @all or @all in turn. Those always use their specified parallel or ordered behavior.
16
16
  - Make a low-confidence decision or proceed after oversized input or an API error. These cases go back to the host.
17
+ While a message without a mention awaits a decision, the transcript shows that smart scheduling is analyzing it. If the model call fails, the message shows “No model judgment” and the reason, and the host takes over.
17
18
 
18
19
  ## Providers, API keys, and pricing
19
20
 
@@ -10,6 +10,7 @@ Message a member or host, understand main and branch work and assignment labels,
10
10
  - **Use a member’s local skills.** After selecting `@member`, type `/` to find skills installed in that member’s local AI app. Click a result or press `Enter` or `Tab` to insert it into the draft. Typing `/` on its own lists modes, workflows, and platform skills.
11
11
  - **Send without a mention.** The host routes messages without an `@` mention. If the room has only one member, the message goes directly to it. With smart scheduling enabled, a message clearly addressed to one member may go directly to that member.
12
12
  - **Ask all members.** Type `@all` to have everyone present answer in parallel. If the room has a host, it first answers on its own like everyone else, then, once all answers are in, sums up where they agree and differ and arranges follow-up work if needed. Type `@all-seq` to have members answer in the order shown in the sidebar’s “Speaking order”.
13
+ - **Check the hint before sending.** The line under the composer says what sending will do, given who is busy right now: when the mentioned member is free it reads “Goes to … now, alongside the work in progress (a branch)”; when it is busy it says the message waits in the queue; with nobody mentioned while the room is busy, it suggests mentioning a free member to have it start right away.
13
14
  - **Reply, search, and filter.** Use “Reply” in a message menu to link a reply to the original. Use “View original” to read its full text and summary. At the top of the room, “Search messages” searches the conversation and “Filter messages and cards” filters by author, host, mentions, or card type.
14
15
 
15
16
  - **Send several messages in a row.** You can send the next message while the previous one still shows “Sending…”. If the room is busy and a message is expected to queue, it appears immediately above the composer. The confirmed queue entry takes its place. The browser submits messages in order and continues if one fails. The failed card keeps the original text and attachments so you can resend or discard it. Sending and network retries continue if you switch rooms. Return to the original room to find its failed cards. Refreshing or closing the page clears unsent messages held by that page.
@@ -42,15 +43,15 @@ Room work can run on several lines in parallel. Labels at the top of a card show
42
43
 
43
44
  New messages wait above the composer while the intended member or room is busy. They are sent when the recipient or room becomes available. Your answers on an answer card work the same way: while the member who asked is still busy, the answer is recorded, but the share for that member waits in the queue, marked “#N is posted; it goes to … once free”.
44
45
 
45
- - **Not waiting.** The button on a queued item says what it will do:
46
- - “Send now”: the recipient is free, so it goes at once.
47
- - “Steer”: the recipient is working and its software takes interjections, so this joins its current turn; it sees it right away and the work done so far stays.
48
- - “Interrupt and send”: the recipient is working and cannot take an interjection, so its turn is stopped first and it takes this together with the interrupted work.
49
- - When the recipient can neither take an interjection nor be stopped, the button stays “Send now”; selecting it explains why and the message stays queued.
46
+ - **Not waiting.** Select the arrow button on a queued item; hover over it to see what it will do:
47
+ - The recipient is free: it goes at once.
48
+ - The recipient is working and its software takes interjections: this joins its current turn; it sees it right away and the work done so far stays.
49
+ - The recipient is working and cannot take an interjection: its turn is stopped first, and it takes this together with the interrupted work.
50
+ - The recipient can neither take an interjection nor be stopped: selecting it explains why and the message stays queued.
50
51
  - **Edit or delete.** In a queued, unsent item’s menu, select “Edit message” to return it to the composer for editing, or delete it.
51
52
  - **Reorder.** Drag queued items. On a phone, press and hold an item to move it.
52
53
  - **Pause and resume.** Selecting “Stop all” or stopping the service pauses the queue. It shows “Queue paused: you stopped the run”. Select “Continue” to resume. A failed message pauses the queue and shows the reason. Select “Retry”, edit, or delete the message to continue.
53
- - Queuing is always on and has no switch; to have a busy member take a message right away, use “Steer” or “Interrupt and send” on the queued item.
54
+ - Queuing is always on and has no switch; to have a busy member take a message right away, select the arrow button on the queued item.
54
55
 
55
56
  ### 4. Stop, retry, withdraw, edit, or rewind
56
57
 
@@ -78,10 +79,20 @@ When a member needs you to make a decision, a question card appears above the co
78
79
 
79
80
  ### 7. Inspect a run and troubleshoot a room
80
81
 
81
- - Open **Runs** in the tabs at the top of the room and select **Waterfall**. The timeline shows when each member started, how long it ran, and where it spent time waiting. Select a member's name for the run's status, start time, and duration. Select a segment to inspect the recorded details for that phase.
82
+ - Open **Runs** in the tabs at the top of the room and select **Waterfall**. The timeline shows when each member started, how long it ran, and where it spent time waiting. Select a member's name for the run's status, start time, and duration. Select a segment to inspect the recorded details for that phase. Idle stretches longer than 5 minutes are collapsed into narrow bands in **Traces**; to review the whole process at its real length, switch to **Concurrency**: at the top, **Running on its own** is the share of the span with a member at work, and **No input needed** is the share of runs started by the host, a relay or a wake-up rather than by your message; one left-to-right axis with nothing collapsed, where the height above shows how many members were running at once (stacked by member color; point at a block for that run's details), idle stretches are labeled with their length, and tasks are shown as bands below. Select a task to view it in **Traces**. Zoom with Ctrl + wheel or the **− / +** buttons (pinch on phones and tablets), drag to pan when zoomed, and double-click to reset. **Traces** also supports pinch to zoom and sideways drag on phones and tablets. Select “Replay the session” at the top right to play the latest task back in order, with adjustable speed and a scrubber, and “End replay” to return to the current state; it also works while a member is still running, playing up to now. **Show earlier runs** keeps paging back to the room's first run, and **Show all** lists every run in the room at once.
82
83
  - To handle a permission denial, return to the conversation and expand the run report on its failure or reply card. **Allow and resend** appears when the report includes a rule that can be allowed, the local service is available, and the original request can be found. Review the rule before selecting it. The original message returns to the composer for you to confirm and send.
83
84
  - If a member never woke up or an action was rejected, open **Runs → Events**. The **Event log** shows operations in time order, their outcomes, and the resulting state changes. Select a row to inspect its original record and related events. From a terminal on the local computer, run `codiscuss room events <ROOM_ID>` to read the same log.
84
85
 
86
+ ### 8. Deploy a page as a website
87
+
88
+ A page a member delivers can go to a public address, `https://<id>.bimcanvas.com`, that people without CoDiscuss can open.
89
+
90
+ 1. Under the answer, select the rocket button, “Deploy as website”, on an HTML file card. A whole folder a member prepared with `codiscuss site stage` (such as a built `dist/`) shows as a “Ready to deploy” card; select “Deploy as website” on it.
91
+ 2. The confirmation lists the file count, size and any files that look like they contain keys or tokens; those are left out by default. Select “Deploy”. The new version goes live only after every file is uploaded; if the upload fails, the live version stays as it was.
92
+ 3. Once live, the card shows the address to copy or open; its “…” menu renews for 7 days, rolls back to the previous version or revokes the site. “Published” in the sidebar lists every live website.
93
+
94
+ To have a member put its work online directly, say “deploy” or “publish as a website” in your message; otherwise members only prepare it and upload nothing.
95
+
85
96
  ## Notes
86
97
 
87
98
  - **A regular member’s `@` mention does not assign work.** When members mention one another, it is only a reference and does not wake the other member. When a regular member mentions the host, the host is woken after other room work finishes.
package/docs/guide/faq.md CHANGED
@@ -52,6 +52,8 @@
52
52
 
53
53
  ## 设置项索引
54
54
 
55
+ 想知道这一版改了什么:点网页左上角“AI CoDiscuss”后面的版本号,打开“更新日志”,默认显示当前版本,点“查看更早的版本”看以前的。
56
+
55
57
  下面列出网页“设置”弹窗中的分组与每一项,方便按功能找到说明页:
56
58
 
57
59
  | 设置分组 | 界面项名 | 说明所在页 |
@@ -29,7 +29,7 @@
29
29
 
30
30
  ## 更换模型、名称与专属提示词
31
31
 
32
- - **改模型与思考强度**:新建房间或邀请时在成员卡背面设置;已有房间在顶部“房间”页 → “成员与设置”里找到该成员,调整模型、思考强度,或点刷新重新读取模型列表(更改从下一次执行生效)。App 接入的成员在原 App 聊天里选模型与强度,网页不覆盖。支持切换入口的软件也可在这里切换 CLI 与 App。由手动接入转为本机唤醒的成员,“接入”后会标“接管已有会话”:它的项目权限沿用原会话,模型与思考强度同样可以在这里改。
32
+ - **改模型与思考强度**:新建房间或邀请时在成员卡背面设置;已有房间在顶部“房间”页 → “成员与设置”里找到该成员,调整模型、思考强度,或点刷新重新读取模型列表(更改从下一次执行生效)。App 接入的成员在原 App 聊天里选模型与强度,网页不覆盖。支持切换入口的软件也可在这里切换 CLI 与 App。由手动接入转为本机唤醒的成员,“接入”后会标“接管已有会话”:它的项目权限沿用原会话,模型与思考强度同样可以在这里改;但它自己的窗口开着时,任务会直接发进那个窗口,用的是窗口里的模型,关掉窗口后才按这里的设置运行。改过还没用上时,模型一栏在上次实际所用的模型后标“(设置为 …,下次生效)”或“(设置为 …,它自己的窗口关闭后生效)”。
33
33
  - **改显示名与分工描述**:右栏 → 成员菜单 → “名称与描述”(建房或邀请时点成员卡的名称与描述按钮,可翻面的卡片在背面设置),修改房间里的“显示名称”和分工说明。在房间里还有更快的入口:双击右栏或“成员与设置”页里的成员名称直接改名(Enter 或点别处保存,Esc 取消)。右栏的成员行不显示描述:鼠标指向某位成员,左侧浮出它的成员卡片,显示描述,并可点“编辑名称与描述”。编辑框里可点常见分工快速填入。分工说明会发给主持人和智能调度,帮助更准确地派活,也可存为该软件的默认描述。
34
34
  - **设专属提示词**:翻开成员卡,点背面的“专属提示词”按钮,写下只发给这位成员的要求(例如“回答先给结论”)。专属提示词不改变权限,也可随时恢复软件预设。
35
35
 
@@ -47,7 +47,7 @@
47
47
 
48
48
  - **添加附件**:在输入框粘贴、拖入文件,或点左下角回形针按钮选择文件(每条消息最多 10 个,单个最多 20 MiB)。添加后输入框上方出现缩略图,正文光标处插入 `[图片 #1]`、`[文件 #2]` 等房间内连续编号的占位标签;删掉缩略图或按退格删掉占位,两边同步移除。
49
49
  - **查看附件**:消息发出后点正文占位或附件卡片即可打开;图片支持全屏缩放、旋转与保存,音视频直接在消息里播放,文档与代码在文件预览窗口打开。
50
- - **在回答里操作 HTML**:成员正文用 `[文件 #n]` 引用的自包含 `.html` 附件,会在引用位置显示并随房间主题切换。滚到演示时才运行,点下方的“收起”会记住选择。下方也能放大、查看源码或下载。放大的预览窗口、手机全屏预览和“在新标签页打开”也使用房间主题。未引用的 HTML 仍可从附件卡片点“在消息内展开”;超过 2 MiB 或读取失败时改用文件预览窗口。手机上正文引用的演示同样就地显示;未引用的附件点卡片全屏预览。
50
+ - **交互式可视化**:成员可以在回答正文里放一段可以操作的网页(拖动滑块、点按钮看结果变化),它显示在正文中的原位置,跟随房间主题和深浅色,手机上同样直接显示。滚到它附近才开始运行。下方一行可“收起”(会记住选择)、看“源码”、“放大”到文件预览窗口、在“新标签页”打开或“下载”为 `.html` 文件。只读分享页、朗读和消息折叠时的预览只显示“交互式可视化”一行,结论以成员写在正文里的文字为准。`.html` 附件不在消息内显示,点文件卡片在预览窗口或新标签页打开。有的可视化是提问面板:你在里面排序、分配或调整后点它的提交按钮,结果会作为引用放到输入框上方,不会直接发出;你可以删改,点发送才算回答。同一面板再次提交会替换上一次的结果。
51
51
  - **成员读取附件**:本机服务为支持附件的自动执行下载文件,并把文件信息交给接收任务的成员。Claude Code 和 Codex CLI 可直接看图;API 成员需在卡片设置中打开“看图”才能看图,UTF-8 文本附件可按需读取,PDF 等其他文件读不到时会如实说明。
52
52
 
53
53
  ### 5. 导出、导入与分支房间
@@ -14,6 +14,7 @@
14
14
  - 不生成长文本回答,不评价代码或方案对错,不自己改成员顺序、不另选评审者。
15
15
  - `@全体成员` 始终同时回答,`@全体依次` 始终按顺序回答,不经智能调度判断。
16
16
  - 置信度不够、输入超限或调用出错时,自动交回主持人处理。
17
+ 未点名消息在等待判断时显示“智能调度分析中”。如果模型调用失败,消息下方会显示“没有模型判断”和失败原因,随后由主持人处理。
17
18
 
18
19
  ## 供应商、密钥申请与计费
19
20