@spzxg/cli-ui 0.6.18 → 0.6.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -2
- package/README.md +3 -3
- package/dist/{cli-ui-embed-Dsw7A8BQ.js → cli-ui-embed-CqlqLmqo.js} +16560 -16067
- package/dist/{cli-ui-index-CHFgaDHY.js → cli-ui-index-Sfzuyqlg.js} +2 -2
- package/dist/{cli-ui-jszip.min-Dw9DMuD5.js → cli-ui-jszip.min-CRpifsVf.js} +2 -2
- package/dist/{cli-ui-jszip.min-DDRprLiN.js → cli-ui-jszip.min-sxxjuGID.js} +1 -1
- package/dist/{cli-ui-xlsx-BUG2_Azh.js → cli-ui-xlsx-DWi3sNAU.js} +1 -1
- package/dist/cli-ui.js +1 -1
- package/package.json +1 -1
- package/src/board/FileViewer.tsx +115 -16
- package/src/board/frameQuote.ts +39 -8
- package/src/board/htmlWorkspace.ts +489 -0
- package/src/board/previewCache.ts +134 -0
- package/src/chat/CliChat.tsx +13 -3
- package/src/chat/Composer.tsx +1 -1
- package/src/core/config.ts +1 -1
- package/src/index.ts +1 -0
- package/src/operator/node/Chat.tsx +6 -1
- package/src/operator/node/Composer.tsx +2 -2
|
@@ -298,7 +298,12 @@ function ChatSession({ project, task, tasks, agents, messages, running, transcri
|
|
|
298
298
|
)}
|
|
299
299
|
</div>
|
|
300
300
|
</div>
|
|
301
|
-
{!readOnly && composer?.show !== false ? <Composer tasks={tasks} onFork={onFork} task={task} agentLabel={agentLabel(agents, task.agent)} disabled={task.started!==1} configBusy={configBusy} running={running} onSend={async text => {
|
|
301
|
+
{!readOnly && composer?.show !== false ? <Composer tasks={tasks} onFork={onFork} task={task} agentLabel={agentLabel(agents, task.agent)} disabled={task.started!==1} configBusy={configBusy} running={running} onSend={async text => {
|
|
302
|
+
if (running) await stopTurn().catch(() => false);
|
|
303
|
+
const sent = await onSend(text);
|
|
304
|
+
if (sent) scrollToBottom("auto");
|
|
305
|
+
return sent;
|
|
306
|
+
}} onStop={onStop} onClear={onClear} quoteRequest={quoteRequest} onQuoteHandled={()=>setQuoteRequest(null)} controls={controls}
|
|
302
307
|
fileUpload={composer?.fileUpload} queued={queued} /> : queued}
|
|
303
308
|
</SubagentChatScope></FileLinkContext.Provider>
|
|
304
309
|
);
|
|
@@ -273,7 +273,7 @@ export function Composer({ task, agentLabel, disabled, running, onSend, onStop,
|
|
|
273
273
|
<button className="attach-x" disabled={locked} aria-label={`移除 ${a.name}`} onClick={() => removeAtt(a.key)}>×</button>
|
|
274
274
|
</div>)}</div>}
|
|
275
275
|
<div className="comp-area"><textarea ref={ref} rows={2} value={draft.text} disabled={locked} aria-label="消息输入框" aria-expanded={mentionOpen} aria-controls={mentionOpen ? `mentions-${task.id}` : undefined} aria-activedescendant={mentionOpen && candidates.length ? `mention-${candidates[Math.min(mentionIndex, candidates.length - 1)].id}` : undefined}
|
|
276
|
-
placeholder={configBusy ? "正在保存设置…" : disabled ? "启动会话后即可回复…" : sources.length ? "描述这些新分支要继续完成的工作…" : running ? "
|
|
276
|
+
placeholder={configBusy ? "正在保存设置…" : disabled ? "启动会话后即可回复…" : sources.length ? "描述这些新分支要继续完成的工作…" : running ? "输入新消息,发送将停止当前轮次并立即执行…" : `和 ${agentLabel} 一起工作`}
|
|
277
277
|
onCompositionStart={() => { composing.current = true; }} onCompositionEnd={() => { composing.current = false; }}
|
|
278
278
|
onChange={(e) => { const text = e.target.value; update((d) => ({ ...d, text })); setSlash(text.trim().startsWith("/")); setCaret(e.target.selectionStart); setMentionClosed(false); setMentionIndex(0); }}
|
|
279
279
|
onSelect={(e) => setCaret(e.currentTarget.selectionStart)}
|
|
@@ -312,7 +312,7 @@ export function Composer({ task, agentLabel, disabled, running, onSend, onStop,
|
|
|
312
312
|
<RunControls {...controls} disabled={controls.disabled || sending} />
|
|
313
313
|
<div className="send-group">
|
|
314
314
|
{showStop ? <button type="button" className="send stop" disabled={stopping} aria-busy={stopping} aria-label={stopping ? "正在停止" : "停止当前轮次"} title={stopping ? "正在停止…" : "停止当前轮次"} onClick={() => void stop()}>{stopping ? <span className="spinner" /> : Icon.stop()}</button>
|
|
315
|
-
: <button type="button" className={`send${running ? " queue" : ""}`} disabled={!canSend} aria-busy={sending} aria-label={sending ? "正在发送" : sources.length ? `派生 ${sources.length} 个分支` : running ? "排队发送" : "发送消息"} title={sending ? "发送中…" : running ? "
|
|
315
|
+
: <button type="button" className={`send${running ? " queue" : ""}`} disabled={!canSend} aria-busy={sending} aria-label={sending ? "正在发送" : sources.length ? `派生 ${sources.length} 个分支` : running ? "排队发送" : "发送消息"} title={sending ? "发送中…" : running ? "停止当前轮次并立即发送" : "发送消息(Enter)"} onClick={() => void submit()}>{sending ? <span className="spinner" /> : Icon.send()}</button>}
|
|
316
316
|
</div>
|
|
317
317
|
</div>
|
|
318
318
|
</div>
|