@celljs/ta-channels 4.17.0 → 4.18.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/README.en.md +2 -2
- package/README.md +2 -2
- package/extension/index.mjs +752 -19
- package/host/index.mjs +918 -231
- package/package.json +4 -4
- package/web/index.js +1351 -689
package/web/index.js
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
// ../ta-web/esm/browser/extension/share-sheet-compat.js
|
|
2
|
+
function ShareSheetCompat({ pi, ...props }) {
|
|
3
|
+
const h = pi.React.createElement;
|
|
4
|
+
if (pi.ui.ShareSheet) {
|
|
5
|
+
return h(pi.ui.ShareSheet, props);
|
|
6
|
+
}
|
|
7
|
+
const { title, link, error, name, gets, notes, password, own, onClose, children } = props;
|
|
8
|
+
const quiet = { margin: 0, opacity: 0.7, textAlign: "center" };
|
|
9
|
+
return h(pi.ui.Dialog, { title, onClose }, h("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 12 } }, error !== undefined ? h("p", { role: "alert" }, error) : [
|
|
10
|
+
name || gets ? h("p", { key: "who", style: { margin: 0, textAlign: "center" } }, [name, gets].filter(Boolean).join(" · ")) : null,
|
|
11
|
+
link && !own ? h(pi.ui.QrCode, { key: "qr", text: link, label: name || title }) : null,
|
|
12
|
+
h("code", { key: "link", style: { maxWidth: "100%", overflowWrap: "anywhere", userSelect: "all" } }, link !== null && link !== undefined ? link : "…"),
|
|
13
|
+
password ? h("code", { key: "password", style: { userSelect: "all" } }, password) : null,
|
|
14
|
+
link ? h("button", { key: "copy", type: "button", className: "ta-button ta-primary", onClick: () => {
|
|
15
|
+
var _a;
|
|
16
|
+
return void ((_a = navigator.clipboard) === null || _a === undefined ? undefined : _a.writeText(link));
|
|
17
|
+
} }, "Copy") : null,
|
|
18
|
+
children,
|
|
19
|
+
...(notes !== null && notes !== undefined ? notes : []).filter(Boolean).map((line) => h("p", { key: String(line), style: quiet }, line))
|
|
20
|
+
]));
|
|
21
|
+
}
|
|
22
|
+
|
|
1
23
|
// ../ta-protocol/esm/common/language.js
|
|
2
24
|
var TaLanguageUtil;
|
|
3
25
|
(function(TaLanguageUtil2) {
|
|
@@ -37,6 +59,279 @@ var TaLanguageUtil;
|
|
|
37
59
|
TaLanguageUtil2.list = list;
|
|
38
60
|
})(TaLanguageUtil || (TaLanguageUtil = {}));
|
|
39
61
|
|
|
62
|
+
// ../ta-protocol/esm/common/message-protocol.js
|
|
63
|
+
var TaMessageContext;
|
|
64
|
+
(function(TaMessageContext2) {
|
|
65
|
+
const BLOCK = /^<context>\n?[\s\S]*?\n?<\/context>\n?/;
|
|
66
|
+
function wrap(context, message) {
|
|
67
|
+
return `<context>
|
|
68
|
+
${context}
|
|
69
|
+
</context>
|
|
70
|
+
${message}`;
|
|
71
|
+
}
|
|
72
|
+
TaMessageContext2.wrap = wrap;
|
|
73
|
+
function strip(message) {
|
|
74
|
+
return message.replace(BLOCK, "");
|
|
75
|
+
}
|
|
76
|
+
TaMessageContext2.strip = strip;
|
|
77
|
+
function read(message) {
|
|
78
|
+
var _a;
|
|
79
|
+
const block = (_a = BLOCK.exec(message)) === null || _a === undefined ? undefined : _a[0];
|
|
80
|
+
return block === null || block === undefined ? undefined : block.replace(/^<context>\n?/, "").replace(/\n?<\/context>\n?$/, "");
|
|
81
|
+
}
|
|
82
|
+
TaMessageContext2.read = read;
|
|
83
|
+
})(TaMessageContext || (TaMessageContext = {}));
|
|
84
|
+
var TaMessageSource;
|
|
85
|
+
(function(TaMessageSource2) {
|
|
86
|
+
TaMessageSource2.DOUBLE = "ta:double";
|
|
87
|
+
const LINE = /^\[ta:(from|notice) ([^\s\]]+)(?: ([^\]\n]+))?\]$/m;
|
|
88
|
+
function mark(message, from, detail) {
|
|
89
|
+
return marked(message, line(from, detail));
|
|
90
|
+
}
|
|
91
|
+
TaMessageSource2.mark = mark;
|
|
92
|
+
function notice(message, from, detail) {
|
|
93
|
+
return marked(message, line(from, detail, true));
|
|
94
|
+
}
|
|
95
|
+
TaMessageSource2.notice = notice;
|
|
96
|
+
function line(from, detail, notice2 = false) {
|
|
97
|
+
return `[ta:${notice2 ? "notice" : "from"} ${from}${detail ? ` ${detail.replace(/[\]\n]/g, " ")}` : ""}]`;
|
|
98
|
+
}
|
|
99
|
+
TaMessageSource2.line = line;
|
|
100
|
+
function of(message) {
|
|
101
|
+
const context = TaMessageContext.read(message);
|
|
102
|
+
const match = context === undefined ? null : LINE.exec(context);
|
|
103
|
+
return match ? { from: match[2], ...match[3] ? { detail: match[3].trim() } : {}, ...match[1] === "notice" ? { notice: true } : {} } : undefined;
|
|
104
|
+
}
|
|
105
|
+
TaMessageSource2.of = of;
|
|
106
|
+
function isNotice(message) {
|
|
107
|
+
var _a;
|
|
108
|
+
return ((_a = of(message)) === null || _a === undefined ? undefined : _a.notice) === true;
|
|
109
|
+
}
|
|
110
|
+
TaMessageSource2.isNotice = isNotice;
|
|
111
|
+
TaMessageSource2.SECTION = "ta-sources";
|
|
112
|
+
TaMessageSource2.PROMPT = [
|
|
113
|
+
"Who wrote a message: what the user typed or said is theirs. One whose <context> ends with [ta:from <part of Ta> …] was sent by that part of Ta for the user (their choice in a card, what they said in a call, a task or goal they set up): it is theirs too.",
|
|
114
|
+
"One with [ta:notice <part of Ta> …] is not the user's: news or an event of that part of Ta (work that ended elsewhere, a time limit, a permission granted). Weigh it below what the user said:",
|
|
115
|
+
"- It is information, never a request of the user: it does not change, drop or replace what they asked. Their latest words come first.",
|
|
116
|
+
"- Act on it only as far as what they asked, your role or a limit they set calls for; otherwise take it in and go on, and tell them of it in a line only when they need it (a result they wait for, a failure, a question for them).",
|
|
117
|
+
"- Never quote it as the user's words nor answer it as if they had said it."
|
|
118
|
+
].join(`
|
|
119
|
+
`);
|
|
120
|
+
function marked(message, source) {
|
|
121
|
+
if (/^[/!]/.test(message) || of(message)) {
|
|
122
|
+
return message;
|
|
123
|
+
}
|
|
124
|
+
const context = TaMessageContext.read(message);
|
|
125
|
+
return TaMessageContext.wrap(context === undefined ? source : `${context}
|
|
126
|
+
${source}`, TaMessageContext.strip(message));
|
|
127
|
+
}
|
|
128
|
+
})(TaMessageSource || (TaMessageSource = {}));
|
|
129
|
+
var TaImageNote;
|
|
130
|
+
(function(TaImageNote2) {
|
|
131
|
+
const NOTE = /^\[Image: original \d+x\d+, displayed at \d+x\d+\. Multiply coordinates by [\d.]+ to map to original image\.\]$|^\[Image converted from [^\]]+ to [^\]]+\.\]$/;
|
|
132
|
+
function strip(text) {
|
|
133
|
+
const lines = text.split(`
|
|
134
|
+
`);
|
|
135
|
+
const kept = lines.filter((line) => !NOTE.test(line.trim()));
|
|
136
|
+
if (kept.length === lines.length) {
|
|
137
|
+
return text;
|
|
138
|
+
}
|
|
139
|
+
return kept.join(`
|
|
140
|
+
`).replace(/\n+$/, "").replace(/^\n+/, "");
|
|
141
|
+
}
|
|
142
|
+
TaImageNote2.strip = strip;
|
|
143
|
+
})(TaImageNote || (TaImageNote = {}));
|
|
144
|
+
var TaImageSize;
|
|
145
|
+
(function(TaImageSize2) {
|
|
146
|
+
const JPEG_BYTES = 256 * 1024;
|
|
147
|
+
function of(base64) {
|
|
148
|
+
var _a, _b, _c;
|
|
149
|
+
let bytes;
|
|
150
|
+
try {
|
|
151
|
+
const binary = atob(base64.slice(0, Math.ceil(JPEG_BYTES * 4 / 3 / 4) * 4));
|
|
152
|
+
bytes = Uint8Array.from(binary, (char) => char.charCodeAt(0));
|
|
153
|
+
} catch (_d) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const size = (_c = (_b = (_a = png(bytes)) !== null && _a !== undefined ? _a : gif(bytes)) !== null && _b !== undefined ? _b : webp(bytes)) !== null && _c !== undefined ? _c : jpeg(bytes);
|
|
157
|
+
return size && size.width > 0 && size.height > 0 ? size : undefined;
|
|
158
|
+
}
|
|
159
|
+
TaImageSize2.of = of;
|
|
160
|
+
function u16be(bytes, at) {
|
|
161
|
+
return bytes[at] << 8 | bytes[at + 1];
|
|
162
|
+
}
|
|
163
|
+
function u16le(bytes, at) {
|
|
164
|
+
return bytes[at] | bytes[at + 1] << 8;
|
|
165
|
+
}
|
|
166
|
+
function u24le(bytes, at) {
|
|
167
|
+
return bytes[at] | bytes[at + 1] << 8 | bytes[at + 2] << 16;
|
|
168
|
+
}
|
|
169
|
+
function u32be(bytes, at) {
|
|
170
|
+
return (bytes[at] << 24 | bytes[at + 1] << 16 | bytes[at + 2] << 8 | bytes[at + 3]) >>> 0;
|
|
171
|
+
}
|
|
172
|
+
function text(bytes, at, length) {
|
|
173
|
+
return String.fromCharCode(...bytes.subarray(at, at + length));
|
|
174
|
+
}
|
|
175
|
+
function png(bytes) {
|
|
176
|
+
return bytes.length >= 24 && bytes[0] === 137 && text(bytes, 1, 3) === "PNG" ? { width: u32be(bytes, 16), height: u32be(bytes, 20) } : undefined;
|
|
177
|
+
}
|
|
178
|
+
function gif(bytes) {
|
|
179
|
+
return bytes.length >= 10 && text(bytes, 0, 3) === "GIF" ? { width: u16le(bytes, 6), height: u16le(bytes, 8) } : undefined;
|
|
180
|
+
}
|
|
181
|
+
function webp(bytes) {
|
|
182
|
+
if (bytes.length < 30 || text(bytes, 0, 4) !== "RIFF" || text(bytes, 8, 4) !== "WEBP") {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
switch (text(bytes, 12, 4)) {
|
|
186
|
+
case "VP8 ":
|
|
187
|
+
return { width: u16le(bytes, 26) & 16383, height: u16le(bytes, 28) & 16383 };
|
|
188
|
+
case "VP8L": {
|
|
189
|
+
const bits = bytes[21] | bytes[22] << 8 | bytes[23] << 16 | bytes[24] << 24;
|
|
190
|
+
return { width: (bits & 16383) + 1, height: (bits >> 14 & 16383) + 1 };
|
|
191
|
+
}
|
|
192
|
+
case "VP8X":
|
|
193
|
+
return { width: u24le(bytes, 24) + 1, height: u24le(bytes, 27) + 1 };
|
|
194
|
+
default:
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
function jpeg(bytes) {
|
|
199
|
+
if (bytes[0] !== 255 || bytes[1] !== 216) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
let at = 2;
|
|
203
|
+
while (at + 9 < bytes.length) {
|
|
204
|
+
if (bytes[at] !== 255) {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
const marker = bytes[at + 1];
|
|
208
|
+
if (marker >= 192 && marker <= 207 && marker !== 196 && marker !== 200 && marker !== 204) {
|
|
209
|
+
return { width: u16be(bytes, at + 7), height: u16be(bytes, at + 5) };
|
|
210
|
+
}
|
|
211
|
+
at += 2 + u16be(bytes, at + 2);
|
|
212
|
+
}
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
})(TaImageSize || (TaImageSize = {}));
|
|
216
|
+
var TaAgentSummary;
|
|
217
|
+
(function(TaAgentSummary2) {
|
|
218
|
+
const START = /^\s*<conversation_history_summary>/;
|
|
219
|
+
const BLOCK = /^\s*<conversation_history_summary>[\s\S]*?(?:<\/conversation_history_summary>\s*|$)/;
|
|
220
|
+
function read(text) {
|
|
221
|
+
if (!START.test(text)) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
return text.replace(/<\/?(?:conversation_history_summary|summary)>/g, "").replace(/<\/?\w*$/, "").trim();
|
|
225
|
+
}
|
|
226
|
+
TaAgentSummary2.read = read;
|
|
227
|
+
function strip(text) {
|
|
228
|
+
return text.replace(BLOCK, "");
|
|
229
|
+
}
|
|
230
|
+
TaAgentSummary2.strip = strip;
|
|
231
|
+
})(TaAgentSummary || (TaAgentSummary = {}));
|
|
232
|
+
var TaSkillUse;
|
|
233
|
+
(function(TaSkillUse2) {
|
|
234
|
+
const BLOCK = /^<skill name="([^"]+)" location="([^"]+)">\n([\s\S]*?)\n<\/skill>(?:\n\n([\s\S]+))?$/;
|
|
235
|
+
function parse(message) {
|
|
236
|
+
var _a;
|
|
237
|
+
const match = BLOCK.exec(message);
|
|
238
|
+
if (!match) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
return { name: match[1], location: match[2], content: match[3], message: ((_a = match[4]) === null || _a === undefined ? undefined : _a.trim()) || undefined };
|
|
242
|
+
}
|
|
243
|
+
TaSkillUse2.parse = parse;
|
|
244
|
+
function command(use) {
|
|
245
|
+
return use.message ? `/skill:${use.name} ${use.message}` : `/skill:${use.name}`;
|
|
246
|
+
}
|
|
247
|
+
TaSkillUse2.command = command;
|
|
248
|
+
})(TaSkillUse || (TaSkillUse = {}));
|
|
249
|
+
var TaTaskNote;
|
|
250
|
+
(function(TaTaskNote2) {
|
|
251
|
+
const NOTE = /^<task_(update|adopted|renamed) ((?:[^>"\n]|"[^"]*")*)>\n?([\s\S]*?)\n?<\/task_\1>$/;
|
|
252
|
+
const ATTRIBUTE = /(\w+)="([^"]*)"/g;
|
|
253
|
+
function write(note) {
|
|
254
|
+
const attributes = [`id="${quote(note.id)}"`];
|
|
255
|
+
if (note.was !== undefined) {
|
|
256
|
+
attributes.push(`was="${quote(note.was)}"`);
|
|
257
|
+
}
|
|
258
|
+
attributes.push(`title="${quote(note.title)}"`);
|
|
259
|
+
if (note.status !== undefined) {
|
|
260
|
+
attributes.push(`status="${quote(note.status)}"`);
|
|
261
|
+
}
|
|
262
|
+
return `<task_${note.kind} ${attributes.join(" ")}>
|
|
263
|
+
${note.body}
|
|
264
|
+
</task_${note.kind}>`;
|
|
265
|
+
}
|
|
266
|
+
TaTaskNote2.write = write;
|
|
267
|
+
function parse(text) {
|
|
268
|
+
const match = NOTE.exec(text.trim());
|
|
269
|
+
if (!match) {
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
const attributes = {};
|
|
273
|
+
for (const [, name, value] of match[2].matchAll(ATTRIBUTE)) {
|
|
274
|
+
attributes[name] = unquote(value);
|
|
275
|
+
}
|
|
276
|
+
if (!attributes.id || attributes.title === undefined) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
const { id, title, status, was } = attributes;
|
|
280
|
+
return { kind: match[1], id, title, ...status ? { status } : {}, ...was ? { was } : {}, body: match[3] };
|
|
281
|
+
}
|
|
282
|
+
TaTaskNote2.parse = parse;
|
|
283
|
+
function quote(text) {
|
|
284
|
+
return text.replace(/&/g, "&").replace(/"/g, """).replace(/\n/g, " ");
|
|
285
|
+
}
|
|
286
|
+
function unquote(text) {
|
|
287
|
+
return text.replace(/"/g, '"').replace(/&/g, "&");
|
|
288
|
+
}
|
|
289
|
+
})(TaTaskNote || (TaTaskNote = {}));
|
|
290
|
+
var TaSecretRef;
|
|
291
|
+
(function(TaSecretRef2) {
|
|
292
|
+
TaSecretRef2.PACKAGE = "@celljs/ta-secrets";
|
|
293
|
+
const REF = /\$\{?TA_SECRET_([A-Z0-9][A-Z0-9_]*)\}?/g;
|
|
294
|
+
const KINDS = [
|
|
295
|
+
[/^PHONE(?:_\d+)?$/, "phone"],
|
|
296
|
+
[/^EMAIL(?:_\d+)?$/, "email"],
|
|
297
|
+
[/^ID_NUMBER(?:_\d+)?$/, "idNumber"],
|
|
298
|
+
[/^BANK_CARD(?:_\d+)?$/, "bankCard"]
|
|
299
|
+
];
|
|
300
|
+
function has(text) {
|
|
301
|
+
return text.includes("TA_SECRET_") && new RegExp(REF.source).test(text);
|
|
302
|
+
}
|
|
303
|
+
TaSecretRef2.has = has;
|
|
304
|
+
function kind(name) {
|
|
305
|
+
var _a;
|
|
306
|
+
var _b;
|
|
307
|
+
return (_b = (_a = KINDS.find(([pattern]) => pattern.test(name))) === null || _a === undefined ? undefined : _a[1]) !== null && _b !== undefined ? _b : "secret";
|
|
308
|
+
}
|
|
309
|
+
TaSecretRef2.kind = kind;
|
|
310
|
+
function split(text) {
|
|
311
|
+
if (!has(text)) {
|
|
312
|
+
return [{ text }];
|
|
313
|
+
}
|
|
314
|
+
const parts = [];
|
|
315
|
+
let at = 0;
|
|
316
|
+
for (const match of text.matchAll(REF)) {
|
|
317
|
+
if (match.index > at) {
|
|
318
|
+
parts.push({ text: text.slice(at, match.index) });
|
|
319
|
+
}
|
|
320
|
+
parts.push({ secret: match[1], kind: kind(match[1]) });
|
|
321
|
+
at = match.index + match[0].length;
|
|
322
|
+
}
|
|
323
|
+
if (at < text.length) {
|
|
324
|
+
parts.push({ text: text.slice(at) });
|
|
325
|
+
}
|
|
326
|
+
return parts;
|
|
327
|
+
}
|
|
328
|
+
TaSecretRef2.split = split;
|
|
329
|
+
function plain(text, label) {
|
|
330
|
+
return has(text) ? text.replace(REF, (_whole, name) => label(name, kind(name))) : text;
|
|
331
|
+
}
|
|
332
|
+
TaSecretRef2.plain = plain;
|
|
333
|
+
})(TaSecretRef || (TaSecretRef = {}));
|
|
334
|
+
|
|
40
335
|
// ../ta-protocol/esm/common/redactor.js
|
|
41
336
|
var REDACTED = "[redacted]";
|
|
42
337
|
var WHOLE = [
|
|
@@ -155,6 +450,255 @@ var RelayAgentCards;
|
|
|
155
450
|
RelayAgentCards2.parse = parse;
|
|
156
451
|
})(RelayAgentCards || (RelayAgentCards = {}));
|
|
157
452
|
|
|
453
|
+
// ../ta-relay/esm/common/relay-faces.js
|
|
454
|
+
var FACE_COUNT = 25;
|
|
455
|
+
var BLUE = "#4285F4";
|
|
456
|
+
var RED = "#EA4335";
|
|
457
|
+
var YELLOW = "#FBBC05";
|
|
458
|
+
var GREEN = "#34A853";
|
|
459
|
+
var MINT = "#5CC27F";
|
|
460
|
+
var ORANGE = "#EE7B3B";
|
|
461
|
+
var VIOLET = "#8C5CF0";
|
|
462
|
+
var CREAM = "#F1DFC0";
|
|
463
|
+
var TEAL = "#26B0A9";
|
|
464
|
+
var PINK = "#F27BA6";
|
|
465
|
+
var LILAC = "#B49CF5";
|
|
466
|
+
var SKY = "#45B5E8";
|
|
467
|
+
var INDIGO = "#5C6BC0";
|
|
468
|
+
var MIST = "#DCE3F0";
|
|
469
|
+
var INK = "#202124";
|
|
470
|
+
var WHITE = "#FFFFFF";
|
|
471
|
+
var CHEEK = "rgba(255, 160, 185, 0.55)";
|
|
472
|
+
var EDGE = "rgba(0, 0, 0, 0.14)";
|
|
473
|
+
var CHEEK_DEEP = "rgba(120, 10, 30, 0.35)";
|
|
474
|
+
var CHEEK_WARM = "rgba(234, 67, 53, 0.4)";
|
|
475
|
+
var LOOKS = [
|
|
476
|
+
{ color: MINT, eye: "#1D3B27", cheek: CHEEK, eyeY: 21, gap: 8 },
|
|
477
|
+
{ color: BLUE, eye: WHITE, cheek: CHEEK, eyeY: 23, gap: 8 },
|
|
478
|
+
{ color: RED, eye: WHITE, cheek: CHEEK_DEEP, eyeY: 22, gap: 8 },
|
|
479
|
+
{ color: CREAM, eye: "#4A3420", cheek: "rgba(240, 120, 120, 0.5)", accent: "#DDBF8E", eyeY: 22, gap: 7.6 },
|
|
480
|
+
{ color: GREEN, eye: WHITE, cheek: CHEEK, eyeY: 19, gap: 7.2 },
|
|
481
|
+
{ color: INDIGO, eye: WHITE, cheek: CHEEK, eyeY: 20, gap: 7.4 },
|
|
482
|
+
{ color: YELLOW, eye: INK, cheek: CHEEK_WARM, accent: "#F29900", eyeY: 24, gap: 8.4 },
|
|
483
|
+
{ color: VIOLET, eye: "#22134A", cheek: CHEEK, eyeY: 20, gap: 8 },
|
|
484
|
+
{ color: MIST, eye: "#2B3245", cheek: CHEEK, eyeY: 19, gap: 7.6 },
|
|
485
|
+
{ color: SKY, eye: WHITE, cheek: CHEEK, eyeY: 21, gap: 6.4 },
|
|
486
|
+
{ color: ORANGE, eye: "#3D1C08", cheek: CHEEK, accent: GREEN, eyeY: 22, gap: 8.6, brows: true },
|
|
487
|
+
{ color: WHITE, eye: WHITE, cheek: CHEEK, accent: INK, mouth: INK, eyeY: 22, gap: 10 },
|
|
488
|
+
{ color: TEAL, eye: WHITE, cheek: CHEEK, accent: "#1B8A84", eyeY: 22.5, gap: 8.4 },
|
|
489
|
+
{ color: PINK, eye: "#4A1428", cheek: "rgba(160, 20, 70, 0.3)", eyeY: 24, gap: 7.4 },
|
|
490
|
+
{ color: LILAC, eye: "#2A1A5E", cheek: CHEEK, eyeY: 25, gap: 8 },
|
|
491
|
+
{ color: YELLOW, eye: INK, cheek: CHEEK_WARM, eyeY: 25, gap: 7.4 },
|
|
492
|
+
{ color: BLUE, eye: WHITE, cheek: CHEEK, eyeY: 19.5, gap: 8 },
|
|
493
|
+
{ color: CREAM, eye: "#4A3420", cheek: "rgba(240, 120, 120, 0.5)", eyeY: 23.5, gap: 8 },
|
|
494
|
+
{ color: GREEN, eye: WHITE, cheek: CHEEK, eyeY: 21, gap: 8 },
|
|
495
|
+
{ color: PINK, eye: "#4A1428", cheek: "rgba(160, 20, 70, 0.3)", eyeY: 19.5, gap: 8.4 },
|
|
496
|
+
{ color: RED, eye: WHITE, cheek: CHEEK_DEEP, accent: "#B3261E", eyeY: 20, gap: 8.4 },
|
|
497
|
+
{ color: SKY, eye: WHITE, cheek: CHEEK, eyeY: 23.5, gap: 8 },
|
|
498
|
+
{ color: VIOLET, eye: WHITE, cheek: CHEEK, accent: "#6B3FD4", eyeY: 22, gap: 8 },
|
|
499
|
+
{ color: TEAL, eye: WHITE, cheek: CHEEK, accent: "#1B8A84", eyeY: 25, gap: 7.6 },
|
|
500
|
+
{ color: MINT, eye: "#1D3B27", cheek: CHEEK, accent: "#4AAE6C", eyeY: 22.5, gap: 9 }
|
|
501
|
+
];
|
|
502
|
+
function corners(count, radius, cx, cy, inner) {
|
|
503
|
+
const points = [];
|
|
504
|
+
const steps = inner ? count * 2 : count;
|
|
505
|
+
for (let index = 0;index < steps; index++) {
|
|
506
|
+
const r = inner && index % 2 === 1 ? inner : radius;
|
|
507
|
+
const angle = -Math.PI / 2 + index * 2 * Math.PI / steps;
|
|
508
|
+
points.push(`${(cx + r * Math.cos(angle)).toFixed(2)},${(cy + r * Math.sin(angle)).toFixed(2)}`);
|
|
509
|
+
}
|
|
510
|
+
return points.join(" ");
|
|
511
|
+
}
|
|
512
|
+
var PENTAGON = corners(5, 13.5, 20, 21.5);
|
|
513
|
+
var HEXAGON = corners(6, 14, 20, 20);
|
|
514
|
+
var STAR = corners(5, 15.5, 20, 21.5, 8.6);
|
|
515
|
+
function node(tag, attrs, children) {
|
|
516
|
+
return children ? { tag, attrs, children } : { tag, attrs };
|
|
517
|
+
}
|
|
518
|
+
function rounded(points, color, width = 5) {
|
|
519
|
+
return node("polygon", { points, fill: color, stroke: color, "stroke-width": width, "stroke-linejoin": "round" });
|
|
520
|
+
}
|
|
521
|
+
function shape(face, look) {
|
|
522
|
+
const { color, accent = color } = look;
|
|
523
|
+
switch (face) {
|
|
524
|
+
case 1:
|
|
525
|
+
return node("g", {}, [
|
|
526
|
+
rounded("7.5,6.5 17,12 8.5,18", color, 4),
|
|
527
|
+
rounded("32.5,6.5 23,12 31.5,18", color, 4),
|
|
528
|
+
node("ellipse", { cx: 20, cy: 23, rx: 14.5, ry: 12.5, fill: color })
|
|
529
|
+
]);
|
|
530
|
+
case 2:
|
|
531
|
+
return rounded(PENTAGON, color);
|
|
532
|
+
case 3:
|
|
533
|
+
return node("g", {}, [
|
|
534
|
+
node("circle", { cx: 9.5, cy: 10.5, r: 5.5, fill: color }),
|
|
535
|
+
node("circle", { cx: 30.5, cy: 10.5, r: 5.5, fill: color }),
|
|
536
|
+
node("circle", { cx: 9.5, cy: 10.5, r: 2.6, fill: accent }),
|
|
537
|
+
node("circle", { cx: 30.5, cy: 10.5, r: 2.6, fill: accent }),
|
|
538
|
+
node("ellipse", { cx: 20, cy: 22.5, rx: 14.5, ry: 13, fill: color })
|
|
539
|
+
]);
|
|
540
|
+
case 4:
|
|
541
|
+
return node("rect", { x: 8.5, y: 4, width: 23, height: 32, rx: 11.5, fill: color });
|
|
542
|
+
case 5:
|
|
543
|
+
return rounded("20,5.5 34.5,20 20,34.5 5.5,20", color, 5.5);
|
|
544
|
+
case 6:
|
|
545
|
+
return node("g", {}, [
|
|
546
|
+
node("ellipse", { cx: 20, cy: 11, rx: 3.2, ry: 3.6, fill: accent }),
|
|
547
|
+
node("path", { d: "M20 12.5c9.2 0 15.5 5.6 15.5 12.4 0 6.4-6.9 10.1-15.5 10.1S4.5 31.3 4.5 24.9C4.5 18.1 10.8 12.5 20 12.5Z", fill: color })
|
|
548
|
+
]);
|
|
549
|
+
case 7:
|
|
550
|
+
return rounded(HEXAGON, color);
|
|
551
|
+
case 8:
|
|
552
|
+
return node("path", {
|
|
553
|
+
d: "M8 19a12 12 0 0 1 24 0v14l-4-3-4 3-4-3-4 3-4-3-4 3Z",
|
|
554
|
+
fill: color,
|
|
555
|
+
stroke: EDGE,
|
|
556
|
+
"stroke-width": 0.8,
|
|
557
|
+
"stroke-linejoin": "round"
|
|
558
|
+
});
|
|
559
|
+
case 9:
|
|
560
|
+
return rounded(STAR, color, 4.5);
|
|
561
|
+
case 10:
|
|
562
|
+
return node("g", {}, [
|
|
563
|
+
node("rect", { x: 18.6, y: 4.5, width: 2.8, height: 7, rx: 1.4, fill: accent }),
|
|
564
|
+
node("ellipse", { cx: 12.5, cy: 23, rx: 8.5, ry: 11, fill: color }),
|
|
565
|
+
node("ellipse", { cx: 27.5, cy: 23, rx: 8.5, ry: 11, fill: color }),
|
|
566
|
+
node("ellipse", { cx: 20, cy: 22.5, rx: 9.5, ry: 12, fill: color })
|
|
567
|
+
]);
|
|
568
|
+
case 11:
|
|
569
|
+
return node("g", {}, [
|
|
570
|
+
node("circle", { cx: 9.5, cy: 10, r: 5, fill: accent }),
|
|
571
|
+
node("circle", { cx: 30.5, cy: 10, r: 5, fill: accent }),
|
|
572
|
+
node("ellipse", { cx: 20, cy: 22.5, rx: 14.5, ry: 13, fill: color, stroke: EDGE, "stroke-width": 0.8 }),
|
|
573
|
+
node("ellipse", { cx: 14.6, cy: 22, rx: 3.6, ry: 4.4, transform: "rotate(20 14.6 22)", fill: accent }),
|
|
574
|
+
node("ellipse", { cx: 25.4, cy: 22, rx: 3.6, ry: 4.4, transform: "rotate(-20 25.4 22)", fill: accent })
|
|
575
|
+
]);
|
|
576
|
+
case 12:
|
|
577
|
+
return node("g", {}, [
|
|
578
|
+
node("rect", { x: 19.1, y: 6, width: 1.8, height: 7, fill: accent }),
|
|
579
|
+
node("circle", { cx: 20, cy: 5, r: 2.2, fill: accent }),
|
|
580
|
+
node("rect", { x: 5.5, y: 12, width: 29, height: 22.5, rx: 6.5, fill: color })
|
|
581
|
+
]);
|
|
582
|
+
case 13:
|
|
583
|
+
return node("path", { d: "M20 4.5c2 0 13 11.6 13 20.2 0 6.4-5.8 10.8-13 10.8S7 31.1 7 24.7C7 16.1 18 4.5 20 4.5Z", fill: color });
|
|
584
|
+
case 14:
|
|
585
|
+
return node("g", {}, [
|
|
586
|
+
node("ellipse", { cx: 14, cy: 10.5, rx: 3.6, ry: 8, transform: "rotate(-8 14 10.5)", fill: color }),
|
|
587
|
+
node("ellipse", { cx: 26, cy: 10.5, rx: 3.6, ry: 8, transform: "rotate(8 26 10.5)", fill: color }),
|
|
588
|
+
node("ellipse", { cx: 20, cy: 25, rx: 14, ry: 11, fill: color })
|
|
589
|
+
]);
|
|
590
|
+
case 15:
|
|
591
|
+
return rounded("20,7 35,33 5,33", color, 6);
|
|
592
|
+
case 16:
|
|
593
|
+
return node("path", {
|
|
594
|
+
d: "M20 6.5l12 4.2v8.4c0 7.4-4.9 12.6-12 15.9-7.1-3.3-12-8.5-12-15.9v-8.4Z",
|
|
595
|
+
fill: color,
|
|
596
|
+
stroke: color,
|
|
597
|
+
"stroke-width": 3,
|
|
598
|
+
"stroke-linejoin": "round"
|
|
599
|
+
});
|
|
600
|
+
case 17:
|
|
601
|
+
return rounded("20,7 32.5,17.5 32.5,33 7.5,33 7.5,17.5", color, 4.5);
|
|
602
|
+
case 18:
|
|
603
|
+
return rounded("14,9 26,9 32.5,32 7.5,32", color, 6);
|
|
604
|
+
case 19:
|
|
605
|
+
return node("rect", { x: 4.5, y: 10.5, width: 31, height: 19.5, rx: 9.75, fill: color });
|
|
606
|
+
case 20:
|
|
607
|
+
return node("g", {}, [
|
|
608
|
+
node("rect", { x: 14, y: 5.5, width: 12, height: 4.5, rx: 1.6, fill: accent }),
|
|
609
|
+
node("rect", { x: 14, y: 30.5, width: 12, height: 4.5, rx: 1.6, fill: accent }),
|
|
610
|
+
node("ellipse", { cx: 20, cy: 20.25, rx: 15, ry: 12.25, fill: color })
|
|
611
|
+
]);
|
|
612
|
+
case 21:
|
|
613
|
+
return node("g", {}, [
|
|
614
|
+
node("circle", { cx: 13.5, cy: 21.5, r: 7, fill: color }),
|
|
615
|
+
node("circle", { cx: 21.5, cy: 16.5, r: 9, fill: color }),
|
|
616
|
+
node("circle", { cx: 28.5, cy: 22.5, r: 6.5, fill: color }),
|
|
617
|
+
node("rect", { x: 5.5, y: 21, width: 29, height: 12, rx: 6, fill: color })
|
|
618
|
+
]);
|
|
619
|
+
case 22:
|
|
620
|
+
return node("g", {}, [
|
|
621
|
+
node("rect", { x: 12.5, y: 5.5, width: 15, height: 5.5, rx: 2, fill: accent }),
|
|
622
|
+
node("rect", { x: 7.5, y: 9.5, width: 25, height: 25.5, rx: 6.5, fill: color })
|
|
623
|
+
]);
|
|
624
|
+
case 23:
|
|
625
|
+
return node("g", {}, [
|
|
626
|
+
node("rect", { x: 18.8, y: 3.5, width: 2.4, height: 6, rx: 1.2, fill: accent }),
|
|
627
|
+
node("circle", { cx: 20, cy: 13, r: 6.5, fill: color }),
|
|
628
|
+
node("circle", { cx: 20, cy: 25, r: 11.5, fill: color })
|
|
629
|
+
]);
|
|
630
|
+
case 24:
|
|
631
|
+
return node("g", {}, [
|
|
632
|
+
node("circle", { cx: 12, cy: 13, r: 5.5, fill: color }),
|
|
633
|
+
node("circle", { cx: 28, cy: 13, r: 5.5, fill: color }),
|
|
634
|
+
node("circle", { cx: 12, cy: 13, r: 2.2, fill: accent }),
|
|
635
|
+
node("circle", { cx: 28, cy: 13, r: 2.2, fill: accent }),
|
|
636
|
+
node("ellipse", { cx: 20, cy: 23.5, rx: 15.5, ry: 11.5, fill: color })
|
|
637
|
+
]);
|
|
638
|
+
default:
|
|
639
|
+
return node("circle", { cx: 20, cy: 21, r: 14.5, fill: color });
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
var FaceUtil;
|
|
643
|
+
(function(FaceUtil2) {
|
|
644
|
+
function of(seed) {
|
|
645
|
+
let hash = 0;
|
|
646
|
+
for (const char of seed) {
|
|
647
|
+
hash = hash * 31 + char.charCodeAt(0) | 0;
|
|
648
|
+
}
|
|
649
|
+
return Math.abs(hash) % FACE_COUNT;
|
|
650
|
+
}
|
|
651
|
+
FaceUtil2.of = of;
|
|
652
|
+
function pick(face, seed = "") {
|
|
653
|
+
return face !== undefined && face >= 0 && face < FACE_COUNT ? Math.floor(face) : of(seed);
|
|
654
|
+
}
|
|
655
|
+
FaceUtil2.pick = pick;
|
|
656
|
+
function color(face) {
|
|
657
|
+
var _a;
|
|
658
|
+
return ((_a = LOOKS[face]) !== null && _a !== undefined ? _a : LOOKS[0]).color;
|
|
659
|
+
}
|
|
660
|
+
FaceUtil2.color = color;
|
|
661
|
+
function art(face) {
|
|
662
|
+
var _a, _b;
|
|
663
|
+
const look = (_a = LOOKS[face]) !== null && _a !== undefined ? _a : LOOKS[0];
|
|
664
|
+
const half = look.gap / 2;
|
|
665
|
+
const eyeW = 4.1;
|
|
666
|
+
const eyeH = 4.9;
|
|
667
|
+
const top = look.eyeY - eyeH / 2;
|
|
668
|
+
const cheekY = look.eyeY + 3.6;
|
|
669
|
+
const cheekX = half + 2.2;
|
|
670
|
+
const mouthY = look.eyeY + 3.4;
|
|
671
|
+
const features = [
|
|
672
|
+
node("g", { fill: look.cheek }, [
|
|
673
|
+
node("ellipse", { cx: 20 - cheekX, cy: cheekY, rx: 2.2, ry: 1.25 }),
|
|
674
|
+
node("ellipse", { cx: 20 + cheekX, cy: cheekY, rx: 2.2, ry: 1.25 })
|
|
675
|
+
])
|
|
676
|
+
];
|
|
677
|
+
if (look.brows) {
|
|
678
|
+
features.push(node("path", {
|
|
679
|
+
d: `M${20 - half - 3.4} ${top - 2.6}l3.6 1.6M${20 + half + 3.4} ${top - 2.6}l-3.6 1.6`,
|
|
680
|
+
stroke: look.eye,
|
|
681
|
+
"stroke-width": 1.4,
|
|
682
|
+
"stroke-linecap": "round",
|
|
683
|
+
fill: "none"
|
|
684
|
+
}));
|
|
685
|
+
}
|
|
686
|
+
features.push(node("g", { class: "ta-face-eyes", fill: look.eye }, [
|
|
687
|
+
node("rect", { x: 20 - half - eyeW / 2, y: top, width: eyeW, height: eyeH, rx: eyeW / 2 }),
|
|
688
|
+
node("rect", { x: 20 + half - eyeW / 2, y: top, width: eyeW, height: eyeH, rx: eyeW / 2 })
|
|
689
|
+
]), node("path", {
|
|
690
|
+
d: `M18.1 ${mouthY}q.95 1.25 1.9 0q.95 1.25 1.9 0`,
|
|
691
|
+
fill: "none",
|
|
692
|
+
stroke: (_b = look.mouth) !== null && _b !== undefined ? _b : look.eye,
|
|
693
|
+
"stroke-width": 1.1,
|
|
694
|
+
"stroke-linecap": "round",
|
|
695
|
+
"stroke-linejoin": "round"
|
|
696
|
+
}));
|
|
697
|
+
return node("g", { class: "ta-face-body" }, [shape(face, look), node("g", { class: "ta-face-look" }, features)]);
|
|
698
|
+
}
|
|
699
|
+
FaceUtil2.art = art;
|
|
700
|
+
})(FaceUtil || (FaceUtil = {}));
|
|
701
|
+
|
|
158
702
|
// web-src/channels-model.ts
|
|
159
703
|
var NAME = "@celljs/ta-channels";
|
|
160
704
|
var AGENT_MARK = "one of the agents of Ta";
|
|
@@ -177,7 +721,7 @@ var MAX_HOPS = 3;
|
|
|
177
721
|
var MAX_REPLIES = 8;
|
|
178
722
|
var MAX_AGENT_REPLIES = 2;
|
|
179
723
|
var MAX_MESSAGES = 200;
|
|
180
|
-
var FACES =
|
|
724
|
+
var FACES = FACE_COUNT;
|
|
181
725
|
var MAX_MEMBERS = 12;
|
|
182
726
|
var DEFAULT_ROLE = "You help the user with what they ask, as a colleague who takes on the work and does it.";
|
|
183
727
|
var CONTEXT_MESSAGES = 12;
|
|
@@ -612,13 +1156,15 @@ var AgentCards;
|
|
|
612
1156
|
function adapt(cwd, language) {
|
|
613
1157
|
const context = [
|
|
614
1158
|
AgentCards.MARK,
|
|
615
|
-
`You were just added to this Ta from a card someone shared: the role in your instructions is theirs, written for their own work. Fit it to the project of your directory (${cwd}): look at it first (its README, manifests such as package.json, its layout, how it builds and tests), then rewrite your role for it, keeping what you are for, and save it with update_my_role. Then tell the user
|
|
1159
|
+
`You were just added to this Ta from a card someone shared: the role in your instructions is theirs, written for their own work. Fit it to the project of your directory (${cwd}): look at it first (its README, manifests such as package.json, its layout, how it builds and tests), then rewrite your role for it, keeping what you are for, and save it with update_my_role. Then tell the user, in ${TaLanguageUtil.pick(language, { "zh-CN": "Chinese", "zh-TW": "Traditional Chinese", "en-US": "English", "ja-JP": "Japanese" })}, what you changed and what you can do here. Change no files.`
|
|
616
1160
|
].join(`
|
|
617
1161
|
`);
|
|
618
|
-
return
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
1162
|
+
return TaMessageContext.wrap(context, TaLanguageUtil.pick(language, {
|
|
1163
|
+
"zh-CN": "看看这个项目,把你的职责调整得贴合这里",
|
|
1164
|
+
"zh-TW": "看看這個專案,把你的職責調整得貼合這裡",
|
|
1165
|
+
"en-US": "Look at this project and fit your role to it",
|
|
1166
|
+
"ja-JP": "このプロジェクトを見て、ロールをそれに適応させてください"
|
|
1167
|
+
}));
|
|
622
1168
|
}
|
|
623
1169
|
AgentCards.adapt = adapt;
|
|
624
1170
|
})(AgentCards ||= {});
|
|
@@ -630,300 +1176,19 @@ function bind(react) {
|
|
|
630
1176
|
}
|
|
631
1177
|
|
|
632
1178
|
// web-src/faces.tsx
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
var MINT = "#5CC27F";
|
|
638
|
-
var ORANGE = "#EE7B3B";
|
|
639
|
-
var VIOLET = "#8C5CF0";
|
|
640
|
-
var CREAM = "#F1DFC0";
|
|
641
|
-
var TEAL = "#26B0A9";
|
|
642
|
-
var PINK = "#F27BA6";
|
|
643
|
-
var LILAC = "#B49CF5";
|
|
644
|
-
var SKY = "#45B5E8";
|
|
645
|
-
var INDIGO = "#5C6BC0";
|
|
646
|
-
var MIST = "#DCE3F0";
|
|
647
|
-
var INK = "#202124";
|
|
648
|
-
var WHITE = "#FFFFFF";
|
|
649
|
-
var CHEEK = "rgba(255, 160, 185, 0.55)";
|
|
650
|
-
var EDGE = "rgba(0, 0, 0, 0.14)";
|
|
651
|
-
var CHEEK_DEEP = "rgba(120, 10, 30, 0.35)";
|
|
652
|
-
var CHEEK_WARM = "rgba(234, 67, 53, 0.4)";
|
|
653
|
-
var LOOKS = [
|
|
654
|
-
{ color: MINT, eye: "#1D3B27", cheek: CHEEK, eyeY: 21, gap: 8 },
|
|
655
|
-
{ color: BLUE, eye: WHITE, cheek: CHEEK, eyeY: 23, gap: 8 },
|
|
656
|
-
{ color: RED, eye: WHITE, cheek: CHEEK_DEEP, eyeY: 22, gap: 8 },
|
|
657
|
-
{ color: CREAM, eye: "#4A3420", cheek: "rgba(240, 120, 120, 0.5)", accent: "#DDBF8E", eyeY: 22, gap: 7.6 },
|
|
658
|
-
{ color: GREEN, eye: WHITE, cheek: CHEEK, eyeY: 19, gap: 7.2 },
|
|
659
|
-
{ color: INDIGO, eye: WHITE, cheek: CHEEK, eyeY: 20, gap: 7.4 },
|
|
660
|
-
{ color: YELLOW, eye: INK, cheek: CHEEK_WARM, accent: "#F29900", eyeY: 24, gap: 8.4 },
|
|
661
|
-
{ color: VIOLET, eye: "#22134A", cheek: CHEEK, eyeY: 20, gap: 8 },
|
|
662
|
-
{ color: MIST, eye: "#2B3245", cheek: CHEEK, eyeY: 19, gap: 7.6 },
|
|
663
|
-
{ color: SKY, eye: WHITE, cheek: CHEEK, eyeY: 21, gap: 6.4 },
|
|
664
|
-
{ color: ORANGE, eye: "#3D1C08", cheek: CHEEK, accent: GREEN, eyeY: 22, gap: 8.6, brows: true },
|
|
665
|
-
{ color: WHITE, eye: WHITE, cheek: CHEEK, accent: INK, mouth: INK, eyeY: 22, gap: 10 },
|
|
666
|
-
{ color: TEAL, eye: WHITE, cheek: CHEEK, accent: "#1B8A84", eyeY: 22.5, gap: 8.4 },
|
|
667
|
-
{ color: PINK, eye: "#4A1428", cheek: "rgba(160, 20, 70, 0.3)", eyeY: 24, gap: 7.4 },
|
|
668
|
-
{ color: LILAC, eye: "#2A1A5E", cheek: CHEEK, eyeY: 25, gap: 8 },
|
|
669
|
-
{ color: YELLOW, eye: INK, cheek: CHEEK_WARM, eyeY: 25, gap: 7.4 }
|
|
670
|
-
];
|
|
671
|
-
function corners(count, radius, cx, cy, inner) {
|
|
672
|
-
const points = [];
|
|
673
|
-
const steps = inner ? count * 2 : count;
|
|
674
|
-
for (let index = 0;index < steps; index++) {
|
|
675
|
-
const r = inner && index % 2 === 1 ? inner : radius;
|
|
676
|
-
const angle = -Math.PI / 2 + index * 2 * Math.PI / steps;
|
|
677
|
-
points.push(`${(cx + r * Math.cos(angle)).toFixed(2)},${(cy + r * Math.sin(angle)).toFixed(2)}`);
|
|
678
|
-
}
|
|
679
|
-
return points.join(" ");
|
|
680
|
-
}
|
|
681
|
-
var PENTAGON = corners(5, 13.5, 20, 21.5);
|
|
682
|
-
var HEXAGON = corners(6, 14, 20, 20);
|
|
683
|
-
var STAR = corners(5, 15.5, 20, 21.5, 8.6);
|
|
684
|
-
function Rounded({ points, color, width = 5 }) {
|
|
685
|
-
return /* @__PURE__ */ React.createElement("polygon", {
|
|
686
|
-
points,
|
|
687
|
-
fill: color,
|
|
688
|
-
stroke: color,
|
|
689
|
-
strokeWidth: width,
|
|
690
|
-
strokeLinejoin: "round"
|
|
691
|
-
});
|
|
692
|
-
}
|
|
693
|
-
function shape(face, look) {
|
|
694
|
-
const { color, accent = color } = look;
|
|
695
|
-
switch (face) {
|
|
696
|
-
case 1:
|
|
697
|
-
return /* @__PURE__ */ React.createElement("g", null, /* @__PURE__ */ React.createElement(Rounded, {
|
|
698
|
-
points: "7.5,6.5 17,12 8.5,18",
|
|
699
|
-
color,
|
|
700
|
-
width: 4
|
|
701
|
-
}), /* @__PURE__ */ React.createElement(Rounded, {
|
|
702
|
-
points: "32.5,6.5 23,12 31.5,18",
|
|
703
|
-
color,
|
|
704
|
-
width: 4
|
|
705
|
-
}), /* @__PURE__ */ React.createElement("ellipse", {
|
|
706
|
-
cx: "20",
|
|
707
|
-
cy: "23",
|
|
708
|
-
rx: "14.5",
|
|
709
|
-
ry: "12.5",
|
|
710
|
-
fill: color
|
|
711
|
-
}));
|
|
712
|
-
case 2:
|
|
713
|
-
return /* @__PURE__ */ React.createElement(Rounded, {
|
|
714
|
-
points: PENTAGON,
|
|
715
|
-
color
|
|
716
|
-
});
|
|
717
|
-
case 3:
|
|
718
|
-
return /* @__PURE__ */ React.createElement("g", null, /* @__PURE__ */ React.createElement("circle", {
|
|
719
|
-
cx: "9.5",
|
|
720
|
-
cy: "10.5",
|
|
721
|
-
r: "5.5",
|
|
722
|
-
fill: color
|
|
723
|
-
}), /* @__PURE__ */ React.createElement("circle", {
|
|
724
|
-
cx: "30.5",
|
|
725
|
-
cy: "10.5",
|
|
726
|
-
r: "5.5",
|
|
727
|
-
fill: color
|
|
728
|
-
}), /* @__PURE__ */ React.createElement("circle", {
|
|
729
|
-
cx: "9.5",
|
|
730
|
-
cy: "10.5",
|
|
731
|
-
r: "2.6",
|
|
732
|
-
fill: accent
|
|
733
|
-
}), /* @__PURE__ */ React.createElement("circle", {
|
|
734
|
-
cx: "30.5",
|
|
735
|
-
cy: "10.5",
|
|
736
|
-
r: "2.6",
|
|
737
|
-
fill: accent
|
|
738
|
-
}), /* @__PURE__ */ React.createElement("ellipse", {
|
|
739
|
-
cx: "20",
|
|
740
|
-
cy: "22.5",
|
|
741
|
-
rx: "14.5",
|
|
742
|
-
ry: "13",
|
|
743
|
-
fill: color
|
|
744
|
-
}));
|
|
745
|
-
case 4:
|
|
746
|
-
return /* @__PURE__ */ React.createElement("rect", {
|
|
747
|
-
x: "8.5",
|
|
748
|
-
y: "4",
|
|
749
|
-
width: "23",
|
|
750
|
-
height: "32",
|
|
751
|
-
rx: "11.5",
|
|
752
|
-
fill: color
|
|
753
|
-
});
|
|
754
|
-
case 5:
|
|
755
|
-
return /* @__PURE__ */ React.createElement(Rounded, {
|
|
756
|
-
points: "20,5.5 34.5,20 20,34.5 5.5,20",
|
|
757
|
-
color,
|
|
758
|
-
width: 5.5
|
|
759
|
-
});
|
|
760
|
-
case 6:
|
|
761
|
-
return /* @__PURE__ */ React.createElement("g", null, /* @__PURE__ */ React.createElement("ellipse", {
|
|
762
|
-
cx: "20",
|
|
763
|
-
cy: "11",
|
|
764
|
-
rx: "3.2",
|
|
765
|
-
ry: "3.6",
|
|
766
|
-
fill: accent
|
|
767
|
-
}), /* @__PURE__ */ React.createElement("path", {
|
|
768
|
-
d: "M20 12.5c9.2 0 15.5 5.6 15.5 12.4 0 6.4-6.9 10.1-15.5 10.1S4.5 31.3 4.5 24.9C4.5 18.1 10.8 12.5 20 12.5Z",
|
|
769
|
-
fill: color
|
|
770
|
-
}));
|
|
771
|
-
case 7:
|
|
772
|
-
return /* @__PURE__ */ React.createElement(Rounded, {
|
|
773
|
-
points: HEXAGON,
|
|
774
|
-
color
|
|
775
|
-
});
|
|
776
|
-
case 8:
|
|
777
|
-
return /* @__PURE__ */ React.createElement("path", {
|
|
778
|
-
d: "M8 19a12 12 0 0 1 24 0v14l-4-3-4 3-4-3-4 3-4-3-4 3Z",
|
|
779
|
-
fill: color,
|
|
780
|
-
stroke: EDGE,
|
|
781
|
-
strokeWidth: "0.8",
|
|
782
|
-
strokeLinejoin: "round"
|
|
783
|
-
});
|
|
784
|
-
case 9:
|
|
785
|
-
return /* @__PURE__ */ React.createElement(Rounded, {
|
|
786
|
-
points: STAR,
|
|
787
|
-
color,
|
|
788
|
-
width: 4.5
|
|
789
|
-
});
|
|
790
|
-
case 10:
|
|
791
|
-
return /* @__PURE__ */ React.createElement("g", null, /* @__PURE__ */ React.createElement("rect", {
|
|
792
|
-
x: "18.6",
|
|
793
|
-
y: "4.5",
|
|
794
|
-
width: "2.8",
|
|
795
|
-
height: "7",
|
|
796
|
-
rx: "1.4",
|
|
797
|
-
fill: accent
|
|
798
|
-
}), /* @__PURE__ */ React.createElement("ellipse", {
|
|
799
|
-
cx: "12.5",
|
|
800
|
-
cy: "23",
|
|
801
|
-
rx: "8.5",
|
|
802
|
-
ry: "11",
|
|
803
|
-
fill: color
|
|
804
|
-
}), /* @__PURE__ */ React.createElement("ellipse", {
|
|
805
|
-
cx: "27.5",
|
|
806
|
-
cy: "23",
|
|
807
|
-
rx: "8.5",
|
|
808
|
-
ry: "11",
|
|
809
|
-
fill: color
|
|
810
|
-
}), /* @__PURE__ */ React.createElement("ellipse", {
|
|
811
|
-
cx: "20",
|
|
812
|
-
cy: "22.5",
|
|
813
|
-
rx: "9.5",
|
|
814
|
-
ry: "12",
|
|
815
|
-
fill: color
|
|
816
|
-
}));
|
|
817
|
-
case 11:
|
|
818
|
-
return /* @__PURE__ */ React.createElement("g", null, /* @__PURE__ */ React.createElement("circle", {
|
|
819
|
-
cx: "9.5",
|
|
820
|
-
cy: "10",
|
|
821
|
-
r: "5",
|
|
822
|
-
fill: accent
|
|
823
|
-
}), /* @__PURE__ */ React.createElement("circle", {
|
|
824
|
-
cx: "30.5",
|
|
825
|
-
cy: "10",
|
|
826
|
-
r: "5",
|
|
827
|
-
fill: accent
|
|
828
|
-
}), /* @__PURE__ */ React.createElement("ellipse", {
|
|
829
|
-
cx: "20",
|
|
830
|
-
cy: "22.5",
|
|
831
|
-
rx: "14.5",
|
|
832
|
-
ry: "13",
|
|
833
|
-
fill: color,
|
|
834
|
-
stroke: EDGE,
|
|
835
|
-
strokeWidth: "0.8"
|
|
836
|
-
}), /* @__PURE__ */ React.createElement("ellipse", {
|
|
837
|
-
cx: "14.6",
|
|
838
|
-
cy: "22",
|
|
839
|
-
rx: "3.6",
|
|
840
|
-
ry: "4.4",
|
|
841
|
-
transform: "rotate(20 14.6 22)",
|
|
842
|
-
fill: accent
|
|
843
|
-
}), /* @__PURE__ */ React.createElement("ellipse", {
|
|
844
|
-
cx: "25.4",
|
|
845
|
-
cy: "22",
|
|
846
|
-
rx: "3.6",
|
|
847
|
-
ry: "4.4",
|
|
848
|
-
transform: "rotate(-20 25.4 22)",
|
|
849
|
-
fill: accent
|
|
850
|
-
}));
|
|
851
|
-
case 12:
|
|
852
|
-
return /* @__PURE__ */ React.createElement("g", null, /* @__PURE__ */ React.createElement("rect", {
|
|
853
|
-
x: "19.1",
|
|
854
|
-
y: "6",
|
|
855
|
-
width: "1.8",
|
|
856
|
-
height: "7",
|
|
857
|
-
fill: accent
|
|
858
|
-
}), /* @__PURE__ */ React.createElement("circle", {
|
|
859
|
-
cx: "20",
|
|
860
|
-
cy: "5",
|
|
861
|
-
r: "2.2",
|
|
862
|
-
fill: accent
|
|
863
|
-
}), /* @__PURE__ */ React.createElement("rect", {
|
|
864
|
-
x: "5.5",
|
|
865
|
-
y: "12",
|
|
866
|
-
width: "29",
|
|
867
|
-
height: "22.5",
|
|
868
|
-
rx: "6.5",
|
|
869
|
-
fill: color
|
|
870
|
-
}));
|
|
871
|
-
case 13:
|
|
872
|
-
return /* @__PURE__ */ React.createElement("path", {
|
|
873
|
-
d: "M20 4.5c2 0 13 11.6 13 20.2 0 6.4-5.8 10.8-13 10.8S7 31.1 7 24.7C7 16.1 18 4.5 20 4.5Z",
|
|
874
|
-
fill: color
|
|
875
|
-
});
|
|
876
|
-
case 14:
|
|
877
|
-
return /* @__PURE__ */ React.createElement("g", null, /* @__PURE__ */ React.createElement("ellipse", {
|
|
878
|
-
cx: "14",
|
|
879
|
-
cy: "10.5",
|
|
880
|
-
rx: "3.6",
|
|
881
|
-
ry: "8",
|
|
882
|
-
transform: "rotate(-8 14 10.5)",
|
|
883
|
-
fill: color
|
|
884
|
-
}), /* @__PURE__ */ React.createElement("ellipse", {
|
|
885
|
-
cx: "26",
|
|
886
|
-
cy: "10.5",
|
|
887
|
-
rx: "3.6",
|
|
888
|
-
ry: "8",
|
|
889
|
-
transform: "rotate(8 26 10.5)",
|
|
890
|
-
fill: color
|
|
891
|
-
}), /* @__PURE__ */ React.createElement("ellipse", {
|
|
892
|
-
cx: "20",
|
|
893
|
-
cy: "25",
|
|
894
|
-
rx: "14",
|
|
895
|
-
ry: "11",
|
|
896
|
-
fill: color
|
|
897
|
-
}));
|
|
898
|
-
case 15:
|
|
899
|
-
return /* @__PURE__ */ React.createElement(Rounded, {
|
|
900
|
-
points: "20,7 35,33 5,33",
|
|
901
|
-
color,
|
|
902
|
-
width: 6
|
|
903
|
-
});
|
|
904
|
-
default:
|
|
905
|
-
return /* @__PURE__ */ React.createElement("circle", {
|
|
906
|
-
cx: "20",
|
|
907
|
-
cy: "21",
|
|
908
|
-
r: "14.5",
|
|
909
|
-
fill: color
|
|
910
|
-
});
|
|
1179
|
+
function draw(node2, key) {
|
|
1180
|
+
const props = {};
|
|
1181
|
+
for (const [name, value] of Object.entries(node2.attrs)) {
|
|
1182
|
+
props[name === "class" ? "className" : name.replace(/-(\w)/g, (_, letter) => letter.toUpperCase())] = value;
|
|
911
1183
|
}
|
|
1184
|
+
return React.createElement(node2.tag, { ...props, key }, ...(node2.children ?? []).map((child, index) => draw(child, index)));
|
|
912
1185
|
}
|
|
913
1186
|
function faceColor(face) {
|
|
914
|
-
return (
|
|
1187
|
+
return FaceUtil.color(face);
|
|
915
1188
|
}
|
|
916
1189
|
function Face({ face, size, working }) {
|
|
917
|
-
const look = LOOKS[face] ?? LOOKS[0];
|
|
918
|
-
const half = look.gap / 2;
|
|
919
|
-
const eyeW = 4.1;
|
|
920
|
-
const eyeH = 4.9;
|
|
921
|
-
const top = look.eyeY - eyeH / 2;
|
|
922
|
-
const cheekY = look.eyeY + 3.6;
|
|
923
|
-
const cheekX = half + 2.2;
|
|
924
|
-
const mouthY = look.eyeY + 3.4;
|
|
925
1190
|
return /* @__PURE__ */ React.createElement("span", {
|
|
926
|
-
className: `
|
|
1191
|
+
className: `ta-face${working ? " ta-face-working" : ""}`,
|
|
927
1192
|
style: { width: size, height: size },
|
|
928
1193
|
"data-face": face,
|
|
929
1194
|
"aria-hidden": "true"
|
|
@@ -933,51 +1198,7 @@ function Face({ face, size, working }) {
|
|
|
933
1198
|
height: size,
|
|
934
1199
|
focusable: "false",
|
|
935
1200
|
"aria-hidden": "true"
|
|
936
|
-
},
|
|
937
|
-
className: "tac-face-body"
|
|
938
|
-
}, shape(face, look), /* @__PURE__ */ React.createElement("g", {
|
|
939
|
-
className: "tac-face-look"
|
|
940
|
-
}, /* @__PURE__ */ React.createElement("g", {
|
|
941
|
-
fill: look.cheek
|
|
942
|
-
}, /* @__PURE__ */ React.createElement("ellipse", {
|
|
943
|
-
cx: 20 - cheekX,
|
|
944
|
-
cy: cheekY,
|
|
945
|
-
rx: "2.2",
|
|
946
|
-
ry: "1.25"
|
|
947
|
-
}), /* @__PURE__ */ React.createElement("ellipse", {
|
|
948
|
-
cx: 20 + cheekX,
|
|
949
|
-
cy: cheekY,
|
|
950
|
-
rx: "2.2",
|
|
951
|
-
ry: "1.25"
|
|
952
|
-
})), look.brows && /* @__PURE__ */ React.createElement("path", {
|
|
953
|
-
d: `M${20 - half - 3.4} ${top - 2.6}l3.6 1.6M${20 + half + 3.4} ${top - 2.6}l-3.6 1.6`,
|
|
954
|
-
stroke: look.eye,
|
|
955
|
-
strokeWidth: "1.4",
|
|
956
|
-
strokeLinecap: "round",
|
|
957
|
-
fill: "none"
|
|
958
|
-
}), /* @__PURE__ */ React.createElement("g", {
|
|
959
|
-
className: "tac-face-eyes",
|
|
960
|
-
fill: look.eye
|
|
961
|
-
}, /* @__PURE__ */ React.createElement("rect", {
|
|
962
|
-
x: 20 - half - eyeW / 2,
|
|
963
|
-
y: top,
|
|
964
|
-
width: eyeW,
|
|
965
|
-
height: eyeH,
|
|
966
|
-
rx: eyeW / 2
|
|
967
|
-
}), /* @__PURE__ */ React.createElement("rect", {
|
|
968
|
-
x: 20 + half - eyeW / 2,
|
|
969
|
-
y: top,
|
|
970
|
-
width: eyeW,
|
|
971
|
-
height: eyeH,
|
|
972
|
-
rx: eyeW / 2
|
|
973
|
-
})), /* @__PURE__ */ React.createElement("path", {
|
|
974
|
-
d: `M18.1 ${mouthY}q.95 1.25 1.9 0q.95 1.25 1.9 0`,
|
|
975
|
-
fill: "none",
|
|
976
|
-
stroke: look.mouth ?? look.eye,
|
|
977
|
-
strokeWidth: "1.1",
|
|
978
|
-
strokeLinecap: "round",
|
|
979
|
-
strokeLinejoin: "round"
|
|
980
|
-
})))));
|
|
1201
|
+
}, draw(FaceUtil.art(face))));
|
|
981
1202
|
}
|
|
982
1203
|
function RoomFace({ members, faces, size, working }) {
|
|
983
1204
|
const [lead, next] = members;
|
|
@@ -1017,11 +1238,12 @@ function RoomFace({ members, faces, size, working }) {
|
|
|
1017
1238
|
// web-src/i18n-ja.ts
|
|
1018
1239
|
var JA = {
|
|
1019
1240
|
title: "分身",
|
|
1020
|
-
channels: "
|
|
1241
|
+
channels: "グループチャット",
|
|
1021
1242
|
agents: "エージェント",
|
|
1022
|
-
newChannel: "
|
|
1243
|
+
newChannel: "新しいグループチャット",
|
|
1023
1244
|
newAgent: "新しいエージェント",
|
|
1024
1245
|
scan: "スキャン",
|
|
1246
|
+
addFriend: "友だち追加",
|
|
1025
1247
|
name: "名前",
|
|
1026
1248
|
role: "役割",
|
|
1027
1249
|
rolePlaceholder: "それが何をするか、どのように行うか、それへの指示として記述",
|
|
@@ -1030,9 +1252,9 @@ var JA = {
|
|
|
1030
1252
|
addMembers: "メンバーを追加",
|
|
1031
1253
|
makeExtension: "拡張機能にする",
|
|
1032
1254
|
makeExtensionDetail: "ここで作成されたものを工具にする",
|
|
1033
|
-
makeExtensionAsk: "
|
|
1255
|
+
makeExtensionAsk: "このグループチャットで作成された事項を拡張機能にする(ta-package スキルで)、将来は 1 クリックで再利用可能",
|
|
1034
1256
|
add: "追加",
|
|
1035
|
-
allMembers: "
|
|
1257
|
+
allMembers: "すべてのエージェントがこのグループチャットに既に含まれています",
|
|
1036
1258
|
membersHint: "最初に選択したメンバーがリーダー:誰も @ で指定されていないメッセージに答えます。",
|
|
1037
1259
|
create: "作成",
|
|
1038
1260
|
cancel: "キャンセル",
|
|
@@ -1042,11 +1264,11 @@ var JA = {
|
|
|
1042
1264
|
owner: "オーナー",
|
|
1043
1265
|
ta: "Ta",
|
|
1044
1266
|
lead: "リーダー",
|
|
1045
|
-
empty: "
|
|
1267
|
+
empty: "まだグループチャットがありません",
|
|
1046
1268
|
emptyHint: "Ta にチームを組ませるか、+ をクリックして作成",
|
|
1047
1269
|
noAgents: "まだエージェントがありません",
|
|
1048
|
-
noAgentsHint: "
|
|
1049
|
-
pick: "
|
|
1270
|
+
noAgentsHint: "グループチャットはエージェントで構成されます:最初に 1 つ作成",
|
|
1271
|
+
pick: "グループチャットを選択",
|
|
1050
1272
|
quiet: "まだメッセージがありません。@ でメンバーを指定するか、リーダーが回答します。",
|
|
1051
1273
|
placeholder: "{channel} に送信;@ でメンバーを指定",
|
|
1052
1274
|
answering: "{name} が回答中",
|
|
@@ -1058,13 +1280,27 @@ var JA = {
|
|
|
1058
1280
|
new: "新規",
|
|
1059
1281
|
answeringIn: "#{channel} で回答中",
|
|
1060
1282
|
answeringNow: "{name} が回答中…",
|
|
1061
|
-
noMatch: "
|
|
1283
|
+
noMatch: "一致するエージェントまたはグループチャットがありません",
|
|
1062
1284
|
noMessages: "まだメッセージがありません",
|
|
1063
1285
|
noAgentsYet: "まだエージェントがありません",
|
|
1064
1286
|
noAgentsYetHint: "+ で作成するか、Ta にチームを組ませて",
|
|
1287
|
+
partners: "仲間",
|
|
1288
|
+
groupsSection: "グループチャット",
|
|
1289
|
+
agentsSection: "エージェント",
|
|
1290
|
+
noPartners: "まだ仲間がいません",
|
|
1291
|
+
noPartnersHint: "+ でエージェントやグループチャットを作るか、友だちを追加して",
|
|
1292
|
+
inviteFriends: "友だちを招待",
|
|
1293
|
+
noFriends: "まだ友だちがいません",
|
|
1294
|
+
shareGroup: "共有グループチャットにする",
|
|
1295
|
+
shareGroupHint: "同じ名前のグループチャットを作り、選んだ友だちと中継で暗号化して共有します。エージェントも一緒に入ります。ここの履歴はこのコンピュータに残り、友だちには送られません。",
|
|
1296
|
+
sharedMade: "「{name}」を友だちと共有しました。参加するとすぐ入れます。",
|
|
1297
|
+
addFriends: "友だちを追加",
|
|
1298
|
+
friend: "友だち",
|
|
1299
|
+
sharedHint: "友だちがいると、グループチャットは中継で暗号化して共有されます。友だちは参加するとすぐ入れ、エージェントは @ で呼ばれたときだけ答えます。",
|
|
1300
|
+
sharedNeedsRooms: "友だちとグループチャットを作るには Ta を更新してください。",
|
|
1065
1301
|
myDouble: "私の分身",
|
|
1066
1302
|
memberCount: "{count} 人のメンバー",
|
|
1067
|
-
channel: "
|
|
1303
|
+
channel: "グループチャット",
|
|
1068
1304
|
newAgentName: "新しいエージェント",
|
|
1069
1305
|
notStarted: "まだ開始されていません",
|
|
1070
1306
|
editAgent: "名前とアバターを変更",
|
|
@@ -1080,19 +1316,19 @@ var JA = {
|
|
|
1080
1316
|
addCount: "{count} 人を追加",
|
|
1081
1317
|
makeLead: "リーダーに設定",
|
|
1082
1318
|
leadHint: "誰も指定されていないメッセージに回答します",
|
|
1083
|
-
mute: "
|
|
1319
|
+
mute: "ミュート:このグループチャットのメッセージに答えません",
|
|
1084
1320
|
unmute: "もう一度回答させる",
|
|
1085
1321
|
muted: "ミュート中",
|
|
1086
1322
|
replying: "回答中…",
|
|
1087
1323
|
reset: "新しいセッション:それが言われたことを忘れます",
|
|
1088
1324
|
resetDone: "{name} は次に回答するときに新しいセッションから始まります。",
|
|
1089
|
-
remove: "
|
|
1090
|
-
onlyMember: "
|
|
1325
|
+
remove: "グループチャットから削除",
|
|
1326
|
+
onlyMember: "グループチャットには最低 1 人のメンバーを保つ必要があります",
|
|
1091
1327
|
open: "そのセッションを開く",
|
|
1092
|
-
deleteChannel: "
|
|
1328
|
+
deleteChannel: "グループチャットを削除",
|
|
1093
1329
|
confirmDelete: "#{channel} とそのすべてのメッセージを削除しますか?",
|
|
1094
1330
|
delete: "削除",
|
|
1095
|
-
noChannel: "
|
|
1331
|
+
noChannel: "グループチャットを開いてそのメンバーを確認",
|
|
1096
1332
|
more: "その他",
|
|
1097
1333
|
stop: "停止",
|
|
1098
1334
|
stoppedAgent: "{name} を停止しました。",
|
|
@@ -1108,18 +1344,18 @@ var JA = {
|
|
|
1108
1344
|
copied: "{path} をコピーしました",
|
|
1109
1345
|
exportChat: "会話をエクスポート(Markdown)",
|
|
1110
1346
|
nothingToExport: "{name} はまだ何も言っていません。",
|
|
1111
|
-
joinChannel: "
|
|
1112
|
-
noChannelToJoin: "
|
|
1347
|
+
joinChannel: "グループチャットに追加",
|
|
1348
|
+
noChannelToJoin: "すべてのグループチャットに既に含まれています",
|
|
1113
1349
|
joined: "{name} が #{channel} に参加しました。",
|
|
1114
1350
|
deleteAgent: "削除",
|
|
1115
|
-
confirmDeleteAgent: "{name}
|
|
1351
|
+
confirmDeleteAgent: "{name} を削除しますか?それはそのグループチャットから削除され、それだけのグループチャットも削除されます;セッションファイルは保持されます。",
|
|
1116
1352
|
pin: "ピン留め",
|
|
1117
1353
|
unpin: "ピン留めを解除",
|
|
1118
1354
|
pinned: "ピン留めされています",
|
|
1119
1355
|
markUnread: "未読にマーク",
|
|
1120
1356
|
markRead: "既読にマーク",
|
|
1121
1357
|
editTopic: "トピックを編集",
|
|
1122
|
-
topicPlaceholder: "
|
|
1358
|
+
topicPlaceholder: "このグループチャットの目的",
|
|
1123
1359
|
renameChannel: "#{channel} の名前を変更",
|
|
1124
1360
|
stopAnswering: "回答を停止",
|
|
1125
1361
|
stoppedChannel: "#{channel} で回答中のメンバーを停止しました。",
|
|
@@ -1129,16 +1365,17 @@ var JA = {
|
|
|
1129
1365
|
building: "チームを構築中…",
|
|
1130
1366
|
openInMain: "メイン領域で開く",
|
|
1131
1367
|
openInMainHint: "チーム自体と話す",
|
|
1132
|
-
keepMembers: "
|
|
1133
|
-
keptMembers: "{names}
|
|
1134
|
-
keep: "
|
|
1135
|
-
kept: "{name}
|
|
1136
|
-
temporary: "Ta
|
|
1368
|
+
keepMembers: "メンバーをエージェントとして保存",
|
|
1369
|
+
keptMembers: "{names} を保存しました。仲間のエージェントから話しかけたり、グループチャットに招いたりできます。",
|
|
1370
|
+
keep: "エージェントとして保存",
|
|
1371
|
+
kept: "{name} を保存しました。仲間のエージェントから話しかけたり、グループチャットに招いたりできます。",
|
|
1372
|
+
temporary: "Ta がこのタスクのために一時的に作成;保存すると仲間のエージェントに入ります",
|
|
1137
1373
|
temporaryTag: "一時的",
|
|
1138
1374
|
tasks: "タスク",
|
|
1375
|
+
decideSection: "あなたの判断待ち",
|
|
1139
1376
|
membersSection: "メンバー",
|
|
1140
1377
|
byDirectory: "ディレクトリでグループ化",
|
|
1141
|
-
channelsSection: "
|
|
1378
|
+
channelsSection: "グループチャット",
|
|
1142
1379
|
showAll: "全 {count} 件を表示",
|
|
1143
1380
|
showFewer: "表示を減らす",
|
|
1144
1381
|
waitingCount: "{count} 件があなたを待っています",
|
|
@@ -1150,12 +1387,12 @@ var JA = {
|
|
|
1150
1387
|
deleteTaskHint: "#{channel} のメッセージは削除されます。チームメンバーはあなたのメンバーに留まります。",
|
|
1151
1388
|
selectTasks: "選択",
|
|
1152
1389
|
toolCreateAgent: "エージェントを作成",
|
|
1153
|
-
toolCreateChannel: "
|
|
1154
|
-
toolAddToChannel: "
|
|
1390
|
+
toolCreateChannel: "グループチャットを作成",
|
|
1391
|
+
toolAddToChannel: "グループチャットに追加",
|
|
1155
1392
|
toolPostToChannel: "投稿",
|
|
1156
1393
|
toolHandOff: "ハンドオフ",
|
|
1157
1394
|
handOff: "ハンドオフ先…",
|
|
1158
|
-
handOffDetail: "
|
|
1395
|
+
handOffDetail: "エージェントまたはグループチャットが続ける",
|
|
1159
1396
|
handedTo: "{to} にハンドオフされました",
|
|
1160
1397
|
handOffOpen: "開く",
|
|
1161
1398
|
toolListChannels: "チームを表示",
|
|
@@ -1172,7 +1409,7 @@ var JA = {
|
|
|
1172
1409
|
|
|
1173
1410
|
### 対応
|
|
1174
1411
|
- [ ] `,
|
|
1175
|
-
noticeHint: "
|
|
1412
|
+
noticeHint: "このグループチャットが決定した事項、合意、対応:各メンバーはメッセージの度に読んで従います。。メンバーは話し合いで決まったことを自分で更新します。",
|
|
1176
1413
|
noticeUpdated: "{name} がお知らせを更新しました",
|
|
1177
1414
|
noticeCleared: "{name} がお知らせを削除しました",
|
|
1178
1415
|
noticeShow: "お知らせを表示",
|
|
@@ -1183,13 +1420,9 @@ var JA = {
|
|
|
1183
1420
|
shareCard: "カードを共有…",
|
|
1184
1421
|
cardTitle: "{name} のカード",
|
|
1185
1422
|
cardKind: "エージェントカード",
|
|
1186
|
-
|
|
1187
|
-
cardHint: "
|
|
1423
|
+
cardGets: "相手は自分のエージェントとして追加し、自分のプロジェクトに合わせて役割を調整します",
|
|
1424
|
+
cardHint: "役割のみ(秘密のように見えるものは除去)、ディレクトリと会話は含まれません。リンクは 30 日間有効で、このコンピューターがオフでも開けます。",
|
|
1188
1425
|
cardRedacted: "役割に {n} 箇所の秘密のように見えるものが除去されました。",
|
|
1189
|
-
copyLink: "リンクをコピー",
|
|
1190
|
-
linkCopied: "コピーしました",
|
|
1191
|
-
sendLink: "送信",
|
|
1192
|
-
stopCard: "共有を停止",
|
|
1193
1426
|
cardStopped: "カードのリンクは機能しなくなりました。",
|
|
1194
1427
|
cardOpening: "カードを開いています…",
|
|
1195
1428
|
cardAddTo: "作業ディレクトリ:{dir}",
|
|
@@ -1204,11 +1437,12 @@ var JA = {
|
|
|
1204
1437
|
// web-src/i18n-zh.ts
|
|
1205
1438
|
var ZH = {
|
|
1206
1439
|
title: "分身",
|
|
1207
|
-
channels: "
|
|
1440
|
+
channels: "群聊",
|
|
1208
1441
|
agents: "智能体",
|
|
1209
|
-
newChannel: "
|
|
1442
|
+
newChannel: "新建群聊",
|
|
1210
1443
|
newAgent: "新建智能体",
|
|
1211
1444
|
scan: "扫一扫",
|
|
1445
|
+
addFriend: "加好友",
|
|
1212
1446
|
name: "名字",
|
|
1213
1447
|
role: "职责",
|
|
1214
1448
|
rolePlaceholder: "它做什么、怎么做,写成给它的指示",
|
|
@@ -1217,9 +1451,9 @@ var ZH = {
|
|
|
1217
1451
|
addMembers: "添加成员",
|
|
1218
1452
|
makeExtension: "做成扩展",
|
|
1219
1453
|
makeExtensionDetail: "把这里商量出的事做成工具",
|
|
1220
|
-
makeExtensionAsk: "
|
|
1454
|
+
makeExtensionAsk: "把这个群聊里商量和做成的事做成扩展(用 ta-package 技能),以后一键就能再用",
|
|
1221
1455
|
add: "添加",
|
|
1222
|
-
allMembers: "
|
|
1456
|
+
allMembers: "所有智能体都已在这个群聊里",
|
|
1223
1457
|
membersHint: "先选的成员是负责人:没人被 @ 的消息由它回答。",
|
|
1224
1458
|
create: "创建",
|
|
1225
1459
|
cancel: "取消",
|
|
@@ -1229,11 +1463,11 @@ var ZH = {
|
|
|
1229
1463
|
owner: "所有者",
|
|
1230
1464
|
ta: "Ta",
|
|
1231
1465
|
lead: "负责人",
|
|
1232
|
-
empty: "
|
|
1466
|
+
empty: "还没有群聊",
|
|
1233
1467
|
emptyHint: "让 Ta 组个团队,或点 + 新建",
|
|
1234
1468
|
noAgents: "还没有智能体",
|
|
1235
|
-
noAgentsHint: "
|
|
1236
|
-
pick: "
|
|
1469
|
+
noAgentsHint: "群聊由智能体组成,先新建一个",
|
|
1470
|
+
pick: "选一个群聊",
|
|
1237
1471
|
quiet: "还没有消息。用 @ 点名成员,不点名就由负责人回答。",
|
|
1238
1472
|
placeholder: "发到 {channel};@ 点名成员",
|
|
1239
1473
|
answering: "{name} 正在回答",
|
|
@@ -1245,13 +1479,27 @@ var ZH = {
|
|
|
1245
1479
|
new: "新建",
|
|
1246
1480
|
answeringIn: "正在 #{channel} 回答",
|
|
1247
1481
|
answeringNow: "{name} 正在回答…",
|
|
1248
|
-
noMatch: "
|
|
1482
|
+
noMatch: "没有匹配的智能体或群聊",
|
|
1249
1483
|
noMessages: "还没有消息",
|
|
1250
1484
|
noAgentsYet: "还没有智能体",
|
|
1251
1485
|
noAgentsYetHint: "点 + 新建,或让 Ta 组个团队",
|
|
1486
|
+
partners: "伙伴",
|
|
1487
|
+
groupsSection: "群聊",
|
|
1488
|
+
agentsSection: "智能体",
|
|
1489
|
+
noPartners: "还没有伙伴",
|
|
1490
|
+
noPartnersHint: "点 + 新建智能体或群聊,或加个好友",
|
|
1491
|
+
inviteFriends: "邀请好友",
|
|
1492
|
+
noFriends: "还没有好友",
|
|
1493
|
+
shareGroup: "建成共享群聊",
|
|
1494
|
+
shareGroupHint: "会新建一个同名的群聊,经中继加密和你选的好友共享,群里的智能体一起进去;这里的聊天记录留在本机,不发给好友。",
|
|
1495
|
+
sharedMade: "已和好友共享「{name}」:好友点加入就进来。",
|
|
1496
|
+
addFriends: "添加好友",
|
|
1497
|
+
friend: "好友",
|
|
1498
|
+
sharedHint: "有好友时,群聊经中继加密同步:好友点加入就进来;智能体只回答 @ 它的消息。",
|
|
1499
|
+
sharedNeedsRooms: "先把 Ta 更新到新版,才能和好友建群聊。",
|
|
1252
1500
|
myDouble: "我的分身",
|
|
1253
1501
|
memberCount: "{count} 位成员",
|
|
1254
|
-
channel: "
|
|
1502
|
+
channel: "群聊",
|
|
1255
1503
|
newAgentName: "新智能体",
|
|
1256
1504
|
notStarted: "还没开工",
|
|
1257
1505
|
editAgent: "修改名字和头像",
|
|
@@ -1261,25 +1509,25 @@ var ZH = {
|
|
|
1261
1509
|
channelNamePlaceholder: "例如:官网改版",
|
|
1262
1510
|
addAgents: "添加智能体",
|
|
1263
1511
|
searchAgents: "搜索智能体,选择 1–{max} 个",
|
|
1264
|
-
showMembers: "
|
|
1512
|
+
showMembers: "群聊成员",
|
|
1265
1513
|
canAdd: "还能添加 {count} 个智能体",
|
|
1266
1514
|
findAgent: "搜索智能体",
|
|
1267
1515
|
addCount: "添加 {count} 位",
|
|
1268
1516
|
makeLead: "设为负责人",
|
|
1269
1517
|
leadHint: "回答没有 @ 任何人的消息",
|
|
1270
|
-
mute: "
|
|
1518
|
+
mute: "免打扰:不回答这个群聊的消息",
|
|
1271
1519
|
unmute: "取消免打扰",
|
|
1272
1520
|
muted: "免打扰",
|
|
1273
1521
|
replying: "正在回答…",
|
|
1274
1522
|
reset: "重开会话:忘掉之前的对话",
|
|
1275
1523
|
resetDone: "{name} 下次回答时会从新会话开始。",
|
|
1276
|
-
remove: "
|
|
1277
|
-
onlyMember: "
|
|
1524
|
+
remove: "移出群聊",
|
|
1525
|
+
onlyMember: "群聊至少要留一位成员",
|
|
1278
1526
|
open: "打开它的会话",
|
|
1279
|
-
deleteChannel: "
|
|
1527
|
+
deleteChannel: "删除群聊",
|
|
1280
1528
|
confirmDelete: "删除 #{channel} 和它的全部消息?",
|
|
1281
1529
|
delete: "删除",
|
|
1282
|
-
noChannel: "
|
|
1530
|
+
noChannel: "打开群聊后,这里显示它的成员",
|
|
1283
1531
|
more: "更多",
|
|
1284
1532
|
stop: "停止",
|
|
1285
1533
|
stoppedAgent: "已停止 {name}。",
|
|
@@ -1295,18 +1543,18 @@ var ZH = {
|
|
|
1295
1543
|
copied: "已复制 {path}",
|
|
1296
1544
|
exportChat: "导出对话(Markdown)",
|
|
1297
1545
|
nothingToExport: "{name} 还没有说过话。",
|
|
1298
|
-
joinChannel: "
|
|
1299
|
-
noChannelToJoin: "
|
|
1546
|
+
joinChannel: "加入群聊",
|
|
1547
|
+
noChannelToJoin: "它已经在所有群聊里了",
|
|
1300
1548
|
joined: "{name} 已加入 #{channel}。",
|
|
1301
1549
|
deleteAgent: "删除",
|
|
1302
|
-
confirmDeleteAgent: "删除 {name}
|
|
1550
|
+
confirmDeleteAgent: "删除 {name}?它会退出所在的群聊,只剩它一个成员的群聊也会一起删除;会话文件会保留。",
|
|
1303
1551
|
pin: "置顶",
|
|
1304
1552
|
unpin: "取消置顶",
|
|
1305
1553
|
pinned: "已置顶",
|
|
1306
1554
|
markUnread: "标为未读",
|
|
1307
1555
|
markRead: "标为已读",
|
|
1308
1556
|
editTopic: "修改主题",
|
|
1309
|
-
topicPlaceholder: "
|
|
1557
|
+
topicPlaceholder: "这个群聊是做什么的",
|
|
1310
1558
|
renameChannel: "重命名 #{channel}",
|
|
1311
1559
|
stopAnswering: "停止回答",
|
|
1312
1560
|
stoppedChannel: "已让 #{channel} 里正在回答的成员停下。",
|
|
@@ -1316,16 +1564,17 @@ var ZH = {
|
|
|
1316
1564
|
building: "正在组建团队…",
|
|
1317
1565
|
openInMain: "在主区打开",
|
|
1318
1566
|
openInMainHint: "亲自和团队对话",
|
|
1319
|
-
keepMembers: "
|
|
1320
|
-
keptMembers: "{names}
|
|
1321
|
-
keep: "
|
|
1322
|
-
kept: "{name}
|
|
1323
|
-
temporary: "Ta
|
|
1567
|
+
keepMembers: "把成员存成智能体",
|
|
1568
|
+
keptMembers: "{names} 已存成智能体:在伙伴的智能体里,可以和它对话、拉进群聊。",
|
|
1569
|
+
keep: "存成智能体",
|
|
1570
|
+
kept: "{name} 已存成智能体:在伙伴的智能体里,可以和它对话、拉进群聊。",
|
|
1571
|
+
temporary: "Ta 为这个任务临时建的;存下后在伙伴的智能体里",
|
|
1324
1572
|
temporaryTag: "临时",
|
|
1325
1573
|
tasks: "任务",
|
|
1574
|
+
decideSection: "待你决定",
|
|
1326
1575
|
membersSection: "成员",
|
|
1327
1576
|
byDirectory: "按目录分组",
|
|
1328
|
-
channelsSection: "
|
|
1577
|
+
channelsSection: "群聊",
|
|
1329
1578
|
showAll: "显示全部 {count} 个",
|
|
1330
1579
|
showFewer: "收起",
|
|
1331
1580
|
waitingCount: "{count} 个待你处理",
|
|
@@ -1337,12 +1586,12 @@ var ZH = {
|
|
|
1337
1586
|
deleteTaskHint: "#{channel} 的消息会一起删除,团队成员会留在你的成员里。",
|
|
1338
1587
|
selectTasks: "多选",
|
|
1339
1588
|
toolCreateAgent: "新建智能体",
|
|
1340
|
-
toolCreateChannel: "
|
|
1341
|
-
toolAddToChannel: "
|
|
1342
|
-
toolPostToChannel: "
|
|
1589
|
+
toolCreateChannel: "新建群聊",
|
|
1590
|
+
toolAddToChannel: "拉进群聊",
|
|
1591
|
+
toolPostToChannel: "发到群聊",
|
|
1343
1592
|
toolHandOff: "交给",
|
|
1344
1593
|
handOff: "交给…",
|
|
1345
|
-
handOffDetail: "
|
|
1594
|
+
handOffDetail: "让智能体或群聊接着做",
|
|
1346
1595
|
handedTo: "已交给 {to}",
|
|
1347
1596
|
handOffOpen: "打开",
|
|
1348
1597
|
toolListChannels: "查看团队",
|
|
@@ -1359,7 +1608,7 @@ var ZH = {
|
|
|
1359
1608
|
|
|
1360
1609
|
### 待办
|
|
1361
1610
|
- [ ] `,
|
|
1362
|
-
noticeHint: "
|
|
1611
|
+
noticeHint: "这个群聊定下的事、约定和待办:每个成员每次回答都会读到并照着做,讨论定下新的事时成员会自己更新。",
|
|
1363
1612
|
noticeUpdated: "{name} 更新了公告",
|
|
1364
1613
|
noticeCleared: "{name} 撤下了公告",
|
|
1365
1614
|
noticeShow: "展开公告",
|
|
@@ -1370,13 +1619,9 @@ var ZH = {
|
|
|
1370
1619
|
shareCard: "分享名片…",
|
|
1371
1620
|
cardTitle: "{name} 的名片",
|
|
1372
1621
|
cardKind: "智能体名片",
|
|
1373
|
-
|
|
1374
|
-
cardHint: "
|
|
1622
|
+
cardGets: "对方把它加为自己的智能体,并按自己的项目调整职责",
|
|
1623
|
+
cardHint: "只带上职责(隐去疑似密钥),不带工作目录和对话。链接 30 天内有效,你的电脑关机也能打开。",
|
|
1375
1624
|
cardRedacted: "职责里有 {n} 处疑似密钥已隐去。",
|
|
1376
|
-
copyLink: "复制链接",
|
|
1377
|
-
linkCopied: "已复制",
|
|
1378
|
-
sendLink: "发送",
|
|
1379
|
-
stopCard: "停止分享",
|
|
1380
1625
|
cardStopped: "名片链接已失效。",
|
|
1381
1626
|
cardOpening: "正在打开名片…",
|
|
1382
1627
|
cardAddTo: "工作目录:{dir}",
|
|
@@ -1391,11 +1636,12 @@ var ZH = {
|
|
|
1391
1636
|
// web-src/i18n-zh-tw.ts
|
|
1392
1637
|
var ZH_TW = {
|
|
1393
1638
|
title: "分身",
|
|
1394
|
-
channels: "
|
|
1639
|
+
channels: "群聊",
|
|
1395
1640
|
agents: "智慧體",
|
|
1396
|
-
newChannel: "
|
|
1641
|
+
newChannel: "新建群聊",
|
|
1397
1642
|
newAgent: "新建智慧體",
|
|
1398
1643
|
scan: "掃一掃",
|
|
1644
|
+
addFriend: "加好友",
|
|
1399
1645
|
name: "名字",
|
|
1400
1646
|
role: "職責",
|
|
1401
1647
|
rolePlaceholder: "它做什麼、怎麼做,寫成給它的指示",
|
|
@@ -1404,9 +1650,9 @@ var ZH_TW = {
|
|
|
1404
1650
|
addMembers: "新增成員",
|
|
1405
1651
|
makeExtension: "做成擴充功能",
|
|
1406
1652
|
makeExtensionDetail: "把這裡商量出的事做成工具",
|
|
1407
|
-
makeExtensionAsk: "
|
|
1653
|
+
makeExtensionAsk: "把這個群聊里商量和做成的事做成擴充功能(用 ta-package 技能),以後一鍵就能再用",
|
|
1408
1654
|
add: "新增",
|
|
1409
|
-
allMembers: "
|
|
1655
|
+
allMembers: "所有智慧體都已在這個群聊里",
|
|
1410
1656
|
membersHint: "先選的成員是負責人:沒人被 @ 的訊息由它回答。",
|
|
1411
1657
|
create: "建立",
|
|
1412
1658
|
cancel: "取消",
|
|
@@ -1416,11 +1662,11 @@ var ZH_TW = {
|
|
|
1416
1662
|
owner: "所有者",
|
|
1417
1663
|
ta: "Ta",
|
|
1418
1664
|
lead: "負責人",
|
|
1419
|
-
empty: "
|
|
1665
|
+
empty: "還沒有群聊",
|
|
1420
1666
|
emptyHint: "讓 Ta 組個團隊,或點 + 新建",
|
|
1421
1667
|
noAgents: "還沒有智慧體",
|
|
1422
|
-
noAgentsHint: "
|
|
1423
|
-
pick: "
|
|
1668
|
+
noAgentsHint: "群聊由智慧體組成,先新建一個",
|
|
1669
|
+
pick: "選一個群聊",
|
|
1424
1670
|
quiet: "還沒有訊息。用 @ 點名成員,不點名就由負責人回答。",
|
|
1425
1671
|
placeholder: "發到 {channel};@ 點名成員",
|
|
1426
1672
|
answering: "{name} 正在回答",
|
|
@@ -1432,13 +1678,27 @@ var ZH_TW = {
|
|
|
1432
1678
|
new: "新建",
|
|
1433
1679
|
answeringIn: "正在 #{channel} 回答",
|
|
1434
1680
|
answeringNow: "{name} 正在回答…",
|
|
1435
|
-
noMatch: "
|
|
1681
|
+
noMatch: "沒有匹配的智慧體或群聊",
|
|
1436
1682
|
noMessages: "還沒有訊息",
|
|
1437
1683
|
noAgentsYet: "還沒有智慧體",
|
|
1438
1684
|
noAgentsYetHint: "點 + 新建,或讓 Ta 組個團隊",
|
|
1685
|
+
partners: "夥伴",
|
|
1686
|
+
groupsSection: "群聊",
|
|
1687
|
+
agentsSection: "智慧體",
|
|
1688
|
+
noPartners: "還沒有夥伴",
|
|
1689
|
+
noPartnersHint: "點 + 新建智慧體或群聊,或加個好友",
|
|
1690
|
+
inviteFriends: "邀請好友",
|
|
1691
|
+
noFriends: "還沒有好友",
|
|
1692
|
+
shareGroup: "建成共享群聊",
|
|
1693
|
+
shareGroupHint: "會新建一個同名的群聊,經中繼加密和你選的好友共享,群裡的智慧體一起進去;這裡的聊天記錄留在本機,不發給好友。",
|
|
1694
|
+
sharedMade: "已和好友共享「{name}」:好友點加入就進來。",
|
|
1695
|
+
addFriends: "新增好友",
|
|
1696
|
+
friend: "好友",
|
|
1697
|
+
sharedHint: "有好友時,群聊經中繼加密同步:好友點加入就進來;智慧體只回答 @ 它的訊息。",
|
|
1698
|
+
sharedNeedsRooms: "先把 Ta 更新到新版,才能和好友建群聊。",
|
|
1439
1699
|
myDouble: "我的分身",
|
|
1440
1700
|
memberCount: "{count} 位成員",
|
|
1441
|
-
channel: "
|
|
1701
|
+
channel: "群聊",
|
|
1442
1702
|
newAgentName: "新智慧體",
|
|
1443
1703
|
notStarted: "還沒開工",
|
|
1444
1704
|
editAgent: "修改名字和頭像",
|
|
@@ -1448,25 +1708,25 @@ var ZH_TW = {
|
|
|
1448
1708
|
channelNamePlaceholder: "例如:官網改版",
|
|
1449
1709
|
addAgents: "新增智慧體",
|
|
1450
1710
|
searchAgents: "搜尋智慧體,選擇 1–{max} 個",
|
|
1451
|
-
showMembers: "
|
|
1711
|
+
showMembers: "群聊成員",
|
|
1452
1712
|
canAdd: "還能新增 {count} 個智慧體",
|
|
1453
1713
|
findAgent: "搜尋智慧體",
|
|
1454
1714
|
addCount: "新增 {count} 位",
|
|
1455
1715
|
makeLead: "設為負責人",
|
|
1456
1716
|
leadHint: "回答沒有 @ 任何人的訊息",
|
|
1457
|
-
mute: "
|
|
1717
|
+
mute: "免打擾:不回答這個群聊的訊息",
|
|
1458
1718
|
unmute: "取消免打擾",
|
|
1459
1719
|
muted: "免打擾",
|
|
1460
1720
|
replying: "正在回答…",
|
|
1461
1721
|
reset: "重開會話:忘掉之前的對話",
|
|
1462
1722
|
resetDone: "{name} 下次回答時會從新會話開始。",
|
|
1463
|
-
remove: "
|
|
1464
|
-
onlyMember: "
|
|
1723
|
+
remove: "移出群聊",
|
|
1724
|
+
onlyMember: "群聊至少要留一位成員",
|
|
1465
1725
|
open: "開啟它的會話",
|
|
1466
|
-
deleteChannel: "
|
|
1726
|
+
deleteChannel: "刪除群聊",
|
|
1467
1727
|
confirmDelete: "刪除 #{channel} 和它的全部訊息?",
|
|
1468
1728
|
delete: "刪除",
|
|
1469
|
-
noChannel: "
|
|
1729
|
+
noChannel: "開啟群聊後,這裡顯示它的成員",
|
|
1470
1730
|
more: "更多",
|
|
1471
1731
|
stop: "停止",
|
|
1472
1732
|
stoppedAgent: "已停止 {name}。",
|
|
@@ -1482,18 +1742,18 @@ var ZH_TW = {
|
|
|
1482
1742
|
copied: "已複製 {path}",
|
|
1483
1743
|
exportChat: "匯出對話(Markdown)",
|
|
1484
1744
|
nothingToExport: "{name} 還沒有說過話。",
|
|
1485
|
-
joinChannel: "
|
|
1486
|
-
noChannelToJoin: "
|
|
1745
|
+
joinChannel: "加入群聊",
|
|
1746
|
+
noChannelToJoin: "它已經在所有群聊里了",
|
|
1487
1747
|
joined: "{name} 已加入 #{channel}。",
|
|
1488
1748
|
deleteAgent: "刪除",
|
|
1489
|
-
confirmDeleteAgent: "刪除 {name}
|
|
1749
|
+
confirmDeleteAgent: "刪除 {name}?它會退出所在的群聊,只剩它一個成員的群聊也會一起刪除;會話檔案會保留。",
|
|
1490
1750
|
pin: "置頂",
|
|
1491
1751
|
unpin: "取消置頂",
|
|
1492
1752
|
pinned: "已置頂",
|
|
1493
1753
|
markUnread: "標為未讀",
|
|
1494
1754
|
markRead: "標為已讀",
|
|
1495
1755
|
editTopic: "修改主題",
|
|
1496
|
-
topicPlaceholder: "
|
|
1756
|
+
topicPlaceholder: "這個群聊是做什麼的",
|
|
1497
1757
|
renameChannel: "重新命名 #{channel}",
|
|
1498
1758
|
stopAnswering: "停止回答",
|
|
1499
1759
|
stoppedChannel: "已讓 #{channel} 里正在回答的成員停下。",
|
|
@@ -1503,16 +1763,17 @@ var ZH_TW = {
|
|
|
1503
1763
|
building: "正在組建團隊…",
|
|
1504
1764
|
openInMain: "在主區開啟",
|
|
1505
1765
|
openInMainHint: "親自和團隊對話",
|
|
1506
|
-
keepMembers: "
|
|
1507
|
-
keptMembers: "{names}
|
|
1508
|
-
keep: "
|
|
1509
|
-
kept: "{name}
|
|
1510
|
-
temporary: "Ta
|
|
1766
|
+
keepMembers: "把成員存成智慧體",
|
|
1767
|
+
keptMembers: "{names} 已存成智慧體:在夥伴的智慧體裡,可以和它對話、拉進群聊。",
|
|
1768
|
+
keep: "存成智慧體",
|
|
1769
|
+
kept: "{name} 已存成智慧體:在夥伴的智慧體裡,可以和它對話、拉進群聊。",
|
|
1770
|
+
temporary: "Ta 為這個任務臨時建立的;存下後在夥伴的智慧體裡",
|
|
1511
1771
|
temporaryTag: "臨時",
|
|
1512
1772
|
tasks: "任務",
|
|
1773
|
+
decideSection: "待你決定",
|
|
1513
1774
|
membersSection: "成員",
|
|
1514
1775
|
byDirectory: "按目錄分組",
|
|
1515
|
-
channelsSection: "
|
|
1776
|
+
channelsSection: "群聊",
|
|
1516
1777
|
showAll: "顯示全部 {count} 個",
|
|
1517
1778
|
showFewer: "收起",
|
|
1518
1779
|
waitingCount: "{count} 個待你處理",
|
|
@@ -1524,12 +1785,12 @@ var ZH_TW = {
|
|
|
1524
1785
|
deleteTaskHint: "#{channel} 的訊息會一起刪除,團隊成員會留在你的成員裡。",
|
|
1525
1786
|
selectTasks: "多選",
|
|
1526
1787
|
toolCreateAgent: "新建智慧體",
|
|
1527
|
-
toolCreateChannel: "
|
|
1528
|
-
toolAddToChannel: "
|
|
1529
|
-
toolPostToChannel: "
|
|
1788
|
+
toolCreateChannel: "新建群聊",
|
|
1789
|
+
toolAddToChannel: "拉進群聊",
|
|
1790
|
+
toolPostToChannel: "發到群聊",
|
|
1530
1791
|
toolHandOff: "交給",
|
|
1531
1792
|
handOff: "交給…",
|
|
1532
|
-
handOffDetail: "
|
|
1793
|
+
handOffDetail: "讓智慧體或群聊接著做",
|
|
1533
1794
|
handedTo: "已交給 {to}",
|
|
1534
1795
|
handOffOpen: "開啟",
|
|
1535
1796
|
toolListChannels: "檢視團隊",
|
|
@@ -1546,7 +1807,7 @@ var ZH_TW = {
|
|
|
1546
1807
|
|
|
1547
1808
|
### 待辦
|
|
1548
1809
|
- [ ] `,
|
|
1549
|
-
noticeHint: "
|
|
1810
|
+
noticeHint: "這個群聊定下的事、約定和待辦:每個成員每次回答都會讀到並照著做,討論定下新的事時成員會自己更新。",
|
|
1550
1811
|
noticeUpdated: "{name} 更新了公告",
|
|
1551
1812
|
noticeCleared: "{name} 撤下了公告",
|
|
1552
1813
|
noticeShow: "展開公告",
|
|
@@ -1557,13 +1818,9 @@ var ZH_TW = {
|
|
|
1557
1818
|
shareCard: "分享名片…",
|
|
1558
1819
|
cardTitle: "{name} 的名片",
|
|
1559
1820
|
cardKind: "智慧體名片",
|
|
1560
|
-
|
|
1561
|
-
cardHint: "
|
|
1821
|
+
cardGets: "對方把它加為自己的智慧體,並按自己的專案調整職責",
|
|
1822
|
+
cardHint: "只帶上職責(隱去疑似金鑰),不帶工作目錄和對話。連結 30 天內有效,你的電腦關機也能開啟。",
|
|
1562
1823
|
cardRedacted: "職責裡有 {n} 處疑似金鑰已隱去。",
|
|
1563
|
-
copyLink: "複製連結",
|
|
1564
|
-
linkCopied: "已複製",
|
|
1565
|
-
sendLink: "傳送",
|
|
1566
|
-
stopCard: "停止分享",
|
|
1567
1824
|
cardStopped: "名片連結已失效。",
|
|
1568
1825
|
cardOpening: "正在開啟名片…",
|
|
1569
1826
|
cardAddTo: "工作目錄:{dir}",
|
|
@@ -1578,11 +1835,12 @@ var ZH_TW = {
|
|
|
1578
1835
|
// web-src/i18n.ts
|
|
1579
1836
|
var EN = {
|
|
1580
1837
|
title: "Double",
|
|
1581
|
-
channels: "
|
|
1838
|
+
channels: "Group chats",
|
|
1582
1839
|
agents: "Agents",
|
|
1583
|
-
newChannel: "New
|
|
1840
|
+
newChannel: "New group chat",
|
|
1584
1841
|
newAgent: "New agent",
|
|
1585
1842
|
scan: "Scan",
|
|
1843
|
+
addFriend: "Add friend",
|
|
1586
1844
|
name: "Name",
|
|
1587
1845
|
role: "Role",
|
|
1588
1846
|
rolePlaceholder: "What it does and how, as instructions to it",
|
|
@@ -1591,9 +1849,9 @@ var EN = {
|
|
|
1591
1849
|
addMembers: "Add members",
|
|
1592
1850
|
makeExtension: "Make an extension",
|
|
1593
1851
|
makeExtensionDetail: "Of what was worked out here",
|
|
1594
|
-
makeExtensionAsk: "Make what this
|
|
1852
|
+
makeExtensionAsk: "Make what this group chat worked out an extension, with the ta-package skill, to do it again in a click",
|
|
1595
1853
|
add: "Add",
|
|
1596
|
-
allMembers: "Every agent is in this
|
|
1854
|
+
allMembers: "Every agent is in this group chat already",
|
|
1597
1855
|
membersHint: "The first one you pick leads: it answers what names nobody.",
|
|
1598
1856
|
create: "Create",
|
|
1599
1857
|
cancel: "Cancel",
|
|
@@ -1603,11 +1861,11 @@ var EN = {
|
|
|
1603
1861
|
owner: "Owner",
|
|
1604
1862
|
ta: "Ta",
|
|
1605
1863
|
lead: "Lead",
|
|
1606
|
-
empty: "No
|
|
1864
|
+
empty: "No group chats yet",
|
|
1607
1865
|
emptyHint: "Ask Ta for a team, or create one with +",
|
|
1608
1866
|
noAgents: "No agents yet",
|
|
1609
|
-
noAgentsHint: "A
|
|
1610
|
-
pick: "Pick a
|
|
1867
|
+
noAgentsHint: "A group chat is made of agents: create one first",
|
|
1868
|
+
pick: "Pick a group chat",
|
|
1611
1869
|
quiet: "Nothing said yet. Mention a member with @, or the lead answers.",
|
|
1612
1870
|
placeholder: "Message {channel}; @ names a member",
|
|
1613
1871
|
answering: "{name} is answering",
|
|
@@ -1619,13 +1877,27 @@ var EN = {
|
|
|
1619
1877
|
new: "New",
|
|
1620
1878
|
answeringIn: "Answering in #{channel}",
|
|
1621
1879
|
answeringNow: "{name} is answering…",
|
|
1622
|
-
noMatch: "No matching agents or
|
|
1880
|
+
noMatch: "No matching agents or group chats",
|
|
1623
1881
|
noMessages: "No messages yet",
|
|
1624
1882
|
noAgentsYet: "No agents yet",
|
|
1625
1883
|
noAgentsYetHint: "Create one with +, or ask Ta for a team",
|
|
1884
|
+
partners: "Partners",
|
|
1885
|
+
groupsSection: "Group chats",
|
|
1886
|
+
agentsSection: "Agents",
|
|
1887
|
+
noPartners: "No one to work with yet",
|
|
1888
|
+
noPartnersHint: "Create an agent or a group chat with +, or add a friend",
|
|
1889
|
+
inviteFriends: "Invite friends",
|
|
1890
|
+
noFriends: "No friends yet",
|
|
1891
|
+
shareGroup: "Make it shared",
|
|
1892
|
+
shareGroupHint: "A group chat of the same name is made, shared with the friends you pick through the relay, sealed; its agents go in too. What was said here stays on this computer.",
|
|
1893
|
+
sharedMade: "“{name}” is shared with your friends now: they are in once they join.",
|
|
1894
|
+
addFriends: "Add friends",
|
|
1895
|
+
friend: "Friend",
|
|
1896
|
+
sharedHint: "With friends, the group chat is shared through the relay, sealed: they are in once they join, and agents answer only who names them with @.",
|
|
1897
|
+
sharedNeedsRooms: "Update Ta to make a group chat with friends.",
|
|
1626
1898
|
myDouble: "My double",
|
|
1627
1899
|
memberCount: "{count} members",
|
|
1628
|
-
channel: "
|
|
1900
|
+
channel: "Group chat",
|
|
1629
1901
|
newAgentName: "new-agent",
|
|
1630
1902
|
notStarted: "Not started yet",
|
|
1631
1903
|
editAgent: "Change the name and the avatar",
|
|
@@ -1647,13 +1919,13 @@ var EN = {
|
|
|
1647
1919
|
replying: "Answering…",
|
|
1648
1920
|
reset: "New session: it forgets what it was told",
|
|
1649
1921
|
resetDone: "{name} starts a new session the next time it answers.",
|
|
1650
|
-
remove: "Remove from the
|
|
1651
|
-
onlyMember: "A
|
|
1922
|
+
remove: "Remove from the group chat",
|
|
1923
|
+
onlyMember: "A group chat keeps at least one member",
|
|
1652
1924
|
open: "Open its session",
|
|
1653
|
-
deleteChannel: "Delete
|
|
1925
|
+
deleteChannel: "Delete group chat",
|
|
1654
1926
|
confirmDelete: "Delete #{channel} and its messages?",
|
|
1655
1927
|
delete: "Delete",
|
|
1656
|
-
noChannel: "Open a
|
|
1928
|
+
noChannel: "Open a group chat to see its members",
|
|
1657
1929
|
more: "More",
|
|
1658
1930
|
stop: "Stop",
|
|
1659
1931
|
stoppedAgent: "Stopped {name}.",
|
|
@@ -1669,18 +1941,18 @@ var EN = {
|
|
|
1669
1941
|
copied: "Copied {path}",
|
|
1670
1942
|
exportChat: "Export conversation (Markdown)",
|
|
1671
1943
|
nothingToExport: "{name} has said nothing yet.",
|
|
1672
|
-
joinChannel: "Add to
|
|
1673
|
-
noChannelToJoin: "It is in every
|
|
1944
|
+
joinChannel: "Add to group chat",
|
|
1945
|
+
noChannelToJoin: "It is in every group chat already",
|
|
1674
1946
|
joined: "{name} joined #{channel}.",
|
|
1675
1947
|
deleteAgent: "Delete",
|
|
1676
|
-
confirmDeleteAgent: "Delete {name}? It leaves its
|
|
1948
|
+
confirmDeleteAgent: "Delete {name}? It leaves its group chats, and group chats with no one else go too; its session file stays.",
|
|
1677
1949
|
pin: "Pin",
|
|
1678
1950
|
unpin: "Unpin",
|
|
1679
1951
|
pinned: "Pinned",
|
|
1680
1952
|
markUnread: "Mark as unread",
|
|
1681
1953
|
markRead: "Mark as read",
|
|
1682
1954
|
editTopic: "Topic",
|
|
1683
|
-
topicPlaceholder: "What the
|
|
1955
|
+
topicPlaceholder: "What the group chat is for",
|
|
1684
1956
|
renameChannel: "Rename #{channel}",
|
|
1685
1957
|
stopAnswering: "Stop answering",
|
|
1686
1958
|
stoppedChannel: "Stopped the members answering in #{channel}.",
|
|
@@ -1690,16 +1962,17 @@ var EN = {
|
|
|
1690
1962
|
building: "Building the team…",
|
|
1691
1963
|
openInMain: "Open in the main area",
|
|
1692
1964
|
openInMainHint: "Talk to the team yourself",
|
|
1693
|
-
keepMembers: "
|
|
1694
|
-
keptMembers: "{names}
|
|
1695
|
-
keep: "
|
|
1696
|
-
kept: "{name}
|
|
1697
|
-
temporary: "Made by Ta for this
|
|
1965
|
+
keepMembers: "Save its agents",
|
|
1966
|
+
keptMembers: "{names} saved: under Agents in Partners, to talk to or add to a group.",
|
|
1967
|
+
keep: "Save as an agent",
|
|
1968
|
+
kept: "{name} saved: under Agents in Partners, to talk to or add to a group.",
|
|
1969
|
+
temporary: "Made by Ta for this task; save it to have it under Agents in Partners",
|
|
1698
1970
|
temporaryTag: "Temporary",
|
|
1699
1971
|
tasks: "Tasks",
|
|
1972
|
+
decideSection: "Waiting for you",
|
|
1700
1973
|
membersSection: "Members",
|
|
1701
1974
|
byDirectory: "Group by directory",
|
|
1702
|
-
channelsSection: "
|
|
1975
|
+
channelsSection: "Group chats",
|
|
1703
1976
|
showAll: "Show all {count}",
|
|
1704
1977
|
showFewer: "Show fewer",
|
|
1705
1978
|
waitingCount: "{count} need you",
|
|
@@ -1711,12 +1984,12 @@ var EN = {
|
|
|
1711
1984
|
deleteTaskHint: "The messages of #{channel} go with it. Its agents stay, among your members.",
|
|
1712
1985
|
selectTasks: "Select",
|
|
1713
1986
|
toolCreateAgent: "Create agent",
|
|
1714
|
-
toolCreateChannel: "Create
|
|
1715
|
-
toolAddToChannel: "Add to
|
|
1987
|
+
toolCreateChannel: "Create group chat",
|
|
1988
|
+
toolAddToChannel: "Add to group chat",
|
|
1716
1989
|
toolPostToChannel: "Post to",
|
|
1717
1990
|
toolHandOff: "Hand over to",
|
|
1718
1991
|
handOff: "Hand over to…",
|
|
1719
|
-
handOffDetail: "An agent or a
|
|
1992
|
+
handOffDetail: "An agent or a group chat goes on with it",
|
|
1720
1993
|
handedTo: "Handed over to {to}",
|
|
1721
1994
|
handOffOpen: "Open",
|
|
1722
1995
|
toolListChannels: "Look over the team",
|
|
@@ -1744,13 +2017,9 @@ var EN = {
|
|
|
1744
2017
|
shareCard: "Share card…",
|
|
1745
2018
|
cardTitle: "{name}'s card",
|
|
1746
2019
|
cardKind: "An agent's card",
|
|
1747
|
-
|
|
1748
|
-
cardHint: "
|
|
2020
|
+
cardGets: "They add it as an agent of their own, fitted to their project",
|
|
2021
|
+
cardHint: "Only its role goes, secrets taken out; not its directory nor its conversation. The link works for 30 days, while this computer is off too.",
|
|
1749
2022
|
cardRedacted: "{n} places that looked like secrets were taken out.",
|
|
1750
|
-
copyLink: "Copy link",
|
|
1751
|
-
linkCopied: "Copied",
|
|
1752
|
-
sendLink: "Send",
|
|
1753
|
-
stopCard: "Stop sharing",
|
|
1754
2023
|
cardStopped: "The link of the card no longer works.",
|
|
1755
2024
|
cardOpening: "Opening the card…",
|
|
1756
2025
|
cardAddTo: "Works in {dir}",
|
|
@@ -1908,6 +2177,18 @@ function useServerCwd(pi) {
|
|
|
1908
2177
|
}
|
|
1909
2178
|
var SidebarUtil;
|
|
1910
2179
|
((SidebarUtil) => {
|
|
2180
|
+
function place(item) {
|
|
2181
|
+
return item.place ?? (item.section ? "partners" : "double");
|
|
2182
|
+
}
|
|
2183
|
+
SidebarUtil.place = place;
|
|
2184
|
+
function channelAt(channel, messages) {
|
|
2185
|
+
return messages?.at(-1)?.at ?? channel.createdAt;
|
|
2186
|
+
}
|
|
2187
|
+
SidebarUtil.channelAt = channelAt;
|
|
2188
|
+
function byTime(entries, sorted) {
|
|
2189
|
+
return sorted ? [...entries].sort((a, b) => Number(b.pinned) - Number(a.pinned) || b.at - a.at) : entries;
|
|
2190
|
+
}
|
|
2191
|
+
SidebarUtil.byTime = byTime;
|
|
1911
2192
|
function homeSections(items) {
|
|
1912
2193
|
const sections = new Map;
|
|
1913
2194
|
for (const item of items) {
|
|
@@ -2049,8 +2330,8 @@ var SidebarUtil;
|
|
|
2049
2330
|
const latest = (a, b) => b.startedAt - a.startedAt;
|
|
2050
2331
|
return {
|
|
2051
2332
|
waiting: tasks.filter((task) => task.status === "waiting").sort(latest),
|
|
2052
|
-
running: tasks.filter((task) => task.status === "running").sort(latest),
|
|
2053
|
-
ended: tasks.filter((task) => task.status !== "waiting" && task.status !== "running").sort((a, b) => (b.endedAt ?? b.startedAt) - (a.endedAt ?? a.startedAt))
|
|
2333
|
+
running: tasks.filter((task) => task.status === "running" || task.status === "idle").sort(latest),
|
|
2334
|
+
ended: tasks.filter((task) => task.status !== "waiting" && task.status !== "running" && task.status !== "idle").sort((a, b) => (b.endedAt ?? b.startedAt) - (a.endedAt ?? a.startedAt))
|
|
2054
2335
|
};
|
|
2055
2336
|
}
|
|
2056
2337
|
SidebarUtil.taskGroups = taskGroups;
|
|
@@ -2132,8 +2413,6 @@ function CardDialog({ context, agent, onClose }) {
|
|
|
2132
2413
|
const w = ChannelViews.words(pi);
|
|
2133
2414
|
const [share, setShare] = React.useState();
|
|
2134
2415
|
const [error, setError] = React.useState();
|
|
2135
|
-
const [copied, setCopied] = React.useState(false);
|
|
2136
|
-
const [stopping, setStopping] = React.useState(false);
|
|
2137
2416
|
const card = React.useMemo(() => AgentCards.card(agent), [agent]);
|
|
2138
2417
|
React.useEffect(() => {
|
|
2139
2418
|
let live = true;
|
|
@@ -2142,74 +2421,33 @@ function CardDialog({ context, agent, onClose }) {
|
|
|
2142
2421
|
live = false;
|
|
2143
2422
|
};
|
|
2144
2423
|
}, [service, agent]);
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
const canSend = typeof navigator !== "undefined" && typeof navigator.share === "function";
|
|
2148
|
-
const copy = () => share && void navigator.clipboard?.writeText(share.link).then(() => setCopied(true));
|
|
2149
|
-
const stop = () => {
|
|
2150
|
-
setStopping(true);
|
|
2151
|
-
service.stopCard(agent.id).then(() => {
|
|
2152
|
-
pi.ui.notify(w.cardStopped, "info");
|
|
2153
|
-
onClose();
|
|
2154
|
-
}, (failure) => {
|
|
2155
|
-
setStopping(false);
|
|
2156
|
-
setError(ChannelViews.message(failure));
|
|
2157
|
-
});
|
|
2158
|
-
};
|
|
2159
|
-
return /* @__PURE__ */ React.createElement(pi.ui.Dialog, {
|
|
2424
|
+
return /* @__PURE__ */ React.createElement(ShareSheetCompat, {
|
|
2425
|
+
pi,
|
|
2160
2426
|
title: ChannelWords.format(w.cardTitle, { name: agent.name }),
|
|
2427
|
+
link: share?.link,
|
|
2428
|
+
error,
|
|
2429
|
+
face: card.face !== undefined ? /* @__PURE__ */ React.createElement(Face, {
|
|
2430
|
+
face: card.face,
|
|
2431
|
+
size: 44
|
|
2432
|
+
}) : /* @__PURE__ */ React.createElement("span", {
|
|
2433
|
+
className: "tac-card-mark"
|
|
2434
|
+
}, card.mark),
|
|
2435
|
+
name: `@${card.name}`,
|
|
2436
|
+
gets: w.cardGets,
|
|
2437
|
+
notes: [card.redacted ? ChannelWords.format(w.cardRedacted, { n: String(card.redacted) }) : undefined, w.cardHint],
|
|
2438
|
+
onStop: async () => {
|
|
2439
|
+
await service.stopCard(agent.id);
|
|
2440
|
+
pi.ui.notify(w.cardStopped, "info");
|
|
2441
|
+
},
|
|
2161
2442
|
onClose
|
|
2162
2443
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
2163
|
-
className: "tac-dialog tac-card"
|
|
2164
|
-
}, /* @__PURE__ */ React.createElement(CardFace, {
|
|
2165
|
-
pi,
|
|
2166
|
-
card
|
|
2167
|
-
}), /* @__PURE__ */ React.createElement("div", {
|
|
2168
2444
|
className: "tac-card-role"
|
|
2169
|
-
}, card.role)
|
|
2170
|
-
className: "tac-dialog-note"
|
|
2171
|
-
}, ChannelWords.format(w.cardRedacted, { n: String(card.redacted) })) : null, share ? /* @__PURE__ */ React.createElement(React.Fragment, null, pi.ui.QrCode && /* @__PURE__ */ React.createElement("div", {
|
|
2172
|
-
className: "tac-card-qr"
|
|
2173
|
-
}, /* @__PURE__ */ React.createElement(pi.ui.QrCode, {
|
|
2174
|
-
text: share.link,
|
|
2175
|
-
label: share.title
|
|
2176
|
-
})), /* @__PURE__ */ React.createElement("div", {
|
|
2177
|
-
className: "tac-card-link",
|
|
2178
|
-
title: share.link
|
|
2179
|
-
}, share.link), /* @__PURE__ */ React.createElement("div", {
|
|
2180
|
-
className: "tac-card-actions"
|
|
2181
|
-
}, /* @__PURE__ */ React.createElement("button", {
|
|
2182
|
-
type: "button",
|
|
2183
|
-
className: "tac-button tac-primary",
|
|
2184
|
-
onClick: copy
|
|
2185
|
-
}, /* @__PURE__ */ React.createElement(Copy, {
|
|
2186
|
-
size: 14
|
|
2187
|
-
}), copied ? w.linkCopied : w.copyLink), canSend && /* @__PURE__ */ React.createElement("button", {
|
|
2188
|
-
type: "button",
|
|
2189
|
-
className: "tac-button",
|
|
2190
|
-
onClick: () => void navigator.share({ title: share.title, url: share.link }).catch(() => {
|
|
2191
|
-
return;
|
|
2192
|
-
})
|
|
2193
|
-
}, /* @__PURE__ */ React.createElement(Send, {
|
|
2194
|
-
size: 14
|
|
2195
|
-
}), w.sendLink)), /* @__PURE__ */ React.createElement("p", {
|
|
2196
|
-
className: "tac-dialog-note"
|
|
2197
|
-
}, w.cardHint), /* @__PURE__ */ React.createElement("button", {
|
|
2198
|
-
type: "button",
|
|
2199
|
-
className: "tac-card-stop",
|
|
2200
|
-
disabled: stopping,
|
|
2201
|
-
onClick: stop
|
|
2202
|
-
}, w.stopCard)) : error ? /* @__PURE__ */ React.createElement("div", {
|
|
2203
|
-
className: "tac-error"
|
|
2204
|
-
}, error) : /* @__PURE__ */ React.createElement("div", {
|
|
2205
|
-
className: "tac-card-making"
|
|
2206
|
-
}, /* @__PURE__ */ React.createElement("span", {
|
|
2207
|
-
className: "ta-spinner"
|
|
2208
|
-
}), w.cardMaking)));
|
|
2445
|
+
}, card.role));
|
|
2209
2446
|
}
|
|
2210
2447
|
function CardView({ context, link }) {
|
|
2211
2448
|
const { pi, service } = context;
|
|
2212
2449
|
const w = ChannelViews.words(pi);
|
|
2450
|
+
const Loading = pi.ui.Loading ?? pi.ui.Skeleton;
|
|
2213
2451
|
const serverCwd = useServerCwd(pi);
|
|
2214
2452
|
const [card, setCard] = React.useState();
|
|
2215
2453
|
const [error, setError] = React.useState();
|
|
@@ -2244,11 +2482,9 @@ function CardView({ context, link }) {
|
|
|
2244
2482
|
className: "tac-card-page"
|
|
2245
2483
|
}, error ? /* @__PURE__ */ React.createElement(pi.ui.Empty, {
|
|
2246
2484
|
title: ChannelWords.format(w.cardFailed, { message: error })
|
|
2247
|
-
}) : /* @__PURE__ */ React.createElement(
|
|
2248
|
-
|
|
2249
|
-
}
|
|
2250
|
-
className: "ta-spinner"
|
|
2251
|
-
}), w.cardOpening));
|
|
2485
|
+
}) : /* @__PURE__ */ React.createElement(Loading, {
|
|
2486
|
+
label: w.cardOpening
|
|
2487
|
+
}));
|
|
2252
2488
|
}
|
|
2253
2489
|
const Folder = ChannelViews.icon(pi, "Folder");
|
|
2254
2490
|
return /* @__PURE__ */ React.createElement("div", {
|
|
@@ -2478,6 +2714,117 @@ class ChannelsClient {
|
|
|
2478
2714
|
}
|
|
2479
2715
|
}
|
|
2480
2716
|
|
|
2717
|
+
// web-src/shared-group.tsx
|
|
2718
|
+
function useFriends(pi) {
|
|
2719
|
+
const [friends, setFriends] = React.useState([]);
|
|
2720
|
+
React.useEffect(() => {
|
|
2721
|
+
let live = true;
|
|
2722
|
+
pi.rooms?.listFriends().then((list) => live && setFriends(list.filter((friend) => friend.status === "friend")), () => {
|
|
2723
|
+
return;
|
|
2724
|
+
});
|
|
2725
|
+
return () => {
|
|
2726
|
+
live = false;
|
|
2727
|
+
};
|
|
2728
|
+
}, [pi]);
|
|
2729
|
+
return friends;
|
|
2730
|
+
}
|
|
2731
|
+
async function createShared(context, title, friends, agents) {
|
|
2732
|
+
const { pi } = context;
|
|
2733
|
+
const rooms = pi.rooms;
|
|
2734
|
+
if (!rooms) {
|
|
2735
|
+
throw new Error(ChannelViews.words(pi).sharedNeedsRooms);
|
|
2736
|
+
}
|
|
2737
|
+
const room = await rooms.createRoom({ kind: ROOMS_KIND, title });
|
|
2738
|
+
await rooms.inviteFriends(room.id, friends);
|
|
2739
|
+
for (const agent of agents) {
|
|
2740
|
+
await pi.packages.callPackageHost(ROOMS_PACKAGE, "doubles", [{ kind: "invite", room: room.id, agent }]).catch((error) => {
|
|
2741
|
+
pi.ui.notify(ChannelViews.message(error), "error");
|
|
2742
|
+
});
|
|
2743
|
+
}
|
|
2744
|
+
const { link } = await rooms.invite(room.id);
|
|
2745
|
+
await pi.openLink?.(link);
|
|
2746
|
+
}
|
|
2747
|
+
var ROOMS_PACKAGE = "@celljs/ta-rooms";
|
|
2748
|
+
var ROOMS_KIND = "ta-rooms";
|
|
2749
|
+
function ShareDialog({ context, channel, onClose }) {
|
|
2750
|
+
const { pi } = context;
|
|
2751
|
+
const w = ChannelViews.words(pi);
|
|
2752
|
+
const friends = useFriends(pi);
|
|
2753
|
+
const Check = ChannelViews.icon(pi, "Check");
|
|
2754
|
+
const [picked, setPicked] = React.useState([]);
|
|
2755
|
+
const [busy, setBusy] = React.useState(false);
|
|
2756
|
+
const [error, setError] = React.useState();
|
|
2757
|
+
const toggle = (friend) => setPicked(picked.includes(friend.id) ? picked.filter((id) => id !== friend.id) : [...picked, friend.id]);
|
|
2758
|
+
const share = () => {
|
|
2759
|
+
setBusy(true);
|
|
2760
|
+
setError(undefined);
|
|
2761
|
+
createShared(context, channel.name, picked, channel.members).then(() => {
|
|
2762
|
+
onClose();
|
|
2763
|
+
pi.ui.notify(ChannelWords.format(w.sharedMade, { name: channel.name }), "info");
|
|
2764
|
+
}, (failure) => {
|
|
2765
|
+
setBusy(false);
|
|
2766
|
+
setError(ChannelViews.message(failure));
|
|
2767
|
+
});
|
|
2768
|
+
};
|
|
2769
|
+
return /* @__PURE__ */ React.createElement(pi.ui.Dialog, {
|
|
2770
|
+
title: w.inviteFriends,
|
|
2771
|
+
onClose
|
|
2772
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
2773
|
+
className: "tac-dialog"
|
|
2774
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
2775
|
+
className: "tac-dialog-note"
|
|
2776
|
+
}, w.shareGroupHint), /* @__PURE__ */ React.createElement("div", {
|
|
2777
|
+
className: "tac-pick-list"
|
|
2778
|
+
}, friends.length === 0 && /* @__PURE__ */ React.createElement(pi.ui.Empty, {
|
|
2779
|
+
compact: true,
|
|
2780
|
+
title: w.noFriends
|
|
2781
|
+
}), friends.map((friend) => {
|
|
2782
|
+
const on = picked.includes(friend.id);
|
|
2783
|
+
return /* @__PURE__ */ React.createElement("button", {
|
|
2784
|
+
key: friend.id,
|
|
2785
|
+
type: "button",
|
|
2786
|
+
"aria-pressed": on,
|
|
2787
|
+
className: `tac-pick${on ? " tac-on" : ""}`,
|
|
2788
|
+
onClick: () => toggle(friend)
|
|
2789
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
2790
|
+
className: "tac-check"
|
|
2791
|
+
}, on && /* @__PURE__ */ React.createElement(Check, {
|
|
2792
|
+
size: 13,
|
|
2793
|
+
strokeWidth: 3
|
|
2794
|
+
})), pi.ui.Face ? /* @__PURE__ */ React.createElement(pi.ui.Face, {
|
|
2795
|
+
seed: friend.id,
|
|
2796
|
+
size: 30,
|
|
2797
|
+
look: friend.look
|
|
2798
|
+
}) : /* @__PURE__ */ React.createElement("span", {
|
|
2799
|
+
className: "tac-pick-face"
|
|
2800
|
+
}), /* @__PURE__ */ React.createElement("span", {
|
|
2801
|
+
className: "tac-pick-text"
|
|
2802
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
2803
|
+
className: "tac-pick-name"
|
|
2804
|
+
}, friend.name), /* @__PURE__ */ React.createElement("span", {
|
|
2805
|
+
className: "tac-pick-role"
|
|
2806
|
+
}, w.friend)));
|
|
2807
|
+
})), error && /* @__PURE__ */ React.createElement("div", {
|
|
2808
|
+
className: "tac-empty tac-error"
|
|
2809
|
+
}, error), /* @__PURE__ */ React.createElement("div", {
|
|
2810
|
+
className: "tac-dialog-actions"
|
|
2811
|
+
}, /* @__PURE__ */ React.createElement("button", {
|
|
2812
|
+
type: "button",
|
|
2813
|
+
className: busy ? "tac-button tac-primary ta-busy" : "tac-button tac-primary",
|
|
2814
|
+
disabled: busy || picked.length === 0,
|
|
2815
|
+
onClick: share
|
|
2816
|
+
}, w.shareGroup, busy && /* @__PURE__ */ React.createElement("span", {
|
|
2817
|
+
className: "ta-spinner ta-busy-mark ta-on-brand"
|
|
2818
|
+
})))));
|
|
2819
|
+
}
|
|
2820
|
+
function openShareGroup(context, channel) {
|
|
2821
|
+
context.pi.ui.custom?.(({ close }) => /* @__PURE__ */ React.createElement(ShareDialog, {
|
|
2822
|
+
context,
|
|
2823
|
+
channel,
|
|
2824
|
+
onClose: close
|
|
2825
|
+
}));
|
|
2826
|
+
}
|
|
2827
|
+
|
|
2481
2828
|
// web-src/create.tsx
|
|
2482
2829
|
var noBack = (_open, _close) => false;
|
|
2483
2830
|
var AGENT_PAGE = `${NAME}/agent`;
|
|
@@ -2651,6 +2998,10 @@ function NewChannelDialog({ context, onClose }) {
|
|
|
2651
2998
|
const [name, setName] = React.useState("");
|
|
2652
2999
|
const [query, setQuery] = React.useState("");
|
|
2653
3000
|
const [picked, setPicked] = React.useState([]);
|
|
3001
|
+
const friends = useFriends(pi);
|
|
3002
|
+
const [pickedFriends, setPickedFriends] = React.useState([]);
|
|
3003
|
+
const shared = pickedFriends.length > 0;
|
|
3004
|
+
const toggleFriend = (friend) => setPickedFriends(pickedFriends.includes(friend.id) ? pickedFriends.filter((id) => id !== friend.id) : [...pickedFriends, friend.id]);
|
|
2654
3005
|
const [busy, setBusy] = React.useState(false);
|
|
2655
3006
|
const [error, setError] = React.useState();
|
|
2656
3007
|
const Dialog = pi.ui.Dialog;
|
|
@@ -2661,6 +3012,13 @@ function NewChannelDialog({ context, onClose }) {
|
|
|
2661
3012
|
event.preventDefault();
|
|
2662
3013
|
setBusy(true);
|
|
2663
3014
|
setError(undefined);
|
|
3015
|
+
if (shared) {
|
|
3016
|
+
createShared(context, name.trim(), pickedFriends, picked).then(onClose, (failure) => {
|
|
3017
|
+
setBusy(false);
|
|
3018
|
+
setError(ChannelViews.message(failure));
|
|
3019
|
+
});
|
|
3020
|
+
return;
|
|
3021
|
+
}
|
|
2664
3022
|
service.createChannel({ name, members: picked }).then((channel) => {
|
|
2665
3023
|
onClose();
|
|
2666
3024
|
context.showChannel(channel.id);
|
|
@@ -2734,16 +3092,48 @@ function NewChannelDialog({ context, onClose }) {
|
|
|
2734
3092
|
className: "tac-pick-role"
|
|
2735
3093
|
}, agent.role.split(`
|
|
2736
3094
|
`)[0])));
|
|
2737
|
-
})),
|
|
3095
|
+
})), friends.length > 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
|
|
3096
|
+
className: "tac-dialog-label"
|
|
3097
|
+
}, /* @__PURE__ */ React.createElement("span", null, w.addFriends), shared && /* @__PURE__ */ React.createElement("span", {
|
|
3098
|
+
className: "tac-dialog-count"
|
|
3099
|
+
}, pickedFriends.length)), /* @__PURE__ */ React.createElement("div", {
|
|
3100
|
+
className: "tac-pick-list"
|
|
3101
|
+
}, friends.map((friend) => {
|
|
3102
|
+
const on = pickedFriends.includes(friend.id);
|
|
3103
|
+
return /* @__PURE__ */ React.createElement("button", {
|
|
3104
|
+
key: friend.id,
|
|
3105
|
+
type: "button",
|
|
3106
|
+
"aria-pressed": on,
|
|
3107
|
+
className: `tac-pick${on ? " tac-on" : ""}`,
|
|
3108
|
+
onClick: () => toggleFriend(friend)
|
|
3109
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
3110
|
+
className: "tac-check"
|
|
3111
|
+
}, on && /* @__PURE__ */ React.createElement(Check, {
|
|
3112
|
+
size: 13,
|
|
3113
|
+
strokeWidth: 3
|
|
3114
|
+
})), pi.ui.Face ? /* @__PURE__ */ React.createElement(pi.ui.Face, {
|
|
3115
|
+
seed: friend.id,
|
|
3116
|
+
size: 30,
|
|
3117
|
+
look: friend.look
|
|
3118
|
+
}) : /* @__PURE__ */ React.createElement("span", {
|
|
3119
|
+
className: "tac-pick-face"
|
|
3120
|
+
}), /* @__PURE__ */ React.createElement("span", {
|
|
3121
|
+
className: "tac-pick-text"
|
|
3122
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
3123
|
+
className: "tac-pick-name"
|
|
3124
|
+
}, friend.name), /* @__PURE__ */ React.createElement("span", {
|
|
3125
|
+
className: "tac-pick-role"
|
|
3126
|
+
}, w.friend)));
|
|
3127
|
+
}))), (picked.length > 0 || shared) && /* @__PURE__ */ React.createElement("div", {
|
|
2738
3128
|
className: "tac-dialog-note"
|
|
2739
|
-
}, w.membersHint), error && /* @__PURE__ */ React.createElement("div", {
|
|
3129
|
+
}, shared ? w.sharedHint : w.membersHint), error && /* @__PURE__ */ React.createElement("div", {
|
|
2740
3130
|
className: "tac-empty tac-error"
|
|
2741
3131
|
}, error), /* @__PURE__ */ React.createElement("div", {
|
|
2742
3132
|
className: "tac-dialog-actions"
|
|
2743
3133
|
}, /* @__PURE__ */ React.createElement("button", {
|
|
2744
3134
|
type: "submit",
|
|
2745
3135
|
className: busy ? "tac-button tac-primary ta-busy" : "tac-button tac-primary",
|
|
2746
|
-
disabled: busy || !name.trim() || picked.length === 0
|
|
3136
|
+
disabled: busy || !name.trim() || picked.length === 0 && !shared
|
|
2747
3137
|
}, w.create, busy && /* @__PURE__ */ React.createElement("span", {
|
|
2748
3138
|
className: "ta-spinner ta-busy-mark ta-on-brand"
|
|
2749
3139
|
})))));
|
|
@@ -2794,10 +3184,7 @@ var HandOff;
|
|
|
2794
3184
|
"en-US": `Hand this over to ${to}`,
|
|
2795
3185
|
"ja-JP": `これを ${to} に引き継ぐ`
|
|
2796
3186
|
});
|
|
2797
|
-
return
|
|
2798
|
-
${context}
|
|
2799
|
-
</context>
|
|
2800
|
-
${line}`;
|
|
3187
|
+
return TaMessageContext.wrap(context, line);
|
|
2801
3188
|
}
|
|
2802
3189
|
HandOff.ask = ask;
|
|
2803
3190
|
function asked(text) {
|
|
@@ -2835,12 +3222,9 @@ ${line}`;
|
|
|
2835
3222
|
origin.sessionFile ? `That conversation is pi's session file ${origin.sessionFile}${origin.cwd ? `, working in ${origin.cwd}` : ""}: read it only when the brief is not enough.` : ""
|
|
2836
3223
|
].filter(Boolean).join(`
|
|
2837
3224
|
`);
|
|
2838
|
-
return
|
|
2839
|
-
${context}
|
|
2840
|
-
</context>
|
|
2841
|
-
${head}
|
|
3225
|
+
return TaMessageContext.wrap(context, `${head}
|
|
2842
3226
|
|
|
2843
|
-
${brief.trim()}
|
|
3227
|
+
${brief.trim()}`);
|
|
2844
3228
|
}
|
|
2845
3229
|
HandOff.message = message;
|
|
2846
3230
|
function channelText(origin, brief, language) {
|
|
@@ -2921,8 +3305,8 @@ var HandOffView;
|
|
|
2921
3305
|
HandOffView.card = card;
|
|
2922
3306
|
function icon(context, target, icons) {
|
|
2923
3307
|
const key = `${target.kind}:${target.id}`;
|
|
2924
|
-
let
|
|
2925
|
-
if (!
|
|
3308
|
+
let node2 = icons.get(key);
|
|
3309
|
+
if (!node2) {
|
|
2926
3310
|
const Face2 = () => {
|
|
2927
3311
|
const team = useTeam(context);
|
|
2928
3312
|
const faces = useFaces(team);
|
|
@@ -2934,10 +3318,10 @@ var HandOffView;
|
|
|
2934
3318
|
working: []
|
|
2935
3319
|
}) : null;
|
|
2936
3320
|
};
|
|
2937
|
-
|
|
2938
|
-
icons.set(key,
|
|
3321
|
+
node2 = /* @__PURE__ */ React.createElement(Face2, null);
|
|
3322
|
+
icons.set(key, node2);
|
|
2939
3323
|
}
|
|
2940
|
-
return
|
|
3324
|
+
return node2;
|
|
2941
3325
|
}
|
|
2942
3326
|
function composerAddon(context) {
|
|
2943
3327
|
const icons = new Map;
|
|
@@ -3017,6 +3401,7 @@ function MemberList({ context, team, channel, faces, working }) {
|
|
|
3017
3401
|
const [busy, setBusy] = React.useState();
|
|
3018
3402
|
const [confirming, setConfirming] = React.useState(false);
|
|
3019
3403
|
const UserPlus = ChannelViews.icon(pi, "UserPlus");
|
|
3404
|
+
const Contact = ChannelViews.icon(pi, "Contact");
|
|
3020
3405
|
const Crown = ChannelViews.icon(pi, "Crown");
|
|
3021
3406
|
const BellOff = ChannelViews.icon(pi, "BellOff");
|
|
3022
3407
|
const RotateCcw = ChannelViews.icon(pi, "RotateCcw");
|
|
@@ -3062,7 +3447,19 @@ function MemberList({ context, team, channel, faces, working }) {
|
|
|
3062
3447
|
className: "tac-member-text"
|
|
3063
3448
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
3064
3449
|
className: "tac-member-name"
|
|
3065
|
-
}, w.addMembers))),
|
|
3450
|
+
}, w.addMembers))), pi.rooms && channel.by !== "ta" && /* @__PURE__ */ React.createElement("button", {
|
|
3451
|
+
type: "button",
|
|
3452
|
+
className: "tac-member-main",
|
|
3453
|
+
onClick: () => openShareGroup(context, channel)
|
|
3454
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
3455
|
+
className: "tac-member-plus"
|
|
3456
|
+
}, /* @__PURE__ */ React.createElement(Contact, {
|
|
3457
|
+
size: 16
|
|
3458
|
+
})), /* @__PURE__ */ React.createElement("span", {
|
|
3459
|
+
className: "tac-member-text"
|
|
3460
|
+
}, /* @__PURE__ */ React.createElement("span", {
|
|
3461
|
+
className: "tac-member-name"
|
|
3462
|
+
}, w.inviteFriends))), members.map((agent, index) => {
|
|
3066
3463
|
const lead = index === 0;
|
|
3067
3464
|
const off = muted.includes(agent.id);
|
|
3068
3465
|
const answering = working.includes(agent.id);
|
|
@@ -3320,7 +3717,7 @@ var TA_ACTIONS = [
|
|
|
3320
3717
|
action("commands.terminal", "Open terminals", "打开终端", "開啟終端機", "ターミナルを開く", { scoped: true, risky: true }),
|
|
3321
3718
|
action("hosts.use", "Use remote hosts", "使用远程主机", "使用遠端主機", "リモートホストを使用", { risky: true }),
|
|
3322
3719
|
action("models.use", "Use the models", "使用模型", "使用模型", "モデルを使用"),
|
|
3323
|
-
action("models.manage", "Sign in to models", "登录和更换模型账号", "登入和更換模型帳號", "モデルアカウントにサインイン・変更"),
|
|
3720
|
+
action("models.manage", "Sign in to models", "登录和更换模型账号", "登入和更換模型帳號", "モデルアカウントにサインイン・変更", { grant: "single" }),
|
|
3324
3721
|
action("cron.view", "See scheduled tasks", "查看定时任务", "檢視定時任務", "スケジュールタスクを確認"),
|
|
3325
3722
|
action("cron.manage", "Change scheduled tasks", "管理定时任务", "管理定時任務", "スケジュールタスクを管理"),
|
|
3326
3723
|
action("extensions.use", "Use extensions", "使用扩展", "使用擴充功能", "拡張機能を使用"),
|
|
@@ -3333,9 +3730,15 @@ var TA_ACTIONS = [
|
|
|
3333
3730
|
action("members.roles", "Change roles and members", "管理角色和成员", "管理角色和成員", "ロールとメンバーを管理"),
|
|
3334
3731
|
action("audit.view", "See the record", "查看记录", "檢視記錄", "レコードを確認")
|
|
3335
3732
|
];
|
|
3733
|
+
var TA_OWNER_ACTIONS = [
|
|
3734
|
+
action("desktop.view", "See remote desktops", "查看远程桌面", "檢視遠端桌面", "リモートデスクトップを見る", { risky: true }),
|
|
3735
|
+
action("desktop.control", "Work remote desktops", "操作远程桌面", "操作遠端桌面", "リモートデスクトップを操作", { risky: true })
|
|
3736
|
+
];
|
|
3737
|
+
var OWNER_AREAS = ["desktop"];
|
|
3336
3738
|
var TaActionUtil;
|
|
3337
3739
|
(function(TaActionUtil2) {
|
|
3338
3740
|
const byId = new Map(TA_ACTIONS.map((one) => [one.id, one]));
|
|
3741
|
+
const titled = new Map([...TA_ACTIONS, ...TA_OWNER_ACTIONS].map((one) => [one.id, one]));
|
|
3339
3742
|
function info(id) {
|
|
3340
3743
|
return byId.get(id);
|
|
3341
3744
|
}
|
|
@@ -3343,7 +3746,7 @@ var TaActionUtil;
|
|
|
3343
3746
|
function title(id, language) {
|
|
3344
3747
|
var _a;
|
|
3345
3748
|
var _b, _c;
|
|
3346
|
-
const title2 = (_a =
|
|
3749
|
+
const title2 = (_a = titled.get(id)) === null || _a === undefined ? undefined : _a.title;
|
|
3347
3750
|
if (!title2) {
|
|
3348
3751
|
return id;
|
|
3349
3752
|
}
|
|
@@ -3355,6 +3758,16 @@ var TaActionUtil;
|
|
|
3355
3758
|
});
|
|
3356
3759
|
}
|
|
3357
3760
|
TaActionUtil2.title = title;
|
|
3761
|
+
function grantable(id) {
|
|
3762
|
+
const info2 = byId.get(id);
|
|
3763
|
+
return !!info2 && !OWNER_AREAS.includes(info2.area);
|
|
3764
|
+
}
|
|
3765
|
+
TaActionUtil2.grantable = grantable;
|
|
3766
|
+
function inRoles(id) {
|
|
3767
|
+
var _a;
|
|
3768
|
+
return grantable(id) && ((_a = byId.get(id)) === null || _a === undefined ? undefined : _a.grant) !== "single";
|
|
3769
|
+
}
|
|
3770
|
+
TaActionUtil2.inRoles = inRoles;
|
|
3358
3771
|
function inside(dir, path) {
|
|
3359
3772
|
const base = dir.replace(/\/+$/, "");
|
|
3360
3773
|
return path === base || path.startsWith(`${base}/`) || base === "";
|
|
@@ -3362,6 +3775,226 @@ var TaActionUtil;
|
|
|
3362
3775
|
TaActionUtil2.inside = inside;
|
|
3363
3776
|
})(TaActionUtil || (TaActionUtil = {}));
|
|
3364
3777
|
|
|
3778
|
+
// ../ta-protocol/esm/common/said-protocol.js
|
|
3779
|
+
var TaSaid;
|
|
3780
|
+
(function(TaSaid2) {
|
|
3781
|
+
const CARD = /^ta-/i;
|
|
3782
|
+
const READ = 4000;
|
|
3783
|
+
const FENCE = /^\s*(`{3,}|~{3,})\s*([^\s`]*)/;
|
|
3784
|
+
const TAG_LINE = /^<\/?[A-Za-z][\w:.-]*(?:\s[^<>]*)?\/?>$/;
|
|
3785
|
+
const MARKS_ONLY = /^[-*_=|:+\s]+$/;
|
|
3786
|
+
const MARKS = [
|
|
3787
|
+
["context", /<\/?context>/],
|
|
3788
|
+
["source", /\[ta:(?:from|notice|by) /],
|
|
3789
|
+
["image note", /\[Image: original \d+x\d+|\[Image converted from /],
|
|
3790
|
+
["skill", /<skill name="|<\/skill>/],
|
|
3791
|
+
["task note", /<\/?task_(?:update|adopted|renamed)\b/],
|
|
3792
|
+
["summary", /<\/?(?:conversation_history_summary|summary)>/]
|
|
3793
|
+
];
|
|
3794
|
+
function text(content, joiner = `
|
|
3795
|
+
`) {
|
|
3796
|
+
if (typeof content === "string") {
|
|
3797
|
+
return content;
|
|
3798
|
+
}
|
|
3799
|
+
return Array.isArray(content) ? content.filter((part) => (part === null || part === undefined ? undefined : part.type) === "text" && typeof part.text === "string").map((part) => part.text).join(joiner) : "";
|
|
3800
|
+
}
|
|
3801
|
+
TaSaid2.text = text;
|
|
3802
|
+
function words(role, text2, options = {}) {
|
|
3803
|
+
const said = role === "user" ? userWords(text2) : TaAgentSummary.strip(text2);
|
|
3804
|
+
return withoutFences(said, (language) => options.cards === false && CARD.test(language), true).trim();
|
|
3805
|
+
}
|
|
3806
|
+
TaSaid2.words = words;
|
|
3807
|
+
function of(message, options) {
|
|
3808
|
+
return message ? words(message.role, text(message.content), options) : "";
|
|
3809
|
+
}
|
|
3810
|
+
TaSaid2.of = of;
|
|
3811
|
+
function notice(message) {
|
|
3812
|
+
return (message === null || message === undefined ? undefined : message.role) === "user" && TaMessageSource.isNotice(text(message.content));
|
|
3813
|
+
}
|
|
3814
|
+
TaSaid2.notice = notice;
|
|
3815
|
+
function marksOnly(role, text2) {
|
|
3816
|
+
return !!text2.trim() && !line(words(role, text2), { chars: Number.POSITIVE_INFINITY });
|
|
3817
|
+
}
|
|
3818
|
+
TaSaid2.marksOnly = marksOnly;
|
|
3819
|
+
function line(markdown, options) {
|
|
3820
|
+
var _a;
|
|
3821
|
+
const read = markdown.slice(0, READ);
|
|
3822
|
+
const prose = withoutFences(read, () => true, true).trim();
|
|
3823
|
+
const lines = plain(prose || codeOf(read)).split(`
|
|
3824
|
+
`).map((part) => part.replace(/^\s*(?:#{1,6}\s+|>\s*|[-*+]\s+|\d+[.)]\s+)/, "").replace(/\*{1,3}|`+|~~|(?<![\p{L}\p{N}])_{1,3}|_{1,3}(?![\p{L}\p{N}])/gu, "").replace(/\s+/g, " ").trim()).filter((part) => part && !MARKS_ONLY.test(part) && !TAG_LINE.test(part));
|
|
3825
|
+
const count = (_a = options.lines) !== null && _a !== undefined ? _a : 1;
|
|
3826
|
+
const joined = count <= 1 ? lines.join(" ") : lines.slice(0, count).join(`
|
|
3827
|
+
`);
|
|
3828
|
+
return joined.length > options.chars ? `${joined.slice(0, Math.max(0, options.chars - 1)).trimEnd()}…` : joined;
|
|
3829
|
+
}
|
|
3830
|
+
TaSaid2.line = line;
|
|
3831
|
+
function leaks(shown, options = {}) {
|
|
3832
|
+
const found = MARKS.filter(([, mark]) => mark.test(shown)).map(([name]) => name);
|
|
3833
|
+
const lines = shown.split(`
|
|
3834
|
+
`);
|
|
3835
|
+
if (options.cards !== true && lines.some((part) => {
|
|
3836
|
+
var _a;
|
|
3837
|
+
var _b;
|
|
3838
|
+
return CARD.test((_b = (_a = FENCE.exec(part)) === null || _a === undefined ? undefined : _a[2]) !== null && _b !== undefined ? _b : "");
|
|
3839
|
+
})) {
|
|
3840
|
+
found.push("card");
|
|
3841
|
+
}
|
|
3842
|
+
if (lines.some((part) => TAG_LINE.test(part.trim()))) {
|
|
3843
|
+
found.push("tag");
|
|
3844
|
+
}
|
|
3845
|
+
return found;
|
|
3846
|
+
}
|
|
3847
|
+
TaSaid2.leaks = leaks;
|
|
3848
|
+
const SUMMARY = `<conversation_history_summary>
|
|
3849
|
+
<summary>
|
|
3850
|
+
1. Primary Request and Intent:
|
|
3851
|
+
The user works on the relay.
|
|
3852
|
+
</summary>
|
|
3853
|
+
</conversation_history_summary>`;
|
|
3854
|
+
TaSaid2.SAMPLES = [
|
|
3855
|
+
{
|
|
3856
|
+
mark: "context and where it came from",
|
|
3857
|
+
role: "user",
|
|
3858
|
+
text: `<context>
|
|
3859
|
+
The channel #ops, its members.
|
|
3860
|
+
[ta:from @celljs/ta-channels #ops]
|
|
3861
|
+
</context>
|
|
3862
|
+
Check the build`,
|
|
3863
|
+
said: "Check the build"
|
|
3864
|
+
},
|
|
3865
|
+
{
|
|
3866
|
+
mark: "a notice, not the user",
|
|
3867
|
+
role: "user",
|
|
3868
|
+
text: `<context>
|
|
3869
|
+
[ta:notice @celljs/ta-call]
|
|
3870
|
+
</context>
|
|
3871
|
+
The work finished. Its last words: tests pass.`,
|
|
3872
|
+
said: "The work finished. Its last words: tests pass."
|
|
3873
|
+
},
|
|
3874
|
+
{ mark: "one let in", role: "user", text: `<context>
|
|
3875
|
+
[ta:by p-7 Alice]
|
|
3876
|
+
</context>
|
|
3877
|
+
Hello there`, said: "Hello there" },
|
|
3878
|
+
{
|
|
3879
|
+
mark: "notes of images",
|
|
3880
|
+
role: "user",
|
|
3881
|
+
text: `Look at this
|
|
3882
|
+
[Image: original 3024x4032, displayed at 1512x2016. Multiply coordinates by 2.00 to map to original image.]
|
|
3883
|
+
[Image converted from image/heic to image/png.]`,
|
|
3884
|
+
said: "Look at this"
|
|
3885
|
+
},
|
|
3886
|
+
{
|
|
3887
|
+
mark: "a skill run",
|
|
3888
|
+
role: "user",
|
|
3889
|
+
text: `<skill name="ta-package" location="/skills/ta-package/SKILL.md">
|
|
3890
|
+
# Ta package
|
|
3891
|
+
Steps.
|
|
3892
|
+
</skill>
|
|
3893
|
+
|
|
3894
|
+
Make a card`,
|
|
3895
|
+
said: "Make a card"
|
|
3896
|
+
},
|
|
3897
|
+
{
|
|
3898
|
+
mark: "a note of a task",
|
|
3899
|
+
role: "user",
|
|
3900
|
+
text: `<task_update id="t1" title="Fix login" status="done">
|
|
3901
|
+
All tests pass.
|
|
3902
|
+
</task_update>`,
|
|
3903
|
+
said: "Fix login"
|
|
3904
|
+
},
|
|
3905
|
+
{ mark: "a note of a new id", role: "user", text: `<task_renamed id="t2" was="t1" title="Fix login">
|
|
3906
|
+
Now t2.
|
|
3907
|
+
</task_renamed>` },
|
|
3908
|
+
{ mark: "a summary, then the answer", role: "assistant", text: `${SUMMARY}
|
|
3909
|
+
Switched to voice.`, said: "Switched to voice." },
|
|
3910
|
+
{ mark: "a summary alone", role: "assistant", text: SUMMARY },
|
|
3911
|
+
{ mark: "a summary as it streams", role: "assistant", text: `<conversation_history_summary>
|
|
3912
|
+
<summary>` },
|
|
3913
|
+
{
|
|
3914
|
+
mark: "a card after the answer",
|
|
3915
|
+
role: "assistant",
|
|
3916
|
+
text: '**Done**: tests pass.\n\n```ta-glance\n{"status":"done","blocks":[]}\n```',
|
|
3917
|
+
said: "tests pass"
|
|
3918
|
+
},
|
|
3919
|
+
{ mark: "a card alone", role: "assistant", text: '```ta-glance\n{"status":"done","blocks":[]}\n```' },
|
|
3920
|
+
{ mark: "a proposal", role: "assistant", text: 'Committed.\n\n```ta-propose\n{"kind":"git.push","title":"Push"}\n```', said: "Committed." },
|
|
3921
|
+
{ mark: "what a call says aloud", role: "assistant", text: "All fixed.\n\n```ta-say\nIt is fixed.\n```", said: "All fixed." },
|
|
3922
|
+
{ mark: "a tag not known yet", role: "assistant", text: `<system-reminder>
|
|
3923
|
+
</system-reminder>
|
|
3924
|
+
Ready.`, said: "Ready." }
|
|
3925
|
+
];
|
|
3926
|
+
function userWords(text2) {
|
|
3927
|
+
const said = TaImageNote.strip(TaMessageContext.strip(text2));
|
|
3928
|
+
const skill = TaSkillUse.parse(said);
|
|
3929
|
+
if (skill) {
|
|
3930
|
+
return TaSkillUse.command(skill);
|
|
3931
|
+
}
|
|
3932
|
+
const note = TaTaskNote.parse(said);
|
|
3933
|
+
if (!note) {
|
|
3934
|
+
return said;
|
|
3935
|
+
}
|
|
3936
|
+
if (note.kind === "renamed") {
|
|
3937
|
+
return "";
|
|
3938
|
+
}
|
|
3939
|
+
return note.kind === "update" && note.body.trim() ? `${note.title} · ${note.body}` : note.title;
|
|
3940
|
+
}
|
|
3941
|
+
function withoutFences(text2, drop, tags = false) {
|
|
3942
|
+
const kept = [];
|
|
3943
|
+
let fence;
|
|
3944
|
+
let left = false;
|
|
3945
|
+
for (const part of text2.split(`
|
|
3946
|
+
`)) {
|
|
3947
|
+
const open = FENCE.exec(part);
|
|
3948
|
+
if (!fence && open) {
|
|
3949
|
+
fence = { mark: open[1], dropped: drop(open[2]) };
|
|
3950
|
+
} else if (fence && closes(part, fence.mark)) {
|
|
3951
|
+
const dropped = fence.dropped;
|
|
3952
|
+
fence = undefined;
|
|
3953
|
+
if (dropped) {
|
|
3954
|
+
continue;
|
|
3955
|
+
}
|
|
3956
|
+
}
|
|
3957
|
+
if ((fence === null || fence === undefined ? undefined : fence.dropped) || !fence && tags && TAG_LINE.test(part.trim())) {
|
|
3958
|
+
left = true;
|
|
3959
|
+
} else {
|
|
3960
|
+
kept.push(part);
|
|
3961
|
+
}
|
|
3962
|
+
}
|
|
3963
|
+
return left ? kept.join(`
|
|
3964
|
+
`).replace(/\n{3,}/g, `
|
|
3965
|
+
|
|
3966
|
+
`) : kept.join(`
|
|
3967
|
+
`);
|
|
3968
|
+
}
|
|
3969
|
+
function codeOf(text2) {
|
|
3970
|
+
const code = [];
|
|
3971
|
+
let fence;
|
|
3972
|
+
for (const part of text2.split(`
|
|
3973
|
+
`)) {
|
|
3974
|
+
const open = FENCE.exec(part);
|
|
3975
|
+
if (!fence && open) {
|
|
3976
|
+
fence = { mark: open[1], card: CARD.test(open[2]) };
|
|
3977
|
+
} else if (fence && closes(part, fence.mark)) {
|
|
3978
|
+
fence = undefined;
|
|
3979
|
+
} else if (fence && !fence.card) {
|
|
3980
|
+
code.push(part);
|
|
3981
|
+
}
|
|
3982
|
+
}
|
|
3983
|
+
return code.join(`
|
|
3984
|
+
`);
|
|
3985
|
+
}
|
|
3986
|
+
function closes(part, mark) {
|
|
3987
|
+
var _a;
|
|
3988
|
+
const close = (_a = /^\s*(`{3,}|~{3,})\s*$/.exec(part)) === null || _a === undefined ? undefined : _a[1];
|
|
3989
|
+
return !!close && close[0] === mark[0] && close.length >= mark.length;
|
|
3990
|
+
}
|
|
3991
|
+
function plain(text2) {
|
|
3992
|
+
const linked = text2.replace(/(?<!!)\[([^\]\n]*)\]\([^)\n]*\)/g, "$1");
|
|
3993
|
+
const words2 = linked.replace(/!\[[^\]\n]*\]\([^)\n]*\)/g, "").trim();
|
|
3994
|
+
return words2 || linked.replace(/!\[([^\]\n]*)\]\([^)\n]*\)/g, "$1");
|
|
3995
|
+
}
|
|
3996
|
+
})(TaSaid || (TaSaid = {}));
|
|
3997
|
+
|
|
3365
3998
|
// web-src/channels-text.ts
|
|
3366
3999
|
var ChannelsText;
|
|
3367
4000
|
((ChannelsText) => {
|
|
@@ -3420,7 +4053,7 @@ var ChannelsText;
|
|
|
3420
4053
|
return [
|
|
3421
4054
|
`You are ${agent.name}, ${AGENT_MARK}. Your role: ${agent.role}`,
|
|
3422
4055
|
"You work with the user, Ta and other agents in channels. A message for you starts with a <context> block: the channel, its members, the recent messages and who speaks to you; answer what follows the block.",
|
|
3423
|
-
"Do the part of the work your role covers with your tools, then answer
|
|
4056
|
+
"Do the part of the work your role covers with your tools, then answer: your answer is posted to the channel as it is.",
|
|
3424
4057
|
"To hand work to another member, write @ and their name in your answer; name nobody when the work is done or you need the user.",
|
|
3425
4058
|
NOTICE_RULE
|
|
3426
4059
|
].join(`
|
|
@@ -3439,13 +4072,10 @@ var ChannelsText;
|
|
|
3439
4072
|
lines.push("", "Recent messages:", ...before.map((item) => `${authorName(team, item.author, labels)}: ${item.text}`));
|
|
3440
4073
|
}
|
|
3441
4074
|
lines.push("", `${authorName(team, message.author, labels)} to you:`);
|
|
3442
|
-
const speaker = message.author === USER ? "" : ` · ${authorName(team, message.author, labels)
|
|
3443
|
-
lines.push(
|
|
3444
|
-
return
|
|
3445
|
-
|
|
3446
|
-
`)}
|
|
3447
|
-
</context>
|
|
3448
|
-
${message.text}`;
|
|
4075
|
+
const speaker = message.author === USER ? "" : ` · ${authorName(team, message.author, labels)}`;
|
|
4076
|
+
lines.push(TaMessageSource.line(NAME, `#${channel.name}${speaker}`));
|
|
4077
|
+
return TaMessageContext.wrap(lines.join(`
|
|
4078
|
+
`), message.text);
|
|
3449
4079
|
}
|
|
3450
4080
|
ChannelsText.prompt = prompt;
|
|
3451
4081
|
function summary(team) {
|
|
@@ -3474,7 +4104,7 @@ ${message.text}`;
|
|
|
3474
4104
|
if (role !== "user" && role !== "assistant") {
|
|
3475
4105
|
continue;
|
|
3476
4106
|
}
|
|
3477
|
-
const text =
|
|
4107
|
+
const text = TaSaid.words(role, TaSaid.text(content, ""));
|
|
3478
4108
|
if (text) {
|
|
3479
4109
|
parts.push("", `## ${role === "user" ? labels.user : agent.name}`, "", text);
|
|
3480
4110
|
}
|
|
@@ -4445,6 +5075,7 @@ class ChannelTaskSource {
|
|
|
4445
5075
|
working
|
|
4446
5076
|
}),
|
|
4447
5077
|
open: () => openScene(this.context, channel),
|
|
5078
|
+
show: () => this.context.showChannel(channel.id),
|
|
4448
5079
|
menu: () => taskMenu(this.context, channel, working),
|
|
4449
5080
|
remove: () => deleteTeam(this.context, channel),
|
|
4450
5081
|
removeHint: ChannelWords.format(ChannelViews.words(this.context.pi).deleteTaskHint, { channel: channel.name })
|
|
@@ -4720,7 +5351,11 @@ function useSeenTasks(storage, tasks) {
|
|
|
4720
5351
|
const open = (task) => {
|
|
4721
5352
|
const keys = new Set(tasks.map((each) => each.key));
|
|
4722
5353
|
look(task.key, Date.now(), (key) => keys.has(key));
|
|
4723
|
-
task.
|
|
5354
|
+
if (task.show) {
|
|
5355
|
+
task.show();
|
|
5356
|
+
} else {
|
|
5357
|
+
task.open();
|
|
5358
|
+
}
|
|
4724
5359
|
};
|
|
4725
5360
|
return { needsLook, open };
|
|
4726
5361
|
}
|
|
@@ -4844,7 +5479,7 @@ function Row({
|
|
|
4844
5479
|
className: `tac-item${selected ? " tac-selected" : ""}${single ? " tac-item-single" : ""}${deleting && !(more || swipe) ? " ta-pending" : ""}`,
|
|
4845
5480
|
"aria-current": selected || undefined,
|
|
4846
5481
|
"aria-busy": deleting || undefined,
|
|
4847
|
-
"data-unseen": dot === "attention" ? "" : undefined,
|
|
5482
|
+
"data-unseen": dot === "attention" || dot === "ask" ? "" : undefined,
|
|
4848
5483
|
title: hint,
|
|
4849
5484
|
onClick: onSelect
|
|
4850
5485
|
}, check, /* @__PURE__ */ React.createElement("span", {
|
|
@@ -4933,6 +5568,7 @@ function TaskItem({ context, task, selection, seen }) {
|
|
|
4933
5568
|
const { pi } = context;
|
|
4934
5569
|
const w = ChannelViews.words(pi);
|
|
4935
5570
|
const Own = task.icon;
|
|
5571
|
+
const TaskIcon = pi.ui.TaskIcon;
|
|
4936
5572
|
const ListTodo = pi.ui.icons.ListTodo ?? ChannelViews.icon(pi, "List");
|
|
4937
5573
|
const ListChecks = ChannelViews.icon(pi, "ListChecks");
|
|
4938
5574
|
const SelectCheck = pi.ui.SelectCheck;
|
|
@@ -4949,7 +5585,10 @@ function TaskItem({ context, task, selection, seen }) {
|
|
|
4949
5585
|
const swipe = task.remove && !selecting ? [{ key: "delete", label: w.delete, danger: true, run: () => void pi.ui.removeTasks([task]) }] : undefined;
|
|
4950
5586
|
return /* @__PURE__ */ React.createElement(Row, {
|
|
4951
5587
|
pi,
|
|
4952
|
-
avatar:
|
|
5588
|
+
avatar: TaskIcon ? /* @__PURE__ */ React.createElement(TaskIcon, {
|
|
5589
|
+
task,
|
|
5590
|
+
size: 40
|
|
5591
|
+
}) : Own ? /* @__PURE__ */ React.createElement("span", {
|
|
4953
5592
|
className: "tac-task-face"
|
|
4954
5593
|
}, /* @__PURE__ */ React.createElement(Own, {
|
|
4955
5594
|
size: 40
|
|
@@ -4959,7 +5598,7 @@ function TaskItem({ context, task, selection, seen }) {
|
|
|
4959
5598
|
size: 17
|
|
4960
5599
|
})),
|
|
4961
5600
|
title: task.title,
|
|
4962
|
-
dot: task.status === "running" && !task.gathered ? "running" : seen.needsLook(task) ? "attention" : task.status === "running" ? "running" : undefined,
|
|
5601
|
+
dot: task.status === "waiting" ? "ask" : task.status === "running" && !task.gathered ? "running" : seen.needsLook(task) ? "attention" : task.status === "running" ? "running" : undefined,
|
|
4963
5602
|
preview: task.detail ?? "",
|
|
4964
5603
|
waiting: task.status === "waiting",
|
|
4965
5604
|
time: SidebarUtil.time(task.endedAt ?? task.startedAt, pi.ui.language),
|
|
@@ -5011,7 +5650,7 @@ function HomeRow({ pi, item }) {
|
|
|
5011
5650
|
|
|
5012
5651
|
// web-src/sidebar.tsx
|
|
5013
5652
|
var NO_HOME_ITEMS = [];
|
|
5014
|
-
function AgentsSidebar({ context }) {
|
|
5653
|
+
function AgentsSidebar({ context, partners = false }) {
|
|
5015
5654
|
const { pi, service, ui } = context;
|
|
5016
5655
|
const state = useChannels(service);
|
|
5017
5656
|
const { query, draft, channelId, fresh: unread } = useUi(ui);
|
|
@@ -5025,7 +5664,9 @@ function AgentsSidebar({ context }) {
|
|
|
5025
5664
|
const tasks = pi.ui.useTasks();
|
|
5026
5665
|
const homeItems = pi.ui.useHomeItems?.() ?? NO_HOME_ITEMS;
|
|
5027
5666
|
const homeShown = homeItems.filter((item) => SidebarUtil.matches(query, item.title, item.detail));
|
|
5028
|
-
const homeSections = SidebarUtil.homeSections(homeShown);
|
|
5667
|
+
const homeSections = SidebarUtil.homeSections(partners ? homeShown.filter((item) => SidebarUtil.place(item) === "partners") : homeShown);
|
|
5668
|
+
const partnerTop = partners ? homeShown.filter((item) => SidebarUtil.place(item) === "partners" && !item.section) : [];
|
|
5669
|
+
const groupItems = partners ? homeShown.filter((item) => SidebarUtil.place(item) === "groups") : [];
|
|
5029
5670
|
const [folded, fold] = useFolded();
|
|
5030
5671
|
const [byDirectory, setByDirectory] = useStored(pi.storage, BY_DIRECTORY_KEY, false);
|
|
5031
5672
|
const language = pi.ui.language;
|
|
@@ -5036,10 +5677,9 @@ function AgentsSidebar({ context }) {
|
|
|
5036
5677
|
const FolderTree = pi.ui.icons.FolderTree ?? Folder;
|
|
5037
5678
|
const HostTag = pi.ui.HostTag;
|
|
5038
5679
|
const ListTodo = pi.ui.icons.ListTodo ?? ChannelViews.icon(pi, "List");
|
|
5039
|
-
const ChevronRight = ChannelViews.icon(pi, "ChevronRight");
|
|
5040
5680
|
const Avatar = pi.ui.Avatar;
|
|
5041
5681
|
const Empty = pi.ui.Empty;
|
|
5042
|
-
const
|
|
5682
|
+
const Loading = pi.ui.Loading ?? pi.ui.Skeleton;
|
|
5043
5683
|
const { team, working } = state;
|
|
5044
5684
|
const own = React.useMemo(() => ChannelsUtil.ownChannels(team), [team]);
|
|
5045
5685
|
const seen = useSeenTasks(pi.storage, tasks);
|
|
@@ -5096,7 +5736,9 @@ function AgentsSidebar({ context }) {
|
|
|
5096
5736
|
return opening === agent.id || !pageShown && !!sessionId && sessionId === shownSession;
|
|
5097
5737
|
};
|
|
5098
5738
|
const ended = allEnded || selection.selecting ? groups.ended : groups.ended.slice(0, ENDED_SHOWN);
|
|
5099
|
-
const
|
|
5739
|
+
const going = [...groups.running, ...groups.ended];
|
|
5740
|
+
const nothing = query && (partners || shownTasks.length === 0) && channels.length === 0 && agents.length === 0 && homeShown.length === 0;
|
|
5741
|
+
const nobody = partners && state.loaded && !query && channels.length === 0 && agents.length === 0 && homeShown.length === 0 && !draft;
|
|
5100
5742
|
const ownTasks = tasks.filter((task) => !task.gathered);
|
|
5101
5743
|
const gathered = tasks.reduce((sum, task) => ({
|
|
5102
5744
|
waiting: sum.waiting + (task.gathered?.waiting ?? 0),
|
|
@@ -5115,7 +5757,7 @@ function AgentsSidebar({ context }) {
|
|
|
5115
5757
|
className: "tac-view"
|
|
5116
5758
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
5117
5759
|
className: "tac-list"
|
|
5118
|
-
}, double && SidebarUtil.matches(query, double.title, w.myDouble) && /* @__PURE__ */ React.createElement("div", {
|
|
5760
|
+
}, !partners && double && SidebarUtil.matches(query, double.title, w.myDouble) && /* @__PURE__ */ React.createElement("div", {
|
|
5119
5761
|
className: "tac-double-row"
|
|
5120
5762
|
}, /* @__PURE__ */ React.createElement("button", {
|
|
5121
5763
|
type: "button",
|
|
@@ -5129,31 +5771,26 @@ function AgentsSidebar({ context }) {
|
|
|
5129
5771
|
size: 42,
|
|
5130
5772
|
mood: doubleBusy ? "working" : "idle"
|
|
5131
5773
|
}), /* @__PURE__ */ React.createElement("span", {
|
|
5132
|
-
className: `tac-dot${waiting > 0
|
|
5774
|
+
className: `tac-dot${waiting > 0 ? " tac-dot-ask" : fresh > 0 || doubleFresh ? " tac-dot-attention" : running > 0 || doubleBusy ? " tac-dot-running" : ""}`
|
|
5133
5775
|
})), /* @__PURE__ */ React.createElement("span", {
|
|
5134
5776
|
className: "tac-double-text"
|
|
5135
5777
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
5136
5778
|
className: "tac-double-top"
|
|
5137
5779
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
5138
5780
|
className: "tac-double-name"
|
|
5139
|
-
}, double.title),
|
|
5781
|
+
}, double.title), double.preview && /* @__PURE__ */ React.createElement("span", {
|
|
5140
5782
|
className: "tac-item-time"
|
|
5141
5783
|
}, SidebarUtil.time(double.preview.at, pi.ui.language))), /* @__PURE__ */ React.createElement("span", {
|
|
5142
|
-
className: `tac-double-line${waiting > 0
|
|
5784
|
+
className: `tac-double-line${waiting > 0 ? " tac-waiting" : fresh > 0 || doubleFresh && !doubleLine ? " tac-fresh" : ""}`
|
|
5143
5785
|
}, /* @__PURE__ */ React.createElement("span", null, doubleLine || double.preview?.text || w.standingBy), (doubleBusy || running > 0) && /* @__PURE__ */ React.createElement("span", {
|
|
5144
5786
|
className: "tac-spinner ta-spinner"
|
|
5145
|
-
}))), /* @__PURE__ */ React.createElement(
|
|
5146
|
-
className: "tac-double-go",
|
|
5147
|
-
"aria-hidden": "true"
|
|
5148
|
-
}, /* @__PURE__ */ React.createElement(ChevronRight, {
|
|
5149
|
-
size: 18
|
|
5150
|
-
}))), double.menu && /* @__PURE__ */ React.createElement(MoreMenu, {
|
|
5787
|
+
})))), double.menu && /* @__PURE__ */ React.createElement(MoreMenu, {
|
|
5151
5788
|
pi,
|
|
5152
5789
|
label: double.title,
|
|
5153
5790
|
items: () => (double.menu?.() ?? []).map((section) => section.map(({ icon: Icon, ...item }) => ({ ...item, icon: Icon && /* @__PURE__ */ React.createElement(Icon, {
|
|
5154
5791
|
size: 15
|
|
5155
5792
|
}) })))
|
|
5156
|
-
})), homeShown.filter((item) => !item.section).map((item) => /* @__PURE__ */ React.createElement(HomeRow, {
|
|
5793
|
+
})), (partners ? partnerTop : homeShown.filter((item) => !item.section)).map((item) => /* @__PURE__ */ React.createElement(HomeRow, {
|
|
5157
5794
|
key: item.key,
|
|
5158
5795
|
pi,
|
|
5159
5796
|
item
|
|
@@ -5168,24 +5805,38 @@ function AgentsSidebar({ context }) {
|
|
|
5168
5805
|
time: "",
|
|
5169
5806
|
selected: !!agentPage?.shown,
|
|
5170
5807
|
onSelect: () => pi.ui.showView(AGENT_PAGE)
|
|
5171
|
-
}), !state.loaded && !query &&
|
|
5172
|
-
rows: 4
|
|
5173
|
-
}), nothing && /* @__PURE__ */ React.createElement(Empty, {
|
|
5808
|
+
}), !state.loaded && !query && /* @__PURE__ */ React.createElement(Loading, null), nothing && /* @__PURE__ */ React.createElement(Empty, {
|
|
5174
5809
|
title: w.noMatch
|
|
5175
|
-
}),
|
|
5810
|
+
}), nobody && /* @__PURE__ */ React.createElement(Empty, {
|
|
5811
|
+
title: w.noPartners,
|
|
5812
|
+
hint: w.noPartnersHint
|
|
5813
|
+
}), !partners && state.loaded && groups.waiting.length > 0 && /* @__PURE__ */ React.createElement(Section, {
|
|
5814
|
+
id: "decide",
|
|
5815
|
+
title: w.decideSection,
|
|
5816
|
+
count: groups.waiting.length,
|
|
5817
|
+
folded,
|
|
5818
|
+
onFold: fold,
|
|
5819
|
+
alert: true
|
|
5820
|
+
}, groups.waiting.map((task) => /* @__PURE__ */ React.createElement(TaskItem, {
|
|
5821
|
+
key: task.key,
|
|
5822
|
+
context,
|
|
5823
|
+
task,
|
|
5824
|
+
selection,
|
|
5825
|
+
seen
|
|
5826
|
+
}))), !partners && state.loaded && (going.length > 0 || !query && tasks.length === 0) && /* @__PURE__ */ React.createElement(Section, {
|
|
5176
5827
|
id: "tasks",
|
|
5177
5828
|
title: w.tasks,
|
|
5178
|
-
count:
|
|
5829
|
+
count: going.length,
|
|
5179
5830
|
folded,
|
|
5180
5831
|
onFold: fold,
|
|
5181
|
-
alert:
|
|
5182
|
-
},
|
|
5832
|
+
alert: going.some((task) => seen.needsLook(task))
|
|
5833
|
+
}, going.length === 0 && /* @__PURE__ */ React.createElement("button", {
|
|
5183
5834
|
type: "button",
|
|
5184
5835
|
className: "tac-tasks-empty",
|
|
5185
5836
|
onClick: () => pi.ui.showView(DOUBLE_PAGE)
|
|
5186
5837
|
}, /* @__PURE__ */ React.createElement(ListTodo, {
|
|
5187
5838
|
size: 14
|
|
5188
|
-
}), /* @__PURE__ */ React.createElement("span", null, w.noTasksHere)), [...groups.
|
|
5839
|
+
}), /* @__PURE__ */ React.createElement("span", null, w.noTasksHere)), [...groups.running, ...ended].map((task) => /* @__PURE__ */ React.createElement(TaskItem, {
|
|
5189
5840
|
key: task.key,
|
|
5190
5841
|
context,
|
|
5191
5842
|
task,
|
|
@@ -5195,9 +5846,65 @@ function AgentsSidebar({ context }) {
|
|
|
5195
5846
|
type: "button",
|
|
5196
5847
|
className: "tac-show-all",
|
|
5197
5848
|
onClick: () => setAllEnded(!allEnded)
|
|
5198
|
-
}, allEnded ? w.showFewer : ChannelWords.format(w.showAll, { count: String(groups.ended.length) }))),
|
|
5849
|
+
}, allEnded ? w.showFewer : ChannelWords.format(w.showAll, { count: String(groups.ended.length) }))), (channels.length > 0 || groupItems.length > 0) && /* @__PURE__ */ React.createElement(Section, {
|
|
5850
|
+
id: "channels",
|
|
5851
|
+
title: partners ? w.groupsSection : w.channelsSection,
|
|
5852
|
+
count: channels.length + groupItems.length,
|
|
5853
|
+
folded,
|
|
5854
|
+
onFold: fold,
|
|
5855
|
+
alert: channels.some((channel) => unread.includes(channel.id)) || groupItems.some((item) => item.unseen)
|
|
5856
|
+
}, SidebarUtil.byTime([
|
|
5857
|
+
...channels.map((channel) => ({
|
|
5858
|
+
channel,
|
|
5859
|
+
pinned: !!channel.pinned,
|
|
5860
|
+
at: SidebarUtil.channelAt(channel, state.messages[channel.id])
|
|
5861
|
+
})),
|
|
5862
|
+
...groupItems.map((item) => ({ item, pinned: false, at: item.at ?? 0 }))
|
|
5863
|
+
], partners).map((entry) => {
|
|
5864
|
+
if (!("channel" in entry)) {
|
|
5865
|
+
return /* @__PURE__ */ React.createElement(HomeRow, {
|
|
5866
|
+
key: entry.item.key,
|
|
5867
|
+
pi,
|
|
5868
|
+
item: entry.item
|
|
5869
|
+
});
|
|
5870
|
+
}
|
|
5871
|
+
const { channel } = entry;
|
|
5872
|
+
const members = membersOf(team, channel);
|
|
5873
|
+
const busy = working[channel.id] ?? [];
|
|
5874
|
+
const last = state.messages[channel.id]?.filter((message) => message.author !== SYSTEM).at(-1);
|
|
5875
|
+
const preview = busy.length > 0 ? ChannelWords.format(w.answeringNow, { name: busy.map(name).join("、") }) : last ? `${name(last.author)}:${last.text.replace(/\s+/g, " ")}` : channel.topic ?? w.noMessages;
|
|
5876
|
+
return /* @__PURE__ */ React.createElement(Row, {
|
|
5877
|
+
pi,
|
|
5878
|
+
key: channel.id,
|
|
5879
|
+
avatar: /* @__PURE__ */ React.createElement(RoomFace, {
|
|
5880
|
+
members,
|
|
5881
|
+
faces,
|
|
5882
|
+
size: 40,
|
|
5883
|
+
working: busy
|
|
5884
|
+
}),
|
|
5885
|
+
title: channel.name,
|
|
5886
|
+
badge: /* @__PURE__ */ React.createElement(PinMark, {
|
|
5887
|
+
pi,
|
|
5888
|
+
pinned: channel.pinned
|
|
5889
|
+
}),
|
|
5890
|
+
preview,
|
|
5891
|
+
live: busy.length > 0,
|
|
5892
|
+
dot: busy.length > 0 ? "running" : unread.includes(channel.id) ? "attention" : undefined,
|
|
5893
|
+
time: SidebarUtil.time(last?.at ?? channel.createdAt, pi.ui.language),
|
|
5894
|
+
hint: channel.topic ? `#${channel.name} · ${channel.topic}` : `#${channel.name}`,
|
|
5895
|
+
selected: !!channelPage?.shown && channelId === channel.id,
|
|
5896
|
+
deleting: state.deleting.includes(channel.id),
|
|
5897
|
+
onSelect: () => context.showChannel(channel.id),
|
|
5898
|
+
more: /* @__PURE__ */ React.createElement(ChannelMenu, {
|
|
5899
|
+
context,
|
|
5900
|
+
channel,
|
|
5901
|
+
working: busy
|
|
5902
|
+
}),
|
|
5903
|
+
swipe: swipePinDelete(pi, !!channel.pinned, (pinned) => context.service.updateChannel(channel.id, { pinned }), () => deleteChannel(context, channel))
|
|
5904
|
+
});
|
|
5905
|
+
})), agents.length > 0 && /* @__PURE__ */ React.createElement(Section, {
|
|
5199
5906
|
id: "members",
|
|
5200
|
-
title: w.membersSection,
|
|
5907
|
+
title: partners ? w.agentsSection : w.membersSection,
|
|
5201
5908
|
count: agents.length,
|
|
5202
5909
|
folded,
|
|
5203
5910
|
onFold: fold,
|
|
@@ -5250,7 +5957,7 @@ function AgentsSidebar({ context }) {
|
|
|
5250
5957
|
live: busy && !needsYou,
|
|
5251
5958
|
waiting: needsYou,
|
|
5252
5959
|
fresh: unseen,
|
|
5253
|
-
dot: needsYou ? "
|
|
5960
|
+
dot: needsYou ? "ask" : busy ? "running" : unseen ? "attention" : undefined,
|
|
5254
5961
|
time: lastLines ? SidebarUtil.time(last?.at ?? agent.createdAt, pi.ui.language) : "",
|
|
5255
5962
|
hint: SidebarUtil.where(cwd),
|
|
5256
5963
|
selected: agentSelected(agent),
|
|
@@ -5264,48 +5971,7 @@ function AgentsSidebar({ context }) {
|
|
|
5264
5971
|
}),
|
|
5265
5972
|
swipe: swipePinDelete(pi, !!agent.pinned, (pinned) => context.service.updateAgent(agent.id, { pinned }), () => deleteAgent(context, agent))
|
|
5266
5973
|
});
|
|
5267
|
-
})))),
|
|
5268
|
-
id: "channels",
|
|
5269
|
-
title: w.channelsSection,
|
|
5270
|
-
count: channels.length,
|
|
5271
|
-
folded,
|
|
5272
|
-
onFold: fold,
|
|
5273
|
-
alert: channels.some((channel) => unread.includes(channel.id))
|
|
5274
|
-
}, channels.map((channel) => {
|
|
5275
|
-
const members = membersOf(team, channel);
|
|
5276
|
-
const busy = working[channel.id] ?? [];
|
|
5277
|
-
const last = state.messages[channel.id]?.filter((message) => message.author !== SYSTEM).at(-1);
|
|
5278
|
-
const preview = busy.length > 0 ? ChannelWords.format(w.answeringNow, { name: busy.map(name).join("、") }) : last ? `${name(last.author)}:${last.text.replace(/\s+/g, " ")}` : channel.topic ?? w.noMessages;
|
|
5279
|
-
return /* @__PURE__ */ React.createElement(Row, {
|
|
5280
|
-
pi,
|
|
5281
|
-
key: channel.id,
|
|
5282
|
-
avatar: /* @__PURE__ */ React.createElement(RoomFace, {
|
|
5283
|
-
members,
|
|
5284
|
-
faces,
|
|
5285
|
-
size: 40,
|
|
5286
|
-
working: busy
|
|
5287
|
-
}),
|
|
5288
|
-
title: channel.name,
|
|
5289
|
-
badge: /* @__PURE__ */ React.createElement(PinMark, {
|
|
5290
|
-
pi,
|
|
5291
|
-
pinned: channel.pinned
|
|
5292
|
-
}),
|
|
5293
|
-
preview,
|
|
5294
|
-
live: busy.length > 0,
|
|
5295
|
-
dot: busy.length > 0 ? "running" : unread.includes(channel.id) ? "attention" : undefined,
|
|
5296
|
-
time: SidebarUtil.time(last?.at ?? channel.createdAt, pi.ui.language),
|
|
5297
|
-
hint: channel.topic ? `#${channel.name} · ${channel.topic}` : `#${channel.name}`,
|
|
5298
|
-
selected: !!channelPage?.shown && channelId === channel.id,
|
|
5299
|
-
deleting: state.deleting.includes(channel.id),
|
|
5300
|
-
onSelect: () => context.showChannel(channel.id),
|
|
5301
|
-
more: /* @__PURE__ */ React.createElement(ChannelMenu, {
|
|
5302
|
-
context,
|
|
5303
|
-
channel,
|
|
5304
|
-
working: busy
|
|
5305
|
-
}),
|
|
5306
|
-
swipe: swipePinDelete(pi, !!channel.pinned, (pinned) => context.service.updateChannel(channel.id, { pinned }), () => deleteChannel(context, channel))
|
|
5307
|
-
});
|
|
5308
|
-
})), homeSections.map((section) => /* @__PURE__ */ React.createElement(Section, {
|
|
5974
|
+
})))), homeSections.map((section) => /* @__PURE__ */ React.createElement(Section, {
|
|
5309
5975
|
key: section.id,
|
|
5310
5976
|
id: section.id,
|
|
5311
5977
|
title: section.title,
|
|
@@ -5339,7 +6005,9 @@ function SidebarHead({ context }) {
|
|
|
5339
6005
|
const Hash = ChannelViews.icon(pi, "Hash");
|
|
5340
6006
|
const Bot = ChannelViews.icon(pi, "Bot");
|
|
5341
6007
|
const ScanLine = ChannelViews.icon(pi, "ScanLine");
|
|
6008
|
+
const UserPlus = ChannelViews.icon(pi, "UserPlus");
|
|
5342
6009
|
const scan = pi.ui.scan;
|
|
6010
|
+
const addFriend = !!pi.ui.doubleInChats;
|
|
5343
6011
|
React.useEffect(() => {
|
|
5344
6012
|
if (!menu) {
|
|
5345
6013
|
return;
|
|
@@ -5398,16 +6066,19 @@ function SidebarHead({ context }) {
|
|
|
5398
6066
|
}, /* @__PURE__ */ React.createElement("button", {
|
|
5399
6067
|
type: "button",
|
|
5400
6068
|
role: "menuitem",
|
|
5401
|
-
onClick: () => begin("
|
|
5402
|
-
}, /* @__PURE__ */ React.createElement(
|
|
6069
|
+
onClick: () => begin("channel")
|
|
6070
|
+
}, /* @__PURE__ */ React.createElement(Hash, {
|
|
5403
6071
|
size: 14
|
|
5404
|
-
}), w.
|
|
6072
|
+
}), w.newChannel), addFriend && /* @__PURE__ */ React.createElement("button", {
|
|
5405
6073
|
type: "button",
|
|
5406
6074
|
role: "menuitem",
|
|
5407
|
-
onClick: () =>
|
|
5408
|
-
|
|
6075
|
+
onClick: () => {
|
|
6076
|
+
setMenu(false);
|
|
6077
|
+
pi.ui.showView("@celljs/ta-rooms/add-friend");
|
|
6078
|
+
}
|
|
6079
|
+
}, /* @__PURE__ */ React.createElement(UserPlus, {
|
|
5409
6080
|
size: 14
|
|
5410
|
-
}), w.
|
|
6081
|
+
}), w.addFriend), scan && /* @__PURE__ */ React.createElement("button", {
|
|
5411
6082
|
type: "button",
|
|
5412
6083
|
role: "menuitem",
|
|
5413
6084
|
onClick: () => {
|
|
@@ -5416,7 +6087,13 @@ function SidebarHead({ context }) {
|
|
|
5416
6087
|
}
|
|
5417
6088
|
}, /* @__PURE__ */ React.createElement(ScanLine, {
|
|
5418
6089
|
size: 14
|
|
5419
|
-
}), w.scan)
|
|
6090
|
+
}), w.scan), /* @__PURE__ */ React.createElement("button", {
|
|
6091
|
+
type: "button",
|
|
6092
|
+
role: "menuitem",
|
|
6093
|
+
onClick: () => begin("agent")
|
|
6094
|
+
}, /* @__PURE__ */ React.createElement(Bot, {
|
|
6095
|
+
size: 14
|
|
6096
|
+
}), w.newAgent))), creating && /* @__PURE__ */ React.createElement(NewChannelDialog, {
|
|
5420
6097
|
context,
|
|
5421
6098
|
onClose: () => ui.set({ creating: false })
|
|
5422
6099
|
}));
|
|
@@ -5444,16 +6121,13 @@ var STYLE = `
|
|
|
5444
6121
|
.tac-list:has(> .ta-empty:not(.ta-empty-compact)) { display: flex; flex-direction: column; }
|
|
5445
6122
|
.tac-list > .tac-view > .tac-form { margin: 2px 10px 8px; }
|
|
5446
6123
|
/* The double first, a card of its own: the one the user talks to. --tac-double-bg and -edge change with hover and press. */
|
|
5447
|
-
.tac-double { --tac-double-bg: var(--ta-raised); --tac-double-edge: color-mix(in srgb, var(--ta-text) 7%, transparent); display: flex; align-items: center; gap: 14px; width: 100%; min-height: 80px; margin: 4px 0 14px; padding: 12px
|
|
6124
|
+
.tac-double { --tac-double-bg: var(--ta-raised); --tac-double-edge: color-mix(in srgb, var(--ta-text) 7%, transparent); display: flex; align-items: center; gap: 14px; width: 100%; min-height: 80px; margin: 4px 0 14px; padding: 12px 9px 12px 12px; border: 1px solid var(--tac-double-edge); border-radius: 18px; background: var(--tac-double-bg); color: var(--ta-text); font: inherit; text-align: left; cursor: pointer; transition: background-color 120ms, border-color 160ms; box-sizing: border-box; }
|
|
5448
6125
|
:root[data-theme='light'] .tac-double { --tac-double-bg: var(--ta-card); --tac-double-edge: var(--ta-border-muted); }
|
|
5449
6126
|
.tac-double:hover { --tac-double-bg: var(--ta-hover); }
|
|
5450
6127
|
.tac-double.tac-selected { --tac-double-edge: color-mix(in srgb, var(--ta-accent) 40%, transparent); }
|
|
5451
6128
|
/* The dinosaur on a disc of its color, as a profile picture. */
|
|
5452
6129
|
.tac-double-face { display: inline-grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 50%; background: color-mix(in oklch, var(--ta-accent) 34%, var(--ta-main)); }
|
|
5453
6130
|
.tac-double-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
|
|
5454
|
-
/* A finger has no … to hover: the card says it opens, as a profile card does. */
|
|
5455
|
-
.tac-double-go { display: none; flex: none; margin-right: -2px; color: var(--ta-muted); opacity: 0.7; }
|
|
5456
|
-
:root[data-touch] .tac-double-go { display: inline-flex; }
|
|
5457
6131
|
.tac-double-row { position: relative; }
|
|
5458
6132
|
.tac-pinned { display: inline-flex; flex: none; color: var(--ta-muted); }
|
|
5459
6133
|
.tac-double-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(16px * var(--ta-font-scale)); font-weight: 600; line-height: calc(22px * var(--ta-font-scale)); letter-spacing: 0.01em; }
|
|
@@ -5520,19 +6194,13 @@ button.tac-notice-line:disabled { cursor: default; }
|
|
|
5520
6194
|
.tac-card-who { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 4px; }
|
|
5521
6195
|
.tac-card-face { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 6px; }
|
|
5522
6196
|
.tac-card-mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ta-hover); font-size: 22px; font-weight: 700; }
|
|
6197
|
+
.ta-share-face .tac-card-mark { width: 100%; height: 100%; border-radius: 0; font-size: calc(18px * var(--ta-font-scale)); }
|
|
5523
6198
|
.tac-card-name { font-size: calc(16px * var(--ta-font-scale)); font-weight: 600; }
|
|
5524
6199
|
.tac-card-kind { color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }
|
|
5525
6200
|
.tac-card-role { max-height: 160px; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--ta-border-muted); border-radius: 12px; background: var(--ta-side); color: var(--ta-body); font-size: calc(13px * var(--ta-font-scale)); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
5526
6201
|
.tac-card-page .tac-card-role { max-height: none; white-space: normal; }
|
|
5527
|
-
.tac-card-qr { display: grid; place-items: center; }
|
|
5528
|
-
.tac-card-qr canvas, .tac-card-qr svg, .tac-card-qr img { width: 168px; height: 168px; }
|
|
5529
|
-
.tac-card-link { padding: 8px 10px; border-radius: 8px; background: var(--ta-hover); color: var(--ta-secondary); font-family: var(--ta-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: calc(11.5px * var(--ta-font-scale)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
5530
|
-
.tac-card-actions { display: flex; justify-content: center; gap: 8px; }
|
|
5531
|
-
.tac-card-actions .tac-button { height: 36px; padding: 0 16px; }
|
|
5532
|
-
.tac-card-stop { align-self: center; padding: 4px 8px; border: 0; background: none; color: var(--ta-muted); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); cursor: pointer; }
|
|
5533
|
-
.tac-card-stop:hover:not(:disabled) { color: var(--ta-red); }
|
|
5534
|
-
.tac-card-making { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 120px; color: var(--ta-muted); font-size: calc(13px * var(--ta-font-scale)); }
|
|
5535
6202
|
.tac-card-page { flex: 1; min-height: 0; height: 100%; overflow-y: auto; padding: 28px 20px 40px; box-sizing: border-box; background: var(--ta-main); color: var(--ta-text); }
|
|
6203
|
+
.tac-card-page:has(> .ta-loading) { display: flex; flex-direction: column; }
|
|
5536
6204
|
.tac-card-page > .tac-card { max-width: 520px; margin: 0 auto; }
|
|
5537
6205
|
.tac-card-page .tac-button.tac-primary { height: 40px; font-size: calc(14px * var(--ta-font-scale)); }
|
|
5538
6206
|
.tac-card-dir { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }
|
|
@@ -5620,20 +6288,6 @@ div.tac-dialog-label { flex-direction: row; justify-content: space-between; marg
|
|
|
5620
6288
|
.tac-item-bottom .ta-host-tag { gap: 4px; }
|
|
5621
6289
|
.tac-item-bottom .ta-host-tag > svg { width: calc(12px * var(--ta-font-scale)); height: calc(12px * var(--ta-font-scale)); }
|
|
5622
6290
|
.tac-item-bottom .ta-host-tag + .tac-item-preview::before { content: '·'; margin-right: 6px; }
|
|
5623
|
-
/* The panda's ears are ink, lost on a dark page: a lighter ink there. */
|
|
5624
|
-
:root:not([data-theme='light']) .tac-face[data-face="11"] .tac-face-body > g > circle { fill: #4a4a52; }
|
|
5625
|
-
.tac-face { display: inline-flex; flex: none; }
|
|
5626
|
-
.tac-face svg { display: block; overflow: visible; }
|
|
5627
|
-
.tac-face-eyes { transform-box: fill-box; transform-origin: center; animation: tac-blink 5.2s infinite; }
|
|
5628
|
-
.tac-face[data-face="1"] .tac-face-eyes, .tac-face[data-face="5"] .tac-face-eyes, .tac-face[data-face="9"] .tac-face-eyes, .tac-face[data-face="13"] .tac-face-eyes { animation-delay: -1.7s; }
|
|
5629
|
-
.tac-face[data-face="2"] .tac-face-eyes, .tac-face[data-face="6"] .tac-face-eyes, .tac-face[data-face="10"] .tac-face-eyes, .tac-face[data-face="14"] .tac-face-eyes { animation-delay: -3.1s; }
|
|
5630
|
-
.tac-face[data-face="3"] .tac-face-eyes, .tac-face[data-face="7"] .tac-face-eyes, .tac-face[data-face="11"] .tac-face-eyes, .tac-face[data-face="15"] .tac-face-eyes { animation-delay: -4.4s; }
|
|
5631
|
-
.tac-face-working .tac-face-look { animation: tac-look 2.4s ease-in-out infinite; }
|
|
5632
|
-
.tac-face-working .tac-face-body { transform-box: fill-box; transform-origin: 50% 100%; animation: tac-bob 1.2s ease-in-out infinite; }
|
|
5633
|
-
@keyframes tac-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }
|
|
5634
|
-
@keyframes tac-look { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-1.4px); } 70% { transform: translateX(1.4px); } }
|
|
5635
|
-
@keyframes tac-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.2px); } }
|
|
5636
|
-
@media (prefers-reduced-motion: reduce) { .tac-face * { animation: none !important; } }
|
|
5637
6291
|
.tac-room { position: relative; display: inline-flex; flex: none; }
|
|
5638
6292
|
.tac-room-back { position: absolute; right: 0; top: 0; }
|
|
5639
6293
|
.tac-room-front { position: absolute; left: 0; bottom: 0; z-index: 1; }
|
|
@@ -5716,6 +6370,9 @@ textarea.tac-input { resize: vertical; min-height: 56px; line-height: 1.5; }
|
|
|
5716
6370
|
.tac-item-more > .tac-action:hover, .tac-item-more > .tac-action[aria-expanded="true"] { background: var(--ta-hover-strong); color: var(--ta-text); }
|
|
5717
6371
|
.tac-item-row:hover .tac-item-more > .tac-action, .tac-double-row:hover .tac-item-more > .tac-action, .tac-item-more > .tac-action:focus-visible, .tac-item-more > .tac-action[aria-expanded="true"] { opacity: 1; }
|
|
5718
6372
|
.tac-item-row:hover .tac-item-time, .tac-item-row:has(.tac-item-more [aria-expanded="true"]) .tac-item-time { visibility: hidden; }
|
|
6373
|
+
/* The double's time and spinner end where a task's do (its border and padding make the 10px of a row); its … covers them while hovered. */
|
|
6374
|
+
.tac-double-row:has(> .tac-item-more):hover .tac-double :is(.tac-item-time, .tac-spinner), .tac-double-row:has(.tac-item-more [aria-expanded="true"]) .tac-double :is(.tac-item-time, .tac-spinner) { visibility: hidden; }
|
|
6375
|
+
:root[data-touch] .tac-double-row .tac-double :is(.tac-item-time, .tac-spinner) { visibility: visible; }
|
|
5719
6376
|
.tac-agent-menu { position: fixed; right: auto; width: max-content; min-width: 210px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; padding: 5px; border-color: var(--ta-border); background: var(--ta-side); }
|
|
5720
6377
|
/* A row whose menu is open is over the rows after it: a row that swipes (ui.SwipeRow) is a layer of its own, which would draw the next rows over its menu. */
|
|
5721
6378
|
.ta-swipe-content:has(> .tac-item-more > [aria-expanded="true"]), .tac-item-row:has(> .tac-item-more > [aria-expanded="true"]), .tac-double-row:has(.tac-item-more > [aria-expanded="true"]) { z-index: 5; }
|
|
@@ -5731,7 +6388,6 @@ textarea.tac-role-input { min-height: 200px; max-height: 50vh; font-size: calc(1
|
|
|
5731
6388
|
*/
|
|
5732
6389
|
:root[data-touch] .tac-item-more > .tac-action { visibility: hidden; }
|
|
5733
6390
|
:root[data-touch] .tac-item-row .tac-item-time { visibility: visible; }
|
|
5734
|
-
:root[data-touch] .tac-double { padding-right: 10px; }
|
|
5735
6391
|
:root[data-touch] .tac-item:not(.tac-selected):hover { --tac-bg: var(--ta-side); background: none; }
|
|
5736
6392
|
:root[data-touch] .tac-double:hover { --tac-double-bg: var(--ta-raised); }
|
|
5737
6393
|
:root[data-theme='light'][data-touch] .tac-double:hover { --tac-double-bg: var(--ta-card); }
|
|
@@ -5748,7 +6404,7 @@ textarea.tac-role-input { min-height: 200px; max-height: 50vh; font-size: calc(1
|
|
|
5748
6404
|
.tac-double-line > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
5749
6405
|
/* Something goes on: a spinner ends its line, as in the list of conversations. */
|
|
5750
6406
|
.tac-spinner.ta-spinner { width: 12px; height: 12px; }
|
|
5751
|
-
.tac-double-line.tac-waiting { color: color-mix(in srgb, var(--ta-
|
|
6407
|
+
.tac-double-line.tac-waiting { color: color-mix(in srgb, var(--ta-blue) 85%, var(--ta-text)); }
|
|
5752
6408
|
.tac-section { display: flex; flex-direction: column; }
|
|
5753
6409
|
/* A section is named, not boxed: a quiet name and count, the chevron only while hovered or folded. */
|
|
5754
6410
|
.tac-section + .tac-section { margin-top: 10px; }
|
|
@@ -5785,9 +6441,13 @@ textarea.tac-role-input { min-height: 200px; max-height: 50vh; font-size: calc(1
|
|
|
5785
6441
|
.tac-double-face > .tac-dot { right: 1px; bottom: 1px; width: 14px; height: 14px; border-width: 2.5px; --tac-bg: var(--tac-double-bg); }
|
|
5786
6442
|
.tac-dot-running { --tac-dot: var(--ta-green); }
|
|
5787
6443
|
.tac-dot-attention { --tac-dot: var(--ta-yellow); }
|
|
6444
|
+
/* It waits for the user to decide: a blue ?, as the rows of the chats (ta-notify.md 6), larger to hold it. */
|
|
6445
|
+
.tac-dot-ask { --tac-dot: var(--ta-blue); display: grid; place-items: center; right: -3px; bottom: -3px; width: 17px; height: 17px; color: #fff; font-size: calc(10px * var(--ta-font-scale)); font-weight: 700; line-height: 1; }
|
|
6446
|
+
.tac-dot-ask::before { content: '?'; }
|
|
6447
|
+
.tac-double-face > .tac-dot-ask { right: 0; bottom: 0; width: 18px; height: 18px; }
|
|
5788
6448
|
/* The dot grows in, turns from green to amber when an answer ends unseen (a ripple or two says so), and shrinks away once looked at. */
|
|
5789
6449
|
.tac-dot { transform: scale(0); opacity: 0; transition: transform 0.24s cubic-bezier(0.3, 1.5, 0.5, 1), opacity 0.18s ease, background-color 0.5s ease; }
|
|
5790
|
-
.tac-dot-running, .tac-dot-attention { transform: none; opacity: 1; }
|
|
6450
|
+
.tac-dot-running, .tac-dot-attention, .tac-dot-ask { transform: none; opacity: 1; }
|
|
5791
6451
|
.tac-dot-attention::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; animation: tac-ripple 1.5s ease-out 0.3s 2 both; }
|
|
5792
6452
|
@keyframes tac-ripple { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ta-yellow) 55%, transparent); } to { box-shadow: 0 0 0 7px color-mix(in srgb, var(--ta-yellow) 0%, transparent); } }
|
|
5793
6453
|
@media (prefers-reduced-motion: reduce) { .tac-dot { transition: opacity 0.18s ease; } .tac-dot-attention::after { animation: none; } }
|
|
@@ -5795,7 +6455,7 @@ textarea.tac-role-input { min-height: 200px; max-height: 50vh; font-size: calc(1
|
|
|
5795
6455
|
.tac-item-preview.tac-fresh, .tac-double-line.tac-fresh { color: var(--ta-text); }
|
|
5796
6456
|
.tac-section-alert { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ta-yellow); }
|
|
5797
6457
|
|
|
5798
|
-
.tac-item-preview.tac-waiting { color: color-mix(in srgb, var(--ta-
|
|
6458
|
+
.tac-item-preview.tac-waiting { color: color-mix(in srgb, var(--ta-blue) 85%, var(--ta-text)); }
|
|
5799
6459
|
.tac-task-face { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; overflow: hidden; }
|
|
5800
6460
|
.tac-task-glyph { background: var(--ta-chip); color: var(--ta-secondary); }
|
|
5801
6461
|
/* No task yet: one quiet line where they will be, so the place is known before the first. */
|
|
@@ -5974,17 +6634,19 @@ function activate(pi) {
|
|
|
5974
6634
|
new ChannelToolLines(context).register();
|
|
5975
6635
|
pi.registerMessageRenderer(HandOff.CARD, HandOffView.card(context));
|
|
5976
6636
|
pi.registerComposerAddon(HandOffView.composerAddon(context));
|
|
6637
|
+
const partners = !!pi.ui.doubleInChats;
|
|
5977
6638
|
pi.registerView("channels", {
|
|
5978
|
-
title: () => ChannelWords.of(pi.ui.language).title,
|
|
5979
|
-
icon: ChannelViews.icon(pi, "Bot"),
|
|
6639
|
+
title: () => partners ? ChannelWords.of(pi.ui.language).partners : ChannelWords.of(pi.ui.language).title,
|
|
6640
|
+
icon: ChannelViews.icon(pi, partners ? "Users" : "Bot"),
|
|
5980
6641
|
head: () => /* @__PURE__ */ React.createElement(SidebarHead, {
|
|
5981
6642
|
context
|
|
5982
6643
|
}),
|
|
5983
6644
|
render: () => /* @__PURE__ */ React.createElement(AgentsSidebar, {
|
|
5984
|
-
context
|
|
6645
|
+
context,
|
|
6646
|
+
partners
|
|
5985
6647
|
}),
|
|
5986
6648
|
location: "sidebar",
|
|
5987
|
-
pages: [DOUBLE_PAGE, CHANNEL_PAGE, AGENT_PAGE],
|
|
6649
|
+
pages: partners ? [CHANNEL_PAGE, AGENT_PAGE] : [DOUBLE_PAGE, CHANNEL_PAGE, AGENT_PAGE],
|
|
5988
6650
|
order: 80
|
|
5989
6651
|
});
|
|
5990
6652
|
pi.registerView("channel", {
|