@alexsun-top/opencode-chat-room 0.6.8 → 0.7.0
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/CHANGELOG.md +31 -0
- package/README.md +5 -4
- package/README.zh-CN.md +5 -4
- package/package.json +1 -1
- package/plugin.ts +49 -27
- package/server/assets/HIGHLIGHT-LICENSE +29 -0
- package/server/assets/NOTICE.txt +2 -1
- package/server/assets/base.css +7 -58
- package/server/assets/chat/admin.js +1 -1
- package/server/assets/chat/announcements.js +1 -1
- package/server/assets/chat/confirm-dialog.js +28 -0
- package/server/assets/chat/editor.js +97 -16
- package/server/assets/chat/events.js +48 -7
- package/server/assets/chat/index.js +6 -0
- package/server/assets/chat/join-requests.js +37 -17
- package/server/assets/chat/locales/de.js +115 -0
- package/server/assets/chat/locales/es.js +115 -0
- package/server/assets/chat/locales/fr.js +115 -0
- package/server/assets/chat/locales/index.js +8 -0
- package/server/assets/chat/locales/it.js +115 -0
- package/server/assets/chat/locales/ja.js +115 -0
- package/server/assets/chat/locales/ko.js +115 -0
- package/server/assets/chat/markdown.js +101 -1
- package/server/assets/chat/members.js +2 -2
- package/server/assets/chat/mentions.js +1 -0
- package/server/assets/chat/message-polling.js +28 -5
- package/server/assets/chat/messages.js +20 -2
- package/server/assets/chat/panels.js +0 -9
- package/server/assets/chat/questions.js +11 -3
- package/server/assets/chat/recall.js +8 -20
- package/server/assets/chat/reminders.js +1 -1
- package/server/assets/chat/replies.js +1 -1
- package/server/assets/chat/room-watcher.js +4 -0
- package/server/assets/chat/rooms.js +1 -1
- package/server/assets/chat/settings.js +72 -0
- package/server/assets/chat/shortcuts.js +46 -235
- package/server/assets/chat/state.js +52 -36
- package/server/assets/chat/system-messages.js +1 -0
- package/server/assets/chat/viewport.js +23 -0
- package/server/assets/code-highlight.css +124 -0
- package/server/assets/conversation.css +21 -3
- package/server/assets/highlight-10.7.3.min.js +1358 -0
- package/server/assets/responsive.css +6 -5
- package/server/assets/settings.css +138 -0
- package/server/chat-server.ts +4 -1
- package/server/chat.html +110 -51
- package/server/join-requests.ts +11 -0
- package/server/sw.js +3 -0
- package/skills/chatroom/SKILL.md +3 -2
- package/src/agent/admin-client.ts +13 -5
- package/src/agent/announcement-tool.ts +6 -6
- package/src/center/center-client.ts +17 -17
- package/src/center/reminder-client.ts +5 -5
- package/src/rooms/resource-read.ts +16 -9
- package/src/rooms/resource-upload.ts +2 -2
- package/src/state/sqlite-state.ts +3 -2
- package/src/tests/announcement-board.ts +3 -2
- package/server/assets/keyboard-hints.css +0 -51
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { extraLocales } from "./locales/index.js";
|
|
2
|
+
|
|
1
3
|
// Upper bound on messages kept in memory per open room; older pages load on scroll.
|
|
2
4
|
export const LOADED_MESSAGE_LIMIT = 5000;
|
|
3
5
|
|
|
@@ -137,7 +139,8 @@ export function createAuth(storage, fetcher, translate = (key) => key, sessionSt
|
|
|
137
139
|
set name(value) { ensureIdentity(); browserIdentity.name = String(value ?? "").slice(0, 64); writeSession("chat.name", browserIdentity.name || null); saveIdentity(); },
|
|
138
140
|
get token() { return read("chat.token") || ""; }, set token(value) { write("chat.token", value || null); },
|
|
139
141
|
get locale() { return read("chat.locale") || "en"; }, set locale(value) { write("chat.locale", value || null); },
|
|
140
|
-
get
|
|
142
|
+
get theme() { return read("chat.theme") || "system"; }, set theme(value) { write("chat.theme", value || null); },
|
|
143
|
+
|
|
141
144
|
get joinedRoomIds() {
|
|
142
145
|
try {
|
|
143
146
|
const ids = JSON.parse(readSession("chat.joinedRoomIds") || "[]");
|
|
@@ -197,7 +200,7 @@ export function createAuth(storage, fetcher, translate = (key) => key, sessionSt
|
|
|
197
200
|
return { LS: auth, saveToken, api, apiBlob };
|
|
198
201
|
}
|
|
199
202
|
|
|
200
|
-
const messages = {
|
|
203
|
+
export const messages = {
|
|
201
204
|
en: {
|
|
202
205
|
brand: "OC Chat", documentTitle: "OC Chat",
|
|
203
206
|
roomTitle: ({ name }) => `${name} · OC Chat`,
|
|
@@ -212,7 +215,7 @@ const messages = {
|
|
|
212
215
|
joinPolicyEditHint: "New members need a human administrator's approval. Turning this off clears all pending requests.", joinPolicyOpenConfirm: "Turn off approval? All pending join requests will be cleared.",
|
|
213
216
|
approvalRequired: "Approval required", joinRequired: "Approval required", joinPendingStatus: "Approval pending",
|
|
214
217
|
joinPendingTitle: "Waiting for approval", joinPendingBody: ({ name }) => `Your request to join “${name}” was sent. A human administrator must approve it before you can join.`,
|
|
215
|
-
joinPendingHint: "You can leave this page; the request stays pending. Check the room list later.", joinPendingNotice: ({ name }) => `Request sent to join “${name}”. Waiting for a human administrator.`,
|
|
218
|
+
joinPendingHint: "You can leave this page; the request stays pending. Check the room list later.", joinPendingNotice: ({ name }) => `Request sent to join “${name}”. Waiting for a human administrator.`, joinPendingCancel: "Cancel request", joinPendingCancelError: "Could not cancel the request. Try again.",
|
|
216
219
|
joinPendingGoneTitle: "Request not pending", joinPendingGoneBody: "It may have been denied or cleared. You can send a new request.", joinPendingAgain: "Request again",
|
|
217
220
|
joinPendingError: "Could not check the request. Try again.", joinPendingRoomGone: "This room is gone, or you no longer have access.",
|
|
218
221
|
joinNameTaken: "That name is already used in this room. Choose another name.",
|
|
@@ -221,7 +224,6 @@ const messages = {
|
|
|
221
224
|
joinRequestApproveLabel: ({ name }) => `Approve ${name}`, joinRequestDenyLabel: ({ name }) => `Deny ${name}`,
|
|
222
225
|
joinRequestTime: ({ time }) => `Requested ${time}`, joinRequestApproved: ({ name }) => `${name} approved.`, joinRequestDenied: ({ name }) => `${name} denied.`,
|
|
223
226
|
joinRequestActionFailed: ({ message }) => `Could not update the request: ${message}`, membersWithRequests: ({ count }) => `Members, ${count} join request${count === 1 ? "" : "s"} pending`,
|
|
224
|
-
joinRequestBadgeOne: " request", joinRequestBadgeMany: " requests",
|
|
225
227
|
accessKeyTitle: "Access key", accessKeyHint: "This server asks for an access key. It stays in this browser and is sent with each request.",
|
|
226
228
|
tokenOptional: "Access token (optional)", bearerToken: "Bearer token",
|
|
227
229
|
tokenPlaceholder: "Enter if the server requires it", save: "Save",
|
|
@@ -230,7 +232,7 @@ const messages = {
|
|
|
230
232
|
editRoom: "Edit room", roomOwnerOnlyTitle: "Owner or administrator only", roomOwnerOnlyNote: ({ owner }) => `Only the room owner or a room administrator can change these settings. This room belongs to ${owner}.`, roomNameLabel: "Room name", roomDescriptionLabel: "Description", adminAgentLabel: "Administrator agent", roomOwnerBadge: "Owner", roomAdminBadge: "Admin",
|
|
231
233
|
adminIdsLabel: "Human administrators", adminIdsHint: "These members can edit room details, manage members, delete files, and choose a successor. The owner always has the same powers.", adminIdsEmpty: "No other members are in this room yet.", newOwnerLabel: "New owner", newOwnerHint: "Hand the room to another person who is in it. Only the owner can do this; agents cannot own a room.",
|
|
232
234
|
successorLabel: "Successor if the owner leaves", successorNone: "Longest-present member", successorHint: "If the owner leaves, this person becomes owner. If an administrator leaves, this person takes that role. Leave empty to use the longest-present member.", ownerOnlySettingsNote: "Only the owner can change the administrator agent or hand off the room.", adminAgentHint: "The designated agent can use the admin tool to inspect this room and its history. Only the owner can change this; leave empty for none.",
|
|
233
|
-
noAdminAgent: "None",
|
|
235
|
+
noAdminAgent: "None", openQuestions: ({ count }) => `${count} unanswered question${count === 1 ? "" : "s"}`,
|
|
234
236
|
newRoom: "Create a room",
|
|
235
237
|
copyRoomIdTitle: ({ id }) => `Click to copy the full room ID: ${id}`, copied: "Copied",
|
|
236
238
|
members: "Members", membersCount: ({ count }) => `Members (${count})`, noMembers: "No members yet.", profileMenu: "Your profile and settings",
|
|
@@ -255,6 +257,8 @@ const messages = {
|
|
|
255
257
|
answerFailed: "Reply failed. Your draft is still here.", answerTooLong: "Reply must be 5,000 characters or fewer.", questionAlreadyAnswered: "This question was answered elsewhere.",
|
|
256
258
|
adminBindingGuide: "Choose a room and an Agent in it. Send the invitation privately to finish setup.", adminRoomLabel: "Administrator room", adminDesignateAgent: "Invite Agent",
|
|
257
259
|
settings: "Settings", adminAccess: "Administration", adminToken: "Administration token", openAdministration: "Open administration", administration: "Administration", designations: "Designations", adminRoom: "Administrator room", targetRoom: "Agent membership room", adminScopeNote: "Choose an Agent in the administrator room. Administrators can manage all rooms.", targetAgent: "Registered agent", designate: "Designate administrator", revokeDesignation: "Revoke designation", globalStatus: "Global status", adminTasks: "Tasks", taskText: "Task", dispatchTask: "Dispatch task", timers: "Timers", planName: "Timer name", createTimer: "Create timer", tokenRequired: "The server requires an access token (401).",
|
|
260
|
+
themeLabel: "Theme", themeSystem: "System", themeLight: "Light", themeDark: "Dark", themeForest: "Forest", themeSand: "Sand",
|
|
261
|
+
settingsLocalHint: "Language and theme are saved in this browser.",
|
|
258
262
|
adminLoading: "Loading administration…", refreshAdmin: "Refresh", adminRoomBadge: "admin", chooseAdminRoom: "Choose a normal room", chooseTargetRoom: "Choose an agent room", chooseAgent: "Choose a registered agent", taskTargetRoom: "Target room", taskTargetAgent: "Target agent", createAdminRoomFirst: "Create a normal room first, then select it as the admin room.", noAgents: "No registered agents", selectAdminAgent: "Choose an admin room and registered agent.", adminDesignated: "Administrator designation is active immediately and stays until you revoke it.", revokeConfirm: "Revoke this admin designation? The normal room will remain.", updateTask: "Update task", task_pending: "Pending", task_working: "Working", task_blocked: "Blocked", task_completed: "Completed", task_cancelled: "Cancelled", nextRun: ({ time, minutes }) => `Every ${minutes} min · next ${time}`, paused: "Paused", pauseTimer: "Pause", resumeTimer: "Resume", deleteTimer: "Delete", deleteTimerConfirm: ({ name }) => `Delete timer “${name}”?`,
|
|
259
263
|
leave: "Leave", reconnecting: "Connection lost. Retrying…", messageList: "Message list",
|
|
260
264
|
noMessages: "No messages yet. Say something.", latestMessages: "Back to latest messages",
|
|
@@ -269,20 +273,17 @@ const messages = {
|
|
|
269
273
|
joinArrow: "Join →", joinDirectTitle: "Click to join directly", mentionEmpty: "No matching members",
|
|
270
274
|
joined: "Joined", joinAction: "Join room", unreadMessages: ({ count }) => `${count} unread`,
|
|
271
275
|
mentionHint: "↑↓ Select · Enter to confirm · Esc to close", today: "Today", yesterday: "Yesterday",
|
|
272
|
-
|
|
273
|
-
shortcutsTitle: "Keyboard shortcuts", shortcutsLead: "
|
|
274
|
-
|
|
275
|
-
allShortcuts: "All shortcuts", hintsHide: "Hide tags on controls", hintsShow: "Show tags on controls",
|
|
276
|
+
|
|
277
|
+
shortcutsTitle: "Keyboard shortcuts", shortcutsLead: "ChatRoom shortcuts. Press {modifier} + / to open this list.",
|
|
278
|
+
shortcutsOpen: "All shortcuts",
|
|
276
279
|
shortcutsWriting: "Writing", shortcutsSend: "Send the message", shortcutsNewline: "Start a new line",
|
|
277
280
|
shortcutsMention: "Choose a member to mention", shortcutsRooms: "Rooms",
|
|
278
281
|
shortcutsSwitchRoom: "Switch to the previous or next room", shortcutsReading: "Reading",
|
|
279
|
-
shortcutsScroll: "Scroll messages while typing", shortcutsMenus: "Menus and dialogs",
|
|
280
|
-
shortcutsClose: "Close the open menu, panel, or dialog",
|
|
281
|
-
shortcutsTab: "Move between controls", shortcutsActivate: "Use the focused control",
|
|
282
|
-
shortcutsOpen: "Open this shortcut list", switchRoomsHint: "Switch rooms",
|
|
282
|
+
shortcutsScroll: "Scroll messages while typing", shortcutsJump: "Jump to the start or end of the conversation", shortcutsMenus: "Menus and dialogs",
|
|
283
|
+
shortcutsClose: "Close the open menu, panel, or dialog",
|
|
283
284
|
earlierMessages: "Earlier messages omitted", messagesBetweenOmitted: "Messages between this reading point and latest are omitted.", you: "You", saved: "Saved",
|
|
284
285
|
savedMemory: "Saved for this tab only", copyFailed: ({ id }) => `Copy failed. Copy manually: ${id}`,
|
|
285
|
-
copyMessage: "Copy", copiedMessage: "Copied", copyMessageFailed: "Could not copy. Select and copy the message manually.",
|
|
286
|
+
copyMessage: "Copy", copiedMessage: "Copied", copyMessageFailed: "Could not copy. Select and copy the message manually.", wrapCode: "Wrap code",
|
|
286
287
|
replyMessage: "Reply", replyingTo: "Replying to", cancelReply: "Cancel reply", replyOpenOriginal: "View original message", replyOriginalUnavailable: "Original message is unavailable.", replyOriginalRecalled: "Original message was recalled.",
|
|
287
288
|
recallMessage: "Recall", recallSystemMessage: "Recall this room notice", recallSystemConfirm: "Recall this room notice? Everyone will see it as recalled.", recallConfirm: "Recall this message? Everyone will see it as recalled.", recallAdminConfirm: ({ name }) => `Recall ${name}'s message? Everyone will see it as recalled.`, recallFailed: "Could not recall this message.", messageRecalled: "Message recalled", recalledBy: ({ name }) => `Recalled by ${name}`, showRecalled: "View original", hideRecalled: "Hide original", revealFailed: "Load failed. Retry",
|
|
288
289
|
identityChanged: "This browser identity changed in another tab. Reload this tab before continuing.",
|
|
@@ -308,10 +309,11 @@ const messages = {
|
|
|
308
309
|
privacyNote: "Anyone with the shared token can read direct messages and manage rooms; the server can read them too.",
|
|
309
310
|
resourceDelete: "Delete file", resourceDeleting: "Deleting…", resourceDeleteConfirm: ({ name }) => `Delete “${name}”? This cannot be undone.`, resourceDeleted: "File deleted.", resourceDeleteFailed: "Could not delete this file.",
|
|
310
311
|
systemJoined: ({ name }) => `${name} joined the room`, systemLeft: ({ name }) => `${name} left the room`, systemRemoved: ({ name }) => `${name} was removed from the room`,
|
|
311
|
-
systemDesignated: ({ actor, name }) => `${actor} designated ${name} as administrator`, systemRevoked: ({ actor }) => `${actor} revoked the administrator designation`, systemRenamed: ({ actor, from, to }) => `${actor} renamed the room from "${from}" to "${to}"`, systemDescribed: ({ actor }) => `${actor} updated the room description`, systemHanded: ({ actor, name }) => `${actor} handed the room to ${name}`, systemAdminsUpdated: ({ actor }) => `${actor} updated the room administrators`, systemSuccessorNamed: ({ actor, name }) => `${actor} named ${name} as the room successor`, systemSuccessorCleared: ({ actor }) => `${actor} cleared the room successor`,
|
|
312
|
+
systemDesignated: ({ actor, name }) => `${actor} designated ${name} as administrator`, systemRevoked: ({ actor }) => `${actor} revoked the administrator designation`, systemRenamed: ({ actor, from, to }) => `${actor} renamed the room from "${from}" to "${to}"`, systemDescribed: ({ actor }) => `${actor} updated the room description`, systemHanded: ({ actor, name }) => `${actor} handed the room to ${name}`, systemAdminsUpdated: ({ actor }) => `${actor} updated the room administrators`, systemSuccessorNamed: ({ actor, name }) => `${actor} named ${name} as the room successor`, systemSuccessorCleared: ({ actor }) => `${actor} cleared the room successor`, systemJoinPolicy: ({ actor, policy }) => policy === "approval" ? `${actor} now requires approval to join this room` : `${actor} opened this room to join without approval`,
|
|
312
313
|
activity_working: "Working", activity_idle: "Foreground idle", activity_waiting: "Waiting", activity_unknown: "Status unknown", activity_offline: "Status stale",
|
|
313
314
|
activityHint_working: "The agent reports active work.", activityHint_idle: "Foreground is idle; background work may continue.", activityHint_waiting: "The agent reports that it is waiting.", activityHint_unknown: "No activity report is available.", activityHint_offline: "The last status is stale; this does not prove the agent is offline.",
|
|
314
315
|
receiptCount: ({ count }) => `Read by ${count}`, receiptNone: "No readers yet", receiptNotLoaded: "Read status not loaded", readerPanelTitle: "Message readers", close: "Close", departedMember: "left",
|
|
316
|
+
confirmTitle: "Please confirm", cancel: "Cancel", confirmAction: "Confirm",
|
|
315
317
|
receiptEvidence_displayed: "Shown on screen", receiptEvidence_tool: "Fetched with room tool", receiptEvidence_context: "In agent context",
|
|
316
318
|
},
|
|
317
319
|
"zh-CN": {
|
|
@@ -327,7 +329,7 @@ const messages = {
|
|
|
327
329
|
joinPolicyEditHint: "新成员需经人类管理员审核。关闭后,所有待审核申请都会被清除。", joinPolicyOpenConfirm: "关闭加入审核?所有待审核的加入申请都会被清除。",
|
|
328
330
|
approvalRequired: "需审核加入", joinRequired: "需审核加入", joinPendingStatus: "等待审核",
|
|
329
331
|
joinPendingTitle: "等待审核", joinPendingBody: ({ name }) => `加入“${name}”的申请已发送,需人类管理员审核通过后才能进入。`,
|
|
330
|
-
joinPendingHint: "可以离开此页面,申请会保留;稍后可在房间列表查看。", joinPendingNotice: ({ name }) => `已发送加入“${name}”的申请,正在等待人类管理员审核。`,
|
|
332
|
+
joinPendingHint: "可以离开此页面,申请会保留;稍后可在房间列表查看。", joinPendingNotice: ({ name }) => `已发送加入“${name}”的申请,正在等待人类管理员审核。`, joinPendingCancel: "取消申请", joinPendingCancelError: "取消申请失败,请重试。",
|
|
331
333
|
joinPendingGoneTitle: "申请已不在等待", joinPendingGoneBody: "申请可能已被拒绝或清除,可以重新发送。", joinPendingAgain: "重新申请",
|
|
332
334
|
joinPendingError: "无法检查申请状态,请重试。", joinPendingRoomGone: "房间不存在,或你已无权访问。",
|
|
333
335
|
joinNameTaken: "这个昵称已被房间里的成员使用,请换一个。",
|
|
@@ -336,7 +338,6 @@ const messages = {
|
|
|
336
338
|
joinRequestApproveLabel: ({ name }) => `通过 ${name} 的加入申请`, joinRequestDenyLabel: ({ name }) => `拒绝 ${name} 的加入申请`,
|
|
337
339
|
joinRequestTime: ({ time }) => `申请于 ${time}`, joinRequestApproved: ({ name }) => `已通过 ${name} 的申请。`, joinRequestDenied: ({ name }) => `已拒绝 ${name} 的申请。`,
|
|
338
340
|
joinRequestActionFailed: ({ message }) => `操作失败:${message}`, membersWithRequests: ({ count }) => `成员,${count} 个待审核加入申请`,
|
|
339
|
-
joinRequestBadgeOne: " 个申请", joinRequestBadgeMany: " 个申请",
|
|
340
341
|
accessKeyTitle: "访问密钥", accessKeyHint: "这个服务器需要访问密钥。密钥保存在当前浏览器里,并随每个请求发送。",
|
|
341
342
|
bearerToken: "Bearer Token", tokenPlaceholder: "服务器要求时填写", save: "保存",
|
|
342
343
|
tokenHint: "若服务器设置了访问令牌(401),所有请求都会带上它。", existingRooms: "房间",
|
|
@@ -344,7 +345,7 @@ const messages = {
|
|
|
344
345
|
editRoom: "编辑房间", roomOwnerOnlyTitle: "仅房主或管理员可修改", roomOwnerOnlyNote: ({ owner }) => `只有房主或房间管理员可以修改这些设置。这个房间属于 ${owner}。`, roomNameLabel: "房间名称", roomDescriptionLabel: "描述", adminAgentLabel: "管理员 Agent", roomOwnerBadge: "房主", roomAdminBadge: "管理员",
|
|
345
346
|
adminIdsLabel: "成员管理员", adminIdsHint: "这些成员可以修改房间信息、管理成员、删除文件并指定接任者。房主始终拥有这些权限。", adminIdsEmpty: "房间里暂无其他成员。", newOwnerLabel: "新房主", newOwnerHint: "可以把房间交给房间里的另一个人。只有房主可以操作;Agent 不能成为房主。",
|
|
346
347
|
successorLabel: "房主离开后的接任者", successorNone: "最早加入的成员", successorHint: "房主离开后,此人接任房主;管理员离开后,此人接任管理员。留空则最早加入的成员接任房主。", ownerOnlySettingsNote: "只有房主可以更改管理员 Agent 或移交房间。", adminAgentHint: "被指定的 Agent 可用 admin 工具查看此房间及其历史。只有房主可以更改,留空表示不指定。",
|
|
347
|
-
noAdminAgent: "不指定",
|
|
348
|
+
noAdminAgent: "不指定", openQuestions: ({ count }) => `${count} 个待回答的问题`,
|
|
348
349
|
newRoom: "创建房间",
|
|
349
350
|
copyRoomIdTitle: ({ id }) => `点击复制完整房间 ID:${id}`, copied: "已复制", members: "成员",
|
|
350
351
|
membersCount: ({ count }) => `成员 ${count}`, noMembers: "暂无成员", settings: "设置", profileMenu: "个人资料和设置",
|
|
@@ -370,7 +371,9 @@ const messages = {
|
|
|
370
371
|
adminBindingGuide: "选择管理员房间和其中的 Agent,再将邀请私下发送给该 Agent 完成设置。", adminRoomLabel: "管理员房间", adminDesignateAgent: "邀请 Agent",
|
|
371
372
|
adminAccess: "管理", adminToken: "管理令牌", openAdministration: "打开管理面板", administration: "管理面板", designations: "管理绑定", adminRoom: "管理员房间", targetRoom: "Agent 所属房间", adminScopeNote: "请选择管理员房间内的 Agent。管理员可以管理所有房间。", adminRoomBadge: "管理", targetAgent: "已注册 Agent", designate: "指定管理员", revokeDesignation: "撤销绑定", globalStatus: "全局状态", adminTasks: "任务", taskText: "任务内容", dispatchTask: "派发任务", timers: "定时任务", planName: "定时任务名称", createTimer: "创建定时任务",
|
|
372
373
|
adminLoading: "正在加载管理面板…", refreshAdmin: "刷新", adminRoomBadge: "管理", chooseAdminRoom: "选择普通房间", chooseTargetRoom: "选择 Agent 房间", chooseAgent: "选择已注册 Agent", taskTargetRoom: "任务目标房间", taskTargetAgent: "任务目标 Agent", createAdminRoomFirst: "请先按普通流程创建房间,再选作管理房间。", noAgents: "没有已注册的 Agent", selectAdminAgent: "请选择管理房间和已注册的 Agent。", adminDesignated: "管理员已立即生效,长期有效,直到撤销。", revokeConfirm: "撤销此管理绑定?普通房间会保留。", updateTask: "更新任务", task_pending: "待处理", task_working: "进行中", task_blocked: "受阻", task_completed: "已完成", task_cancelled: "已取消", nextRun: ({ time, minutes }) => `每 ${minutes} 分钟 · 下次 ${time}`, paused: "已暂停", pauseTimer: "暂停", resumeTimer: "恢复", deleteTimer: "删除", deleteTimerConfirm: ({ name }) => `删除定时任务“${name}”?`,
|
|
373
|
-
tokenRequired: "服务器要求访问令牌(401)。",
|
|
374
|
+
tokenRequired: "服务器要求访问令牌(401)。",
|
|
375
|
+
themeLabel: "主题", themeSystem: "跟随系统", themeLight: "浅色", themeDark: "深色", themeForest: "森林", themeSand: "沙丘",
|
|
376
|
+
settingsLocalHint: "语言和主题保存在当前浏览器中。", leave: "离开", reconnecting: "连接中断,正在重试…",
|
|
374
377
|
messageList: "消息列表", noMessages: "还没有消息,说点什么吧。", latestMessages: "回到最新消息",
|
|
375
378
|
mentionMembers: "选择要提及的成员", messagePlaceholder: "输入消息,Enter 发送",
|
|
376
379
|
attachments: "附件", addFiles: "添加文件", dropFilesHere: "将文件拖到这里添加",
|
|
@@ -381,21 +384,18 @@ const messages = {
|
|
|
381
384
|
fileTooLarge: "文件超过服务器当前大小限制。",
|
|
382
385
|
send: "发送", roomMeta: ({ members, count }) => `${members} 人 · ${count} 条消息`, joinArrow: "加入 →",
|
|
383
386
|
joinDirectTitle: "点击直接加入", mentionEmpty: "没有匹配的成员", mentionHint: "↑↓ 选择 · Enter 确认 · Esc 关闭",
|
|
384
|
-
|
|
385
|
-
shortcutsTitle: "键盘快捷键", shortcutsLead: "
|
|
386
|
-
|
|
387
|
-
allShortcuts: "全部快捷键", hintsHide: "隐藏控件提示", hintsShow: "显示控件提示",
|
|
387
|
+
|
|
388
|
+
shortcutsTitle: "键盘快捷键", shortcutsLead: "ChatRoom 快捷键。按 {modifier} + / 打开此列表。",
|
|
389
|
+
shortcutsOpen: "全部快捷键",
|
|
388
390
|
shortcutsWriting: "输入", shortcutsSend: "发送消息", shortcutsNewline: "换行",
|
|
389
391
|
shortcutsMention: "选择要提及的成员", shortcutsRooms: "房间",
|
|
390
392
|
shortcutsSwitchRoom: "切换到上一个或下一个房间", shortcutsReading: "阅读",
|
|
391
|
-
shortcutsScroll: "输入时滚动消息", shortcutsMenus: "菜单和对话框",
|
|
392
|
-
shortcutsClose: "关闭当前菜单、面板或对话框",
|
|
393
|
-
shortcutsTab: "在控件之间移动", shortcutsActivate: "使用当前聚焦的控件",
|
|
394
|
-
shortcutsOpen: "打开这个快捷键列表", switchRoomsHint: "切换房间",
|
|
393
|
+
shortcutsScroll: "输入时滚动消息", shortcutsJump: "跳到会话开头或结尾", shortcutsMenus: "菜单和对话框",
|
|
394
|
+
shortcutsClose: "关闭当前菜单、面板或对话框",
|
|
395
395
|
joined: "已加入", joinAction: "加入房间", unreadMessages: ({ count }) => `${count} 条未读`,
|
|
396
396
|
today: "今天", yesterday: "昨天", earlierMessages: "更早的消息已省略", messagesBetweenOmitted: "此阅读位置与最新消息之间的部分消息已省略。", you: "我", saved: "已保存",
|
|
397
397
|
savedMemory: "仅保存于当前标签页", copyFailed: ({ id }) => `复制失败,请手动复制:${id}`,
|
|
398
|
-
copyMessage: "复制", copiedMessage: "已复制", copyMessageFailed: "复制失败,请手动选择并复制消息。",
|
|
398
|
+
copyMessage: "复制", copiedMessage: "已复制", copyMessageFailed: "复制失败,请手动选择并复制消息。", wrapCode: "自动换行",
|
|
399
399
|
replyMessage: "回复", replyingTo: "回复给", cancelReply: "取消回复", replyOpenOriginal: "查看原始消息", replyOriginalUnavailable: "原始消息不可用。", replyOriginalRecalled: "原消息已撤回。",
|
|
400
400
|
recallMessage: "撤回", recallSystemMessage: "撤回这条房间通知", recallSystemConfirm: "撤回这条房间通知?所有人都会看到“消息已撤回”。", recallConfirm: "撤回这条消息?所有人都会看到“消息已撤回”。", recallAdminConfirm: ({ name }) => `撤回 ${name} 的消息?所有人都会看到“消息已撤回”。`, recallFailed: "撤回失败,请重试。", messageRecalled: "消息已撤回", recalledBy: ({ name }) => `${name} 撤回`, showRecalled: "查看原文", hideRecalled: "收起原文", revealFailed: "加载失败,重试",
|
|
401
401
|
identityChanged: "此浏览器身份已在另一个标签页中更改,请重新加载此标签页后继续。",
|
|
@@ -416,12 +416,14 @@ const messages = {
|
|
|
416
416
|
sendAsFile: ({ count }) => `${count} 个字符超出上限,将作为文本文件发送`,
|
|
417
417
|
privacyNote: "持有共享令牌的人都可以读取私聊内容和管理房间;服务器也可以读取私聊内容。", resourceDelete: "删除文件", resourceDeleting: "正在删除…", resourceDeleteConfirm: ({ name }) => `确定删除“${name}”?此操作无法撤销。`, resourceDeleted: "文件已删除。", resourceDeleteFailed: "无法删除此文件。",
|
|
418
418
|
systemJoined: ({ name }) => `${name} 加入了房间`, systemLeft: ({ name }) => `${name} 离开了房间`, systemRemoved: ({ name }) => `${name} 被移出了房间`,
|
|
419
|
-
systemDesignated: ({ actor, name }) => `${actor} 指定 ${name} 为管理员`, systemRevoked: ({ actor }) => `${actor} 撤销了管理员指定`, systemRenamed: ({ actor, from, to }) => `${actor} 将房间名称从“${from}”改为“${to}”`, systemDescribed: ({ actor }) => `${actor} 更新了房间描述`, systemHanded: ({ actor, name }) => `${actor} 将房间移交给了 ${name}`, systemAdminsUpdated: ({ actor }) => `${actor} 更新了房间管理员`, systemSuccessorNamed: ({ actor, name }) => `${actor} 指定 ${name} 为房间继任者`, systemSuccessorCleared: ({ actor }) => `${actor} 清除了房间继任者`,
|
|
419
|
+
systemDesignated: ({ actor, name }) => `${actor} 指定 ${name} 为管理员`, systemRevoked: ({ actor }) => `${actor} 撤销了管理员指定`, systemRenamed: ({ actor, from, to }) => `${actor} 将房间名称从“${from}”改为“${to}”`, systemDescribed: ({ actor }) => `${actor} 更新了房间描述`, systemHanded: ({ actor, name }) => `${actor} 将房间移交给了 ${name}`, systemAdminsUpdated: ({ actor }) => `${actor} 更新了房间管理员`, systemSuccessorNamed: ({ actor, name }) => `${actor} 指定 ${name} 为房间继任者`, systemSuccessorCleared: ({ actor }) => `${actor} 清除了房间继任者`, systemJoinPolicy: ({ actor, policy }) => policy === "approval" ? `${actor} 开启了加入审核,新成员需要管理员批准` : `${actor} 关闭了加入审核,新成员可以直接加入`,
|
|
420
420
|
activity_working: "工作中", activity_idle: "前台空闲", activity_waiting: "等待中", activity_unknown: "状态未知", activity_offline: "状态已过期",
|
|
421
421
|
activityHint_working: "Agent 正在报告工作状态。", activityHint_idle: "前台空闲;后台任务仍可能继续。", activityHint_waiting: "Agent 正在报告等待状态。", activityHint_unknown: "暂无活动状态报告。", activityHint_offline: "最近的状态已过期;这不能证明 Agent 已离线。",
|
|
422
422
|
receiptCount: ({ count }) => `已读 ${count} 人`, receiptNone: "尚无人已读", receiptNotLoaded: "尚未加载已读状态", readerPanelTitle: "消息已读情况", close: "关闭", departedMember: "已离开",
|
|
423
|
+
confirmTitle: "请确认", cancel: "取消", confirmAction: "确认",
|
|
423
424
|
receiptEvidence_displayed: "已显示在屏幕上", receiptEvidence_tool: "通过房间工具读取", receiptEvidence_context: "进入上下文",
|
|
424
425
|
},
|
|
426
|
+
...extraLocales,
|
|
425
427
|
};
|
|
426
428
|
|
|
427
429
|
app.t = (key, values = {}) => {
|
|
@@ -434,7 +436,9 @@ app.LS = LS;
|
|
|
434
436
|
app.api = api;
|
|
435
437
|
app.apiBlob = apiBlob;
|
|
436
438
|
app.setToken = saveToken;
|
|
437
|
-
|
|
439
|
+
export const SUPPORTED_LOCALES = ["en", "zh-CN", "ja", "ko", "fr", "de", "es", "it"];
|
|
440
|
+
const intlLocales = { en: "en-US", "zh-CN": "zh-CN", ja: "ja-JP", ko: "ko-KR", fr: "fr-FR", de: "de-DE", es: "es-ES", it: "it-IT" };
|
|
441
|
+
app.locale = messages[LS.locale] ? LS.locale : "en";
|
|
438
442
|
app.state.joinedIds = new Set(LS.joinedRoomIds);
|
|
439
443
|
app.state.drafts = new Map(Object.entries(LS.drafts));
|
|
440
444
|
app.state.positions = new Map(Object.entries(LS.positions).map(([id, value]) => [id, value && typeof value === "object" ? value : Number(value) || 0]));
|
|
@@ -499,12 +503,12 @@ app.applyLocale = () => {
|
|
|
499
503
|
} else app.updateTitle();
|
|
500
504
|
};
|
|
501
505
|
app.setLocale = (locale) => {
|
|
502
|
-
app.locale = locale
|
|
506
|
+
app.locale = messages[locale] ? locale : "en";
|
|
503
507
|
LS.locale = app.locale;
|
|
504
508
|
app.applyLocale();
|
|
505
509
|
};
|
|
506
510
|
|
|
507
|
-
app.intlLocale = () => app.locale
|
|
511
|
+
app.intlLocale = () => intlLocales[app.locale] || "en-US";
|
|
508
512
|
app.fmtTime = (timestamp) => {
|
|
509
513
|
const date = new Date(timestamp);
|
|
510
514
|
return date.toDateString() === new Date().toDateString()
|
|
@@ -546,12 +550,24 @@ app.updateTitle = () => {
|
|
|
546
550
|
for (const [id, entry] of app.state.rooms) total += id === active ? app.state.unread : entry.unreadIds.size + (entry.unreadOverflow ? 100 : 0);
|
|
547
551
|
document.title = total ? `(${total}) ${title}` : title;
|
|
548
552
|
};
|
|
549
|
-
app.setOnline = (online) => {
|
|
553
|
+
app.setOnline = (online) => {
|
|
554
|
+
app.$("#connBar").hidden = online;
|
|
555
|
+
// A recovered connection makes the network send warning stale, but an auth
|
|
556
|
+
// or validation error still needs the user's attention.
|
|
557
|
+
if (online) app.hideSendError("sendNetwork");
|
|
558
|
+
};
|
|
550
559
|
app.showSendError = (key, values = {}) => {
|
|
551
|
-
app
|
|
552
|
-
app
|
|
560
|
+
const node = app.$("#sendError");
|
|
561
|
+
app.setText(node, key, values);
|
|
562
|
+
node.dataset.errorKey = key;
|
|
563
|
+
node.hidden = false;
|
|
564
|
+
};
|
|
565
|
+
app.hideSendError = (key) => {
|
|
566
|
+
const node = app.$("#sendError");
|
|
567
|
+
if (key && node.dataset.errorKey !== key) return;
|
|
568
|
+
node.hidden = true;
|
|
569
|
+
delete node.dataset.errorKey;
|
|
553
570
|
};
|
|
554
|
-
app.hideSendError = () => { app.$("#sendError").hidden = true; };
|
|
555
571
|
app.showJoinError = (key, values = {}) => {
|
|
556
572
|
app.setText(app.$("#joinError"), key, values);
|
|
557
573
|
app.$("#joinError").hidden = false;
|
|
@@ -9,6 +9,7 @@ const patterns = [
|
|
|
9
9
|
[/^(.*?) revoked the administrator designation$/, "systemRevoked", (m) => ({ actor: m[1] })],
|
|
10
10
|
[/^(.*?) renamed the room from "(.*)" to "(.*)"$/, "systemRenamed", (m) => ({ actor: m[1], from: m[2], to: m[3] })],
|
|
11
11
|
[/^(.*?) updated the room description$/, "systemDescribed", (m) => ({ actor: m[1] })],
|
|
12
|
+
[/^(.*?) set join approval to (open|approval)$/, "systemJoinPolicy", (m) => ({ actor: m[1], policy: m[2] })],
|
|
12
13
|
[/^(.*?) handed the room to (.*)$/, "systemHanded", (m) => ({ actor: m[1], name: m[2] })],
|
|
13
14
|
];
|
|
14
15
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Keep the app inside the visible area when a soft keyboard opens (iOS does not resize the layout viewport).
|
|
2
|
+
export function initViewport() {
|
|
3
|
+
const root = document.documentElement;
|
|
4
|
+
const viewport = window.visualViewport;
|
|
5
|
+
if (!viewport) return;
|
|
6
|
+
let lastHeight = viewport.height;
|
|
7
|
+
|
|
8
|
+
const sync = () => {
|
|
9
|
+
root.style.setProperty("--app-height", `${Math.round(viewport.height)}px`);
|
|
10
|
+
if (viewport.height < lastHeight - 80 && document.activeElement?.id === "msgInput") {
|
|
11
|
+
requestAnimationFrame(() => {
|
|
12
|
+
const thread = document.querySelector("#thread");
|
|
13
|
+
if (thread) thread.scrollTop = thread.scrollHeight;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
lastHeight = viewport.height;
|
|
17
|
+
};
|
|
18
|
+
viewport.addEventListener("resize", sync);
|
|
19
|
+
viewport.addEventListener("scroll", sync);
|
|
20
|
+
window.addEventListener("resize", sync);
|
|
21
|
+
sync();
|
|
22
|
+
if (matchMedia("(pointer: coarse)").matches) document.querySelector("#msgInput")?.setAttribute("enterkeyhint", "enter");
|
|
23
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/* Fenced code blocks: a quiet frame, a hover toolbar, and readable tokens in every palette. */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--code-bg: color-mix(in srgb, var(--ink) 5%, var(--surface));
|
|
5
|
+
--code-keyword: var(--accent);
|
|
6
|
+
--code-string: color-mix(in srgb, var(--mention-blue) 82%, var(--ink));
|
|
7
|
+
--code-number: color-mix(in srgb, var(--warning) 68%, var(--ink));
|
|
8
|
+
--code-title: color-mix(in srgb, var(--accent) 72%, var(--ink));
|
|
9
|
+
--code-comment: color-mix(in srgb, var(--ink-3) 78%, var(--ink));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.code-block { position: relative; min-width: 0; }
|
|
13
|
+
|
|
14
|
+
.code-block pre {
|
|
15
|
+
margin: 0;
|
|
16
|
+
padding: 10px 12px;
|
|
17
|
+
border: 1px solid var(--line);
|
|
18
|
+
border-radius: 10px;
|
|
19
|
+
background: var(--code-bg);
|
|
20
|
+
overflow-x: auto;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.code-block pre code {
|
|
24
|
+
display: block;
|
|
25
|
+
white-space: pre;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.code-block.is-wrapped pre { overflow-x: hidden; }
|
|
29
|
+
.code-block.is-wrapped pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
30
|
+
|
|
31
|
+
.code-toolbar {
|
|
32
|
+
position: absolute;
|
|
33
|
+
z-index: 2;
|
|
34
|
+
top: 4px;
|
|
35
|
+
right: 4px;
|
|
36
|
+
display: flex;
|
|
37
|
+
gap: 2px;
|
|
38
|
+
padding: 2px;
|
|
39
|
+
border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
|
|
40
|
+
border-radius: 9px;
|
|
41
|
+
background: color-mix(in srgb, var(--surface) 52%, transparent);
|
|
42
|
+
-webkit-backdrop-filter: blur(8px);
|
|
43
|
+
backdrop-filter: blur(8px);
|
|
44
|
+
box-shadow: 0 1px 3px rgb(20 40 32 / .08);
|
|
45
|
+
opacity: 0;
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
transition: opacity .14s ease;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.code-block:hover .code-toolbar,
|
|
51
|
+
.code-block:focus-within .code-toolbar {
|
|
52
|
+
opacity: 1;
|
|
53
|
+
pointer-events: auto;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Touch screens have no hover: keep the controls reachable at all times. */
|
|
57
|
+
@media (hover: none), (pointer: coarse) {
|
|
58
|
+
.code-toolbar { opacity: 1; pointer-events: auto; }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.code-tool-button {
|
|
62
|
+
display: grid;
|
|
63
|
+
place-items: center;
|
|
64
|
+
width: 32px;
|
|
65
|
+
height: 32px;
|
|
66
|
+
padding: 0;
|
|
67
|
+
border: 0;
|
|
68
|
+
border-radius: 7px;
|
|
69
|
+
color: var(--ink-2);
|
|
70
|
+
background: transparent;
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
transition: color .14s, background .14s;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.code-tool-button:hover { color: var(--accent); background: var(--accent-soft); }
|
|
76
|
+
.code-tool-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
|
77
|
+
.code-tool-button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
|
|
78
|
+
.code-tool-button.is-copied { color: var(--accent); background: var(--accent-soft); }
|
|
79
|
+
.code-tool-button.is-copy-failed { color: var(--danger); background: var(--danger-soft); }
|
|
80
|
+
|
|
81
|
+
.code-tool-icon {
|
|
82
|
+
width: 16px;
|
|
83
|
+
height: 16px;
|
|
84
|
+
fill: none;
|
|
85
|
+
stroke: currentColor;
|
|
86
|
+
stroke-width: 1.7;
|
|
87
|
+
stroke-linecap: round;
|
|
88
|
+
stroke-linejoin: round;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.code-check-icon { display: none; }
|
|
92
|
+
.code-tool-button.is-copied .code-copy-icon { display: none; }
|
|
93
|
+
.code-tool-button.is-copied .code-check-icon { display: block; }
|
|
94
|
+
|
|
95
|
+
/* highlight.js tokens use palette tokens, so dark, forest, and sand stay legible. */
|
|
96
|
+
.code-block .hljs { color: var(--ink); }
|
|
97
|
+
.code-block .hljs-comment,
|
|
98
|
+
.code-block .hljs-quote { color: var(--code-comment); font-style: italic; }
|
|
99
|
+
.code-block .hljs-keyword,
|
|
100
|
+
.code-block .hljs-selector-tag,
|
|
101
|
+
.code-block .hljs-literal,
|
|
102
|
+
.code-block .hljs-section,
|
|
103
|
+
.code-block .hljs-doctag { color: var(--code-keyword); font-weight: 650; }
|
|
104
|
+
.code-block .hljs-string,
|
|
105
|
+
.code-block .hljs-regexp,
|
|
106
|
+
.code-block .hljs-addition,
|
|
107
|
+
.code-block .hljs-template-tag,
|
|
108
|
+
.code-block .hljs-template-variable { color: var(--code-string); }
|
|
109
|
+
.code-block .hljs-number,
|
|
110
|
+
.code-block .hljs-symbol,
|
|
111
|
+
.code-block .hljs-bullet,
|
|
112
|
+
.code-block .hljs-built_in,
|
|
113
|
+
.code-block .hljs-type { color: var(--code-number); }
|
|
114
|
+
.code-block .hljs-title,
|
|
115
|
+
.code-block .hljs-title.function_,
|
|
116
|
+
.code-block .hljs-title.class_,
|
|
117
|
+
.code-block .hljs-attr,
|
|
118
|
+
.code-block .hljs-attribute,
|
|
119
|
+
.code-block .hljs-property,
|
|
120
|
+
.code-block .hljs-selector-class,
|
|
121
|
+
.code-block .hljs-selector-id { color: var(--code-title); }
|
|
122
|
+
.code-block .hljs-deletion { color: var(--danger); }
|
|
123
|
+
.code-block .hljs-emphasis { font-style: italic; }
|
|
124
|
+
.code-block .hljs-strong { font-weight: 700; }
|
|
@@ -76,6 +76,12 @@
|
|
|
76
76
|
.profile-trigger .rail-avatar { width: 25px; height: 25px; font-size: 12px; font-weight: 700; }
|
|
77
77
|
.chip.danger { color: var(--danger); }
|
|
78
78
|
.chip.danger:hover { border-color: var(--danger); background: var(--danger-soft); }
|
|
79
|
+
.chip.keys-entry { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; font-size: 10.5px; line-height: 1; }
|
|
80
|
+
.composer-meta .chip.keys-entry { margin-right: auto; }
|
|
81
|
+
.composer-meta .chip.keys-entry .keys-key { min-width: 15px; height: 16px; padding: 0 3px; font-size: 9px; }
|
|
82
|
+
.composer-meta .chip.keys-entry .keys-sep { font-size: 9px; }
|
|
83
|
+
.chip.keys-entry .action-label { line-height: 1; }
|
|
84
|
+
@media (max-width: 560px) { .composer-meta .chip.keys-entry .action-label { display: none; } }
|
|
79
85
|
|
|
80
86
|
.anchor { position: relative; }
|
|
81
87
|
.panel {
|
|
@@ -111,7 +117,7 @@
|
|
|
111
117
|
#memberList .member-activity + .member-actions { grid-column: 2; grid-row: 2; }
|
|
112
118
|
#memberList .member-action { white-space: normal; }
|
|
113
119
|
#memberList li:last-child { border-bottom: none; }
|
|
114
|
-
|
|
120
|
+
|
|
115
121
|
.m-time { font-size: 11.5px; color: var(--ink-3); }
|
|
116
122
|
.member-activity { flex: none; padding: 2px 6px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 10px; }
|
|
117
123
|
.member-activity.working { color: var(--accent); background: var(--accent-soft); }
|
|
@@ -201,6 +207,7 @@
|
|
|
201
207
|
.msg { display: flex; flex-direction: column; margin-bottom: 16px; }
|
|
202
208
|
.msg.in, .sys.in, .day-sep.in { animation: msg-in .25s ease both; }
|
|
203
209
|
.msg.own { align-items: flex-end; }
|
|
210
|
+
.msg.pending .msg-text { opacity: .62; }
|
|
204
211
|
.msg.repeat { margin-bottom: 8px; }
|
|
205
212
|
.msg-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 3px; }
|
|
206
213
|
.msg-name { font-size: 13px; font-weight: 650; color: var(--ink-2); }
|
|
@@ -483,9 +490,10 @@
|
|
|
483
490
|
resize: none;
|
|
484
491
|
overflow-y: hidden;
|
|
485
492
|
}
|
|
486
|
-
#msgInput
|
|
493
|
+
#msgInput[data-empty="true"] { height: 50px !important; }
|
|
487
494
|
.message-editor { white-space: pre-wrap; overflow-wrap: anywhere; outline: none; }
|
|
488
|
-
|
|
495
|
+
#msgInput br[data-chat-tail] { line-height: 0; font-size: 0; }
|
|
496
|
+
.message-editor[data-empty="true"]::before { content: attr(aria-placeholder); position: absolute; inset: 12px 13px auto; overflow: hidden; color: var(--ink-3); pointer-events: none; text-overflow: ellipsis; white-space: nowrap; }
|
|
489
497
|
.editor-mention { display: inline-block; padding: 1px 7px; border: 1px solid color-mix(in srgb, var(--mention-blue) 32%, transparent); border-radius: 999px; color: var(--mention-blue); background: color-mix(in srgb, var(--mention-blue) 14%, transparent); font-size: .92em; font-weight: 600; vertical-align: baseline; white-space: nowrap; }
|
|
490
498
|
#btnSend { padding: 12px 22px; }
|
|
491
499
|
.send-error { margin: 0; font-size: 12.5px; color: var(--danger); }
|
|
@@ -497,3 +505,13 @@
|
|
|
497
505
|
.failed-reply-context { flex: 0 0 100%; overflow: hidden; color: var(--accent); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
|
|
498
506
|
.failed-message button { flex: none; border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 12px; cursor: pointer; }
|
|
499
507
|
.failed-message button:disabled { opacity: .5; cursor: default; }
|
|
508
|
+
|
|
509
|
+
@keyframes room-switch-next { from { opacity: 0; transform: translateY(8px); } }
|
|
510
|
+
@keyframes room-switch-prev { from { opacity: 0; transform: translateY(-8px); } }
|
|
511
|
+
#msgList.room-switch-next { animation: room-switch-next .22s ease-out; }
|
|
512
|
+
#msgList.room-switch-prev { animation: room-switch-prev .22s ease-out; }
|
|
513
|
+
|
|
514
|
+
@keyframes thread-jump-up { from { opacity: .45; transform: translateY(6px); } }
|
|
515
|
+
@keyframes thread-jump-down { from { opacity: .45; transform: translateY(-6px); } }
|
|
516
|
+
#msgList.thread-jump-up { animation: thread-jump-up .18s ease-out; }
|
|
517
|
+
#msgList.thread-jump-down { animation: thread-jump-down .18s ease-out; }
|