zugzbot 1.0.15 → 1.0.16
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.
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>client</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-YZKuRh4S.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-GxkFc3Mh.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
@@ -796,9 +796,26 @@ export default function App() {
|
|
|
796
796
|
const data = await res.json()
|
|
797
797
|
if (currentSessionId && data[currentSessionId]) {
|
|
798
798
|
const status = data[currentSessionId]
|
|
799
|
-
const isBusy = status === 'thinking' || status === 'running_tools' || status === 'busy'
|
|
799
|
+
const isBusy = status === 'thinking' || status === 'running_tools' || status === 'busy' || status === 'running' || status === 'executing' || status === 'processing'
|
|
800
800
|
|
|
801
|
-
|
|
801
|
+
// Heurística de doble capa: buscar si la última parte de herramienta en el historial sigue activa
|
|
802
|
+
let hasRunningTool = false
|
|
803
|
+
if (messages.length > 0) {
|
|
804
|
+
const lastMsg = messages[messages.length - 1]
|
|
805
|
+
if (lastMsg.info.role === 'assistant' && lastMsg.parts) {
|
|
806
|
+
const lastToolPart = [...lastMsg.parts].reverse().find(p => p.type === 'tool')
|
|
807
|
+
if (lastToolPart && lastToolPart.state) {
|
|
808
|
+
const toolStatus = lastToolPart.state.status
|
|
809
|
+
if (toolStatus === 'running' || toolStatus === 'thinking' || toolStatus === 'processing' || toolStatus === 'active') {
|
|
810
|
+
hasRunningTool = true
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
const isReallyBusy = isBusy || hasRunningTool
|
|
817
|
+
|
|
818
|
+
if (isReallyBusy) {
|
|
802
819
|
setIsProcessing(prev => {
|
|
803
820
|
if (isAbortingRef.current) return false
|
|
804
821
|
if (!prev) {
|
|
@@ -2366,7 +2383,7 @@ export default function App() {
|
|
|
2366
2383
|
)}
|
|
2367
2384
|
|
|
2368
2385
|
{/* INDICADOR DE CARGA EN TIEMPO REAL DEL AGENTE */}
|
|
2369
|
-
{isProcessing &&
|
|
2386
|
+
{isProcessing && (
|
|
2370
2387
|
<div className="flex gap-4 max-w-4xl mx-auto justify-start">
|
|
2371
2388
|
<div className="h-8 w-8 rounded-full border border-[#2e2e33] bg-[#18181b] flex items-center justify-center text-[#fafafa] shrink-0">
|
|
2372
2389
|
<Bot size={16} className="animate-spin text-emerald-400" style={{ animationDuration: '4s' }} />
|
|
@@ -2441,12 +2458,12 @@ export default function App() {
|
|
|
2441
2458
|
</div>
|
|
2442
2459
|
</div>
|
|
2443
2460
|
|
|
2444
|
-
|
|
2461
|
+
{/* Input Textarea principal */}
|
|
2445
2462
|
<div className="relative border border-[#27272a] focus-within:border-[#3f3f46] rounded-xl bg-[#0c0c0e] overflow-hidden shadow-lg transition duration-200">
|
|
2446
2463
|
<textarea
|
|
2447
2464
|
value={inputValue}
|
|
2448
2465
|
onChange={e => setInputValue(e.target.value)}
|
|
2449
|
-
disabled={!currentSessionId}
|
|
2466
|
+
disabled={!currentSessionId || isProcessing}
|
|
2450
2467
|
onKeyDown={e => {
|
|
2451
2468
|
if (e.key === 'Enter' && !e.shiftKey) {
|
|
2452
2469
|
e.preventDefault()
|
|
@@ -2456,6 +2473,8 @@ export default function App() {
|
|
|
2456
2473
|
placeholder={
|
|
2457
2474
|
!currentSessionId
|
|
2458
2475
|
? "Debe haber una sesión activa de Opencode para enviar prompts. Por favor, inicia conexión o crea una sesión."
|
|
2476
|
+
: isProcessing
|
|
2477
|
+
? "El agente está procesando tu solicitud... Por favor, espera a que termine o haz clic en 'Abortar' para cancelar."
|
|
2459
2478
|
: inputValue.startsWith('/')
|
|
2460
2479
|
? "Escribe los argumentos para el comando... (ej. /loop Crear login)"
|
|
2461
2480
|
: `Instrucción para ${activeInstance?.name || 'Opencode'} usando ${AVAILABLE_AGENTS.find(a => a.id === selectedAgent)?.name || selectedAgent}... (Escribe / para ver comandos, Shift+Enter para nueva línea)`
|