@wrongstack/webui 0.317.0 → 0.318.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/dist/assets/AgentRosterView-C46rL23K.js +9 -0
- package/dist/assets/{AnalyticsDashboard-zDBIqTxO.js → AnalyticsDashboard-B8r_8kNv.js} +1 -1
- package/dist/assets/{AudienceMemoryPanel-BnNJ0EhQ.js → AudienceMemoryPanel-Ciybycpn.js} +1 -1
- package/dist/assets/{ChangesView-CGwCocSR.js → ChangesView-BREfCsEq.js} +1 -1
- package/dist/assets/{ChimeraReviewsView-CFxZwJBI.js → ChimeraReviewsView-aSYmQ8tC.js} +1 -1
- package/dist/assets/ChronicleDashboard-bo2jv52s.js +1 -0
- package/dist/assets/{CodeEditor-CZcMPNTH.js → CodeEditor-C_KzNkIb.js} +2 -2
- package/dist/assets/CodeMap-DA_k3u5g.js +1 -0
- package/dist/assets/{ConfirmModal-CUGk-0lT.js → ConfirmModal-gukSikBD.js} +1 -1
- package/dist/assets/{CronJobsPanel-C_wutCVP.js → CronJobsPanel-D-43oYQ-.js} +1 -1
- package/dist/assets/{DeadCodeScanPanel-DCCjg17Q.js → DeadCodeScanPanel-VnMQatbH.js} +1 -1
- package/dist/assets/{DebugDashboard-D-ogYAbO.js → DebugDashboard-DNDadwro.js} +1 -1
- package/dist/assets/{DesignGalleryView-CtlHZWOn.js → DesignGalleryView-B9ZMJPOQ.js} +1 -1
- package/dist/assets/{GoalView-Czksj2nD.js → GoalView-BkoCNN8l.js} +1 -1
- package/dist/assets/KanbanView-nql6LkaS.js +3 -0
- package/dist/assets/MailboxDetailView-CdHRfnNq.js +1 -0
- package/dist/assets/{MemoryDrawer-D9Chtt6v.js → MemoryDrawer-CfukdhlF.js} +1 -1
- package/dist/assets/MemoryManager-BD_VnFAu.js +1 -0
- package/dist/assets/{ModelPicker-vwrqLOL4.js → ModelPicker-C3r7IFfh.js} +1 -1
- package/dist/assets/OfficeMapPanel-B47jfEHf.js +4 -0
- package/dist/assets/{ProcessMonitor-CHPTCtyu.js → ProcessMonitor-CvHdN8Bn.js} +1 -1
- package/dist/assets/{PromptJournalView-tOTjKpi8.js → PromptJournalView-CXZ9notj.js} +1 -1
- package/dist/assets/{QueuePanel-BIwoG-tG.js → QueuePanel-DOcgHRH3.js} +1 -1
- package/dist/assets/{RefreshDebugView-DesPEAAq.js → RefreshDebugView-BYmeORMQ.js} +1 -1
- package/dist/assets/{RequirementIntakeView-BonXC1a5.js → RequirementIntakeView-CFgVx_0T.js} +1 -1
- package/dist/assets/{SageTabs-82lpgRh-.js → SageTabs-BRJG0fhZ.js} +2 -2
- package/dist/assets/{SddFlowGraph-CMedulJi.js → SddFlowGraph-BsfhxlDK.js} +1 -1
- package/dist/assets/SddHub-Br1vyCgq.js +2 -0
- package/dist/assets/{SessionInspectView-BUs2B4mF.js → SessionInspectView-BSRjWErA.js} +1 -1
- package/dist/assets/SessionList-BkaI91oW.js +1 -0
- package/dist/assets/{SessionsDashboard-JtwQf-N5.js → SessionsDashboard-BEQs4Div.js} +1 -1
- package/dist/assets/{SetupScreen-XFBFjPbd.js → SetupScreen-zY4541lT.js} +1 -1
- package/dist/assets/SkillDetailView-DqxkOnb8.js +3 -0
- package/dist/assets/{SpecsView-D6GqoZ2L.js → SpecsView-COS0-sxq.js} +1 -1
- package/dist/assets/TechStackView-Dr8vI0hK.js +2 -0
- package/dist/assets/{TerminalPanel-BcizpYrZ.js → TerminalPanel-DlIyvxm6.js} +1 -1
- package/dist/assets/{button-C_EYpeP-.js → button-DNyYztcH.js} +1 -1
- package/dist/assets/{chat-store-x5w4ss_D.js → chat-store-DIcs826A.js} +1 -1
- package/dist/assets/{codemap-activity-store-ZCXcHlwd.js → codemap-activity-store-Br4b57a0.js} +1 -1
- package/dist/assets/codemap-index-store-tSmlp7Uz.js +1 -0
- package/dist/assets/{dialog-9eW9sG90.js → dialog-BTHxOi5z.js} +1 -1
- package/dist/assets/{empty-state-DJb_tw7Q.js → empty-state-DBQN80mK.js} +1 -1
- package/dist/assets/i18n-Cv65b1SP.js +2 -0
- package/dist/assets/index-DSyVpLgL.css +1 -0
- package/dist/assets/{index-CTyM4bm8.js → index-DbprKWmG.js} +59 -59
- package/dist/assets/{input-CsEvo8Oo.js → input-CTGeYzNe.js} +1 -1
- package/dist/assets/{mailbox-store-KHcrg_Fm.js → mailbox-store-B9DIvRgo.js} +1 -1
- package/dist/assets/{roster-ws-CXnrEaEu.js → roster-ws-D5JW3IPJ.js} +1 -1
- package/dist/assets/setup-BQLPzL3N.js +1 -0
- package/dist/assets/setup-C9lrNwQF.js +1 -0
- package/dist/assets/setup-CcxP7cUl.js +1 -0
- package/dist/assets/setup-CtKKNpH9.js +1 -0
- package/dist/assets/{setup-COxU-AT_.js → setup-D4rp2jda.js} +1 -1
- package/dist/assets/setup-MvmOtwNp.js +1 -0
- package/dist/assets/setup-blxUcxNU.js +1 -0
- package/dist/assets/{shared-sYlGVRJI.js → shared-CLfD85oZ.js} +1 -1
- package/dist/assets/stores-CNuMLG8X.js +7 -0
- package/dist/assets/{ui-store-9b7zzi3V.js → ui-store-DpKUBLWd.js} +1 -1
- package/dist/assets/{useWebSocket-1kxFH7f8.js → useWebSocket-VIItbvVK.js} +15 -15
- package/dist/assets/utils-DQ9Exx8j.js +1 -0
- package/dist/assets/{vector-memory-panel-Dd3jXXYA.js → vector-memory-panel-B4bQhdHe.js} +1 -1
- package/dist/assets/{vendor-UFryhfbN.js → vendor-enc0q-Va.js} +30 -30
- package/dist/assets/{view-navigation-ICwpL9qw.js → view-navigation-DPOY0lyt.js} +1 -1
- package/dist/assets/{ws-client-Ccf_VLRQ.js → ws-client-D-d32pHb.js} +4 -4
- package/dist/index.html +20 -20
- package/dist/index.js +819 -477
- package/dist/lib/bug-hunt-message.d.ts +9 -0
- package/dist/stores/file-store.d.ts +9 -0
- package/dist/stores/local-prefs.d.ts +5 -1
- package/dist/stores/types.d.ts +7 -0
- package/package.json +9 -9
- package/dist/assets/AgentRosterView-CESYPVXA.js +0 -9
- package/dist/assets/ChronicleDashboard-DKiMK5nl.js +0 -1
- package/dist/assets/CodeMap-zPUlmh5G.js +0 -1
- package/dist/assets/KanbanView-C5_GD0qk.js +0 -3
- package/dist/assets/MailboxDetailView-2rWp3cTv.js +0 -1
- package/dist/assets/MemoryManager-Bj41s3KW.js +0 -1
- package/dist/assets/OfficeMapPanel-BfuePIGH.js +0 -4
- package/dist/assets/SddHub-D3Gm4Io2.js +0 -2
- package/dist/assets/SessionList-DxQgJqgl.js +0 -1
- package/dist/assets/SkillDetailView-C_P_-783.js +0 -3
- package/dist/assets/TechStackView-BE4tdEYZ.js +0 -2
- package/dist/assets/codemap-index-store-Cb5mn74P.js +0 -1
- package/dist/assets/i18n-DkMSw3tI.js +0 -2
- package/dist/assets/index-BSpLtv9S.css +0 -1
- package/dist/assets/setup-BOYK0I6-.js +0 -1
- package/dist/assets/setup-Bd23KLtt.js +0 -1
- package/dist/assets/setup-CMteRkTs.js +0 -1
- package/dist/assets/setup-DD8rKpQU.js +0 -1
- package/dist/assets/setup-DfcCCvUO.js +0 -1
- package/dist/assets/setup-pPW1kVR_.js +0 -1
- package/dist/assets/stores-5ynEAenb.js +0 -7
- package/dist/assets/utils-DIo8iytt.js +0 -1
package/dist/index.js
CHANGED
|
@@ -109,6 +109,8 @@ var init_local_prefs = __esm({
|
|
|
109
109
|
"use strict";
|
|
110
110
|
init_languages();
|
|
111
111
|
SESSION_SCOPED_PREFS = [
|
|
112
|
+
"subagentsAllowed",
|
|
113
|
+
"subagentsPolicyLocked",
|
|
112
114
|
"autonomy",
|
|
113
115
|
"autonomyDelayMs",
|
|
114
116
|
"autoProceedMaxIterations",
|
|
@@ -127,6 +129,8 @@ var init_local_prefs = __esm({
|
|
|
127
129
|
];
|
|
128
130
|
SESSION_SCOPED_PREF_SET = new Set(SESSION_SCOPED_PREFS);
|
|
129
131
|
DEFAULTS = {
|
|
132
|
+
subagentsAllowed: true,
|
|
133
|
+
subagentsPolicyLocked: false,
|
|
130
134
|
// Default to self-driving + auto-approve, matching the core config defaults
|
|
131
135
|
// (config.autonomy.defaultMode='auto', config.yolo=true). Existing browsers
|
|
132
136
|
// are synced from the server's prefs snapshot on connect (handlePrefsUpdated),
|
|
@@ -5411,6 +5415,18 @@ var require_setup = __commonJS({
|
|
|
5411
5415
|
noKeyTitle: "No API key configured yet",
|
|
5412
5416
|
noKeyBody: "Register a provider in Settings before sending a message \u2014 otherwise the agent has nothing to talk to. Anthropic, OpenAI, Google, and any OpenAI-compatible endpoint all work.",
|
|
5413
5417
|
openSettings: "Open Settings",
|
|
5418
|
+
bugHunterTitle: "Start Elite Bug Hunter",
|
|
5419
|
+
bugHunterBody: "Find, prove, and fix one real bug, verify it, then stop for review.",
|
|
5420
|
+
bugHunterScope: "Scope",
|
|
5421
|
+
bugHunterWholeProject: "Whole project",
|
|
5422
|
+
bugHunterDirectoryScope: "{{path}} and below",
|
|
5423
|
+
bugHunterMaxBugs: "Max bugs",
|
|
5424
|
+
bugHunterStart: "Start hunt",
|
|
5425
|
+
soloSessionTitle: "Solo session",
|
|
5426
|
+
soloSessionBody: "Blocks Chimera, delegation, and every background subagent. Locks after your first message.",
|
|
5427
|
+
on: "On",
|
|
5428
|
+
off: "Off",
|
|
5429
|
+
bugHunterError: "The Elite Bug Hunter prompt could not be loaded. Check the prompt library and try again.",
|
|
5414
5430
|
pickBackUp: "Pick back up",
|
|
5415
5431
|
recentPrompts: "Recent prompts",
|
|
5416
5432
|
quickCommands: "Quick commands",
|
|
@@ -10496,6 +10512,18 @@ var require_setup2 = __commonJS({
|
|
|
10496
10512
|
noKeyTitle: "Noch kein API-Schl\xFCssel konfiguriert",
|
|
10497
10513
|
noKeyBody: "Registriere einen Anbieter in den Einstellungen, bevor du eine Nachricht sendest \u2014 sonst hat der Agent niemanden, mit dem er reden kann. Anthropic, OpenAI, Google und jeder OpenAI-kompatible Endpunkt funktionieren.",
|
|
10498
10514
|
openSettings: "Einstellungen \xF6ffnen",
|
|
10515
|
+
bugHunterTitle: "Elite Bug Hunter starten",
|
|
10516
|
+
bugHunterBody: "Findet, beweist und behebt genau einen echten Fehler, pr\xFCft ihn und h\xE4lt dann an.",
|
|
10517
|
+
bugHunterScope: "Bereich",
|
|
10518
|
+
bugHunterWholeProject: "Ganzes Projekt",
|
|
10519
|
+
bugHunterDirectoryScope: "{{path}} und darunter",
|
|
10520
|
+
bugHunterMaxBugs: "Max. Fehler",
|
|
10521
|
+
bugHunterStart: "Suche starten",
|
|
10522
|
+
soloSessionTitle: "Solo-Sitzung",
|
|
10523
|
+
soloSessionBody: "Blockiert Chimera, Delegierung und alle Hintergrundagenten. Nach der ersten Nachricht gesperrt.",
|
|
10524
|
+
on: "Ein",
|
|
10525
|
+
off: "Aus",
|
|
10526
|
+
bugHunterError: "Der Elite-Bug-Hunter-Prompt konnte nicht geladen werden. Pr\xFCfe die Prompt-Bibliothek und versuche es erneut.",
|
|
10499
10527
|
pickBackUp: "Fortsetzen",
|
|
10500
10528
|
recentPrompts: "Zuletzt verwendete Prompts",
|
|
10501
10529
|
quickCommands: "Schnellbefehle",
|
|
@@ -15581,6 +15609,18 @@ var require_setup3 = __commonJS({
|
|
|
15581
15609
|
noKeyTitle: "A\xFAn no se ha configurado ninguna clave de API",
|
|
15582
15610
|
noKeyBody: "Registra un proveedor en Ajustes antes de enviar un mensaje; de lo contrario, el agente no tendr\xE1 con qui\xE9n comunicarse. Anthropic, OpenAI, Google y cualquier endpoint compatible con OpenAI funcionan.",
|
|
15583
15611
|
openSettings: "Abrir Ajustes",
|
|
15612
|
+
bugHunterTitle: "Iniciar Elite Bug Hunter",
|
|
15613
|
+
bugHunterBody: "Encuentra, demuestra y corrige un error real, lo verifica y se detiene para revisi\xF3n.",
|
|
15614
|
+
bugHunterScope: "\xC1mbito",
|
|
15615
|
+
bugHunterWholeProject: "Todo el proyecto",
|
|
15616
|
+
bugHunterDirectoryScope: "{{path}} y debajo",
|
|
15617
|
+
bugHunterMaxBugs: "M\xE1x. errores",
|
|
15618
|
+
bugHunterStart: "Iniciar b\xFAsqueda",
|
|
15619
|
+
soloSessionTitle: "Sesi\xF3n individual",
|
|
15620
|
+
soloSessionBody: "Bloquea Chimera, la delegaci\xF3n y todos los subagentes en segundo plano. Se bloquea tras el primer mensaje.",
|
|
15621
|
+
on: "Activado",
|
|
15622
|
+
off: "Desactivado",
|
|
15623
|
+
bugHunterError: "No se pudo cargar el prompt de Elite Bug Hunter. Revisa la biblioteca de prompts e int\xE9ntalo de nuevo.",
|
|
15584
15624
|
pickBackUp: "Retomar",
|
|
15585
15625
|
recentPrompts: "Prompts recientes",
|
|
15586
15626
|
quickCommands: "Comandos r\xE1pidos",
|
|
@@ -20667,6 +20707,18 @@ var require_setup4 = __commonJS({
|
|
|
20667
20707
|
noKeyTitle: "Aucune cl\xE9 API configur\xE9e pour le moment",
|
|
20668
20708
|
noKeyBody: "Enregistrez un fournisseur dans les Param\xE8tres avant d'envoyer un message \u2014 sinon l'agent n'aura personne \xE0 qui parler. Anthropic, OpenAI, Google et tout point de terminaison OpenAI-compatible fonctionnent.",
|
|
20669
20709
|
openSettings: "Ouvrir les Param\xE8tres",
|
|
20710
|
+
bugHunterTitle: "Lancer Elite Bug Hunter",
|
|
20711
|
+
bugHunterBody: "Trouve, prouve et corrige un bug r\xE9el, le v\xE9rifie, puis s'arr\xEAte pour validation.",
|
|
20712
|
+
bugHunterScope: "P\xE9rim\xE8tre",
|
|
20713
|
+
bugHunterWholeProject: "Projet entier",
|
|
20714
|
+
bugHunterDirectoryScope: "{{path}} et ses sous-dossiers",
|
|
20715
|
+
bugHunterMaxBugs: "Bugs max.",
|
|
20716
|
+
bugHunterStart: "D\xE9marrer la recherche",
|
|
20717
|
+
soloSessionTitle: "Session solo",
|
|
20718
|
+
soloSessionBody: "Bloque Chimera, la d\xE9l\xE9gation et tous les sous-agents en arri\xE8re-plan. Verrouill\xE9 apr\xE8s le premier message.",
|
|
20719
|
+
on: "Activ\xE9",
|
|
20720
|
+
off: "D\xE9sactiv\xE9",
|
|
20721
|
+
bugHunterError: "Le prompt Elite Bug Hunter n'a pas pu \xEAtre charg\xE9. V\xE9rifiez la biblioth\xE8que de prompts et r\xE9essayez.",
|
|
20670
20722
|
pickBackUp: "Reprendre",
|
|
20671
20723
|
recentPrompts: "Prompts r\xE9cents",
|
|
20672
20724
|
quickCommands: "Commandes rapides",
|
|
@@ -25753,6 +25805,18 @@ var require_setup5 = __commonJS({
|
|
|
25753
25805
|
noKeyTitle: "Nessuna chiave API configurata",
|
|
25754
25806
|
noKeyBody: "Registra un provider in Impostazioni prima di inviare un messaggio \u2014 altrimenti l'agente non ha nessuno con cui parlare. Anthropic, OpenAI, Google e qualsiasi endpoint compatibile con OpenAI funzionano tutti.",
|
|
25755
25807
|
openSettings: "Apri Impostazioni",
|
|
25808
|
+
bugHunterTitle: "Avvia Elite Bug Hunter",
|
|
25809
|
+
bugHunterBody: "Trova, dimostra e corregge un bug reale, lo verifica e poi si ferma per la revisione.",
|
|
25810
|
+
bugHunterScope: "Ambito",
|
|
25811
|
+
bugHunterWholeProject: "Intero progetto",
|
|
25812
|
+
bugHunterDirectoryScope: "{{path}} e sottocartelle",
|
|
25813
|
+
bugHunterMaxBugs: "Bug max",
|
|
25814
|
+
bugHunterStart: "Avvia ricerca",
|
|
25815
|
+
soloSessionTitle: "Sessione singola",
|
|
25816
|
+
soloSessionBody: "Blocca Chimera, la delega e tutti i subagenti in background. Si blocca dopo il primo messaggio.",
|
|
25817
|
+
on: "Attivo",
|
|
25818
|
+
off: "Disattivo",
|
|
25819
|
+
bugHunterError: "Impossibile caricare il prompt Elite Bug Hunter. Controlla la libreria dei prompt e riprova.",
|
|
25756
25820
|
pickBackUp: "Riprendi",
|
|
25757
25821
|
recentPrompts: "Prompt recenti",
|
|
25758
25822
|
quickCommands: "Comandi rapidi",
|
|
@@ -30838,6 +30902,18 @@ var require_setup6 = __commonJS({
|
|
|
30838
30902
|
noKeyTitle: "Nenhuma chave de API configurada ainda",
|
|
30839
30903
|
noKeyBody: "Registre um provedor em Configura\xE7\xF5es antes de enviar uma mensagem \u2014 caso contr\xE1rio, o agente n\xE3o ter\xE1 com quem conversar. Anthropic, OpenAI, Google e qualquer endpoint compat\xEDvel com OpenAI funcionam.",
|
|
30840
30904
|
openSettings: "Abrir Configura\xE7\xF5es",
|
|
30905
|
+
bugHunterTitle: "Iniciar Elite Bug Hunter",
|
|
30906
|
+
bugHunterBody: "Encontra, comprova e corrige um bug real, verifica a corre\xE7\xE3o e para para revis\xE3o.",
|
|
30907
|
+
bugHunterScope: "Escopo",
|
|
30908
|
+
bugHunterWholeProject: "Projeto inteiro",
|
|
30909
|
+
bugHunterDirectoryScope: "{{path}} e abaixo",
|
|
30910
|
+
bugHunterMaxBugs: "M\xE1x. bugs",
|
|
30911
|
+
bugHunterStart: "Iniciar busca",
|
|
30912
|
+
soloSessionTitle: "Sess\xE3o solo",
|
|
30913
|
+
soloSessionBody: "Bloqueia Chimera, delega\xE7\xE3o e todos os subagentes em segundo plano. Bloqueia ap\xF3s a primeira mensagem.",
|
|
30914
|
+
on: "Ligado",
|
|
30915
|
+
off: "Desligado",
|
|
30916
|
+
bugHunterError: "N\xE3o foi poss\xEDvel carregar o prompt Elite Bug Hunter. Verifique a biblioteca de prompts e tente novamente.",
|
|
30841
30917
|
pickBackUp: "Retomar de onde parou",
|
|
30842
30918
|
recentPrompts: "Prompts recentes",
|
|
30843
30919
|
quickCommands: "Comandos r\xE1pidos",
|
|
@@ -35927,6 +36003,18 @@ var require_setup7 = __commonJS({
|
|
|
35927
36003
|
noKeyTitle: "Hen\xFCz API anahtar\u0131 yap\u0131land\u0131r\u0131lmad\u0131",
|
|
35928
36004
|
noKeyBody: "Mesaj g\xF6ndermeden \xF6nce Ayarlar'dan bir sa\u011Flay\u0131c\u0131 kaydedin \u2014 yoksa vekilin ba\u011Flanaca\u011F\u0131 biri olmaz. Anthropic, OpenAI, Google ve OpenAI uyumlu herhangi bir u\xE7 nokta \xE7al\u0131\u015F\u0131r.",
|
|
35929
36005
|
openSettings: "Ayarlar\u0131 a\xE7",
|
|
36006
|
+
bugHunterTitle: "Elite Bug Hunter'\u0131 ba\u015Flat",
|
|
36007
|
+
bugHunterBody: "Ger\xE7ek bir bug bulur, kan\u0131tlar, d\xFCzeltir, do\u011Frular ve inceleme i\xE7in durur.",
|
|
36008
|
+
bugHunterScope: "Kapsam",
|
|
36009
|
+
bugHunterWholeProject: "T\xFCm proje",
|
|
36010
|
+
bugHunterDirectoryScope: "{{path}} ve alt\u0131",
|
|
36011
|
+
bugHunterMaxBugs: "En \xE7ok bug",
|
|
36012
|
+
bugHunterStart: "Av\u0131 ba\u015Flat",
|
|
36013
|
+
soloSessionTitle: "Solo session",
|
|
36014
|
+
soloSessionBody: "Chimera, delegasyon ve t\xFCm arka plan subagent'lar\u0131n\u0131 engeller. \u0130lk mesajdan sonra kilitlenir.",
|
|
36015
|
+
on: "A\xE7\u0131k",
|
|
36016
|
+
off: "Kapal\u0131",
|
|
36017
|
+
bugHunterError: "Elite Bug Hunter promptu y\xFCklenemedi. Prompt library'yi kontrol edip tekrar deneyin.",
|
|
35930
36018
|
pickBackUp: "Kald\u0131\u011F\u0131n yerden devam et",
|
|
35931
36019
|
recentPrompts: "Son promptlar",
|
|
35932
36020
|
quickCommands: "H\u0131zl\u0131 komutlar",
|
|
@@ -48689,6 +48777,29 @@ var init_useViewport = __esm({
|
|
|
48689
48777
|
}
|
|
48690
48778
|
});
|
|
48691
48779
|
|
|
48780
|
+
// src/lib/bug-hunt-message.ts
|
|
48781
|
+
function buildBugHuntMessage(instruction, summary) {
|
|
48782
|
+
return `${BUG_HUNT_PREFIX} scope="${encodeURIComponent(summary.scope)}" max-bugs="${summary.maxBugs}" -->
|
|
48783
|
+
${instruction}`;
|
|
48784
|
+
}
|
|
48785
|
+
function parseBugHuntMessage(content) {
|
|
48786
|
+
const match = BUG_HUNT_PATTERN.exec(content);
|
|
48787
|
+
if (!match) return void 0;
|
|
48788
|
+
try {
|
|
48789
|
+
return { scope: decodeURIComponent(match[1] ?? ""), maxBugs: Number(match[2]) };
|
|
48790
|
+
} catch {
|
|
48791
|
+
return void 0;
|
|
48792
|
+
}
|
|
48793
|
+
}
|
|
48794
|
+
var BUG_HUNT_PREFIX, BUG_HUNT_PATTERN;
|
|
48795
|
+
var init_bug_hunt_message = __esm({
|
|
48796
|
+
"src/lib/bug-hunt-message.ts"() {
|
|
48797
|
+
"use strict";
|
|
48798
|
+
BUG_HUNT_PREFIX = "<!-- wrongstack-bug-hunt";
|
|
48799
|
+
BUG_HUNT_PATTERN = /^<!-- wrongstack-bug-hunt scope="([^"]*)" max-bugs="([123])" -->\n/;
|
|
48800
|
+
}
|
|
48801
|
+
});
|
|
48802
|
+
|
|
48692
48803
|
// src/hooks/ws-handlers/session-replay-handlers.ts
|
|
48693
48804
|
import { projectSessionTimeline } from "@wrongstack/core/types/session-timeline";
|
|
48694
48805
|
function replayTimestamp(ts) {
|
|
@@ -48737,15 +48848,18 @@ function hydrateReplayMessages(replay, markers = [], toolMeta = []) {
|
|
|
48737
48848
|
const timestamp2 = replayTimestamp(item.ts);
|
|
48738
48849
|
const id = replayMessageId(messages.length);
|
|
48739
48850
|
switch (item.kind) {
|
|
48740
|
-
case "user":
|
|
48851
|
+
case "user": {
|
|
48852
|
+
const bugHunt = parseBugHuntMessage(item.text);
|
|
48741
48853
|
messages.push({
|
|
48742
48854
|
id,
|
|
48743
48855
|
role: "user",
|
|
48744
48856
|
content: item.text,
|
|
48745
48857
|
timestamp: timestamp2,
|
|
48858
|
+
...bugHunt ? { bugHunt } : {},
|
|
48746
48859
|
...item.images ? { attachments: replayAttachments(item.images, id) } : {}
|
|
48747
48860
|
});
|
|
48748
48861
|
break;
|
|
48862
|
+
}
|
|
48749
48863
|
case "assistant":
|
|
48750
48864
|
messages.push({ id, role: "assistant", content: item.text, timestamp: timestamp2 });
|
|
48751
48865
|
break;
|
|
@@ -49016,6 +49130,7 @@ var init_session_replay_handlers = __esm({
|
|
|
49016
49130
|
init_favicon();
|
|
49017
49131
|
init_view_navigation();
|
|
49018
49132
|
init_ws_client();
|
|
49133
|
+
init_bug_hunt_message();
|
|
49019
49134
|
init_stores();
|
|
49020
49135
|
init_session_tab_store();
|
|
49021
49136
|
init_resume_progress_store();
|
|
@@ -51968,7 +52083,7 @@ __export(ProcessMonitor_exports, {
|
|
|
51968
52083
|
ProcessMonitor: () => ProcessMonitor
|
|
51969
52084
|
});
|
|
51970
52085
|
import { Shield as Shield2, Square as Square5, Terminal as Terminal7 } from "lucide-react";
|
|
51971
|
-
import { useCallback as
|
|
52086
|
+
import { useCallback as useCallback24, useEffect as useEffect65, useRef as useRef32, useState as useState64 } from "react";
|
|
51972
52087
|
import { jsx as jsx99, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
51973
52088
|
function ProcessMonitor({
|
|
51974
52089
|
open,
|
|
@@ -52003,7 +52118,7 @@ function ProcessMonitor({
|
|
|
52003
52118
|
};
|
|
52004
52119
|
}, [open, wsConnected, ws.client, sessionId]);
|
|
52005
52120
|
const running = processes.filter((p) => p.status === "running");
|
|
52006
|
-
const handleKill =
|
|
52121
|
+
const handleKill = useCallback24(
|
|
52007
52122
|
(proc) => {
|
|
52008
52123
|
if (proc.background && !window.confirm(
|
|
52009
52124
|
t("activity:process.confirmKillBackground", {
|
|
@@ -52018,7 +52133,7 @@ function ProcessMonitor({
|
|
|
52018
52133
|
},
|
|
52019
52134
|
[t, ws.client]
|
|
52020
52135
|
);
|
|
52021
|
-
const handleKillAll =
|
|
52136
|
+
const handleKillAll = useCallback24(() => {
|
|
52022
52137
|
if (!window.confirm(
|
|
52023
52138
|
t("activity:process.confirmKillAll", {
|
|
52024
52139
|
count: running.length,
|
|
@@ -52517,16 +52632,16 @@ var init_FallbackEditor = __esm({
|
|
|
52517
52632
|
});
|
|
52518
52633
|
|
|
52519
52634
|
// src/hooks/useFieldKeyboardNav.ts
|
|
52520
|
-
import { useCallback as
|
|
52635
|
+
import { useCallback as useCallback33, useRef as useRef39 } from "react";
|
|
52521
52636
|
function useFieldKeyboardNav() {
|
|
52522
52637
|
const fieldRefs = useRef39([]);
|
|
52523
|
-
const setFieldRef =
|
|
52638
|
+
const setFieldRef = useCallback33(
|
|
52524
52639
|
(index) => (el) => {
|
|
52525
52640
|
fieldRefs.current[index] = el;
|
|
52526
52641
|
},
|
|
52527
52642
|
[]
|
|
52528
52643
|
);
|
|
52529
|
-
const handleKeyDown =
|
|
52644
|
+
const handleKeyDown = useCallback33(
|
|
52530
52645
|
(e, index, onEnter) => {
|
|
52531
52646
|
if (e.key === "ArrowDown") {
|
|
52532
52647
|
e.preventDefault();
|
|
@@ -52573,8 +52688,8 @@ var init_useFieldKeyboardNav = __esm({
|
|
|
52573
52688
|
});
|
|
52574
52689
|
|
|
52575
52690
|
// src/components/SetupScreen/ModelEditor.tsx
|
|
52576
|
-
import { Check as Check19, Loader2 as
|
|
52577
|
-
import { useCallback as
|
|
52691
|
+
import { Check as Check19, Loader2 as Loader218, Plus as Plus9, Search as Search10, X as X20 } from "lucide-react";
|
|
52692
|
+
import { useCallback as useCallback34, useEffect as useEffect76, useRef as useRef40, useState as useState76 } from "react";
|
|
52578
52693
|
import { jsx as jsx130, jsxs as jsxs122 } from "react/jsx-runtime";
|
|
52579
52694
|
function ModelEditor({
|
|
52580
52695
|
models,
|
|
@@ -52590,7 +52705,7 @@ function ModelEditor({
|
|
|
52590
52705
|
const searchRef = useRef40(void 0);
|
|
52591
52706
|
const customInputRef = useRef40(null);
|
|
52592
52707
|
const wsUrl = useConfigStore((s) => s.wsUrl);
|
|
52593
|
-
const search =
|
|
52708
|
+
const search = useCallback34(
|
|
52594
52709
|
(rawQuery) => {
|
|
52595
52710
|
if (!rawQuery.trim()) {
|
|
52596
52711
|
setMatches([]);
|
|
@@ -52623,7 +52738,7 @@ function ModelEditor({
|
|
|
52623
52738
|
if (searchRef.current) clearTimeout(searchRef.current);
|
|
52624
52739
|
};
|
|
52625
52740
|
}, [query, search]);
|
|
52626
|
-
const addModel =
|
|
52741
|
+
const addModel = useCallback34(
|
|
52627
52742
|
(id, match) => {
|
|
52628
52743
|
if (!id || models.some((m) => m.id === id)) return;
|
|
52629
52744
|
const entry = {
|
|
@@ -52644,13 +52759,13 @@ function ModelEditor({
|
|
|
52644
52759
|
},
|
|
52645
52760
|
[models, onChange]
|
|
52646
52761
|
);
|
|
52647
|
-
const removeModel =
|
|
52762
|
+
const removeModel = useCallback34(
|
|
52648
52763
|
(id) => {
|
|
52649
52764
|
onChange(models.filter((m) => m.id !== id));
|
|
52650
52765
|
},
|
|
52651
52766
|
[models, onChange]
|
|
52652
52767
|
);
|
|
52653
|
-
const confirmCustom =
|
|
52768
|
+
const confirmCustom = useCallback34(() => {
|
|
52654
52769
|
const id = customId.trim();
|
|
52655
52770
|
if (!id) return;
|
|
52656
52771
|
addModel(id);
|
|
@@ -52697,7 +52812,7 @@ maxOutput: ${model.maxOutput}` : ""}` : void 0,
|
|
|
52697
52812
|
autoFocus: true
|
|
52698
52813
|
}
|
|
52699
52814
|
),
|
|
52700
|
-
searching && /* @__PURE__ */ jsx130(
|
|
52815
|
+
searching && /* @__PURE__ */ jsx130(Loader218, { className: "absolute right-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 animate-spin text-muted-foreground" })
|
|
52701
52816
|
] }),
|
|
52702
52817
|
matches.length > 0 && /* @__PURE__ */ jsx130("div", { className: "space-y-1 max-h-40 overflow-y-auto", children: matches.map((match) => /* @__PURE__ */ jsxs122(
|
|
52703
52818
|
"button",
|
|
@@ -53016,7 +53131,7 @@ var init_WorktreeLanes = __esm({
|
|
|
53016
53131
|
});
|
|
53017
53132
|
|
|
53018
53133
|
// src/components/WorktreeOrphans.tsx
|
|
53019
|
-
import { AlertTriangle as AlertTriangle17, Eraser as Eraser3, Loader2 as
|
|
53134
|
+
import { AlertTriangle as AlertTriangle17, Eraser as Eraser3, Loader2 as Loader225 } from "lucide-react";
|
|
53020
53135
|
import { useEffect as useEffect91, useState as useState94 } from "react";
|
|
53021
53136
|
import { jsx as jsx155, jsxs as jsxs146 } from "react/jsx-runtime";
|
|
53022
53137
|
function WorktreeOrphans() {
|
|
@@ -53065,7 +53180,7 @@ function WorktreeOrphans() {
|
|
|
53065
53180
|
title: canClean ? t("activity:worktree.cleanButtonTitle") : blockedReason,
|
|
53066
53181
|
className: "inline-flex shrink-0 items-center gap-1 rounded bg-warning px-2 py-1 font-medium text-primary-foreground hover:bg-warning/90 disabled:cursor-not-allowed disabled:opacity-50",
|
|
53067
53182
|
children: [
|
|
53068
|
-
cleaning ? /* @__PURE__ */ jsx155(
|
|
53183
|
+
cleaning ? /* @__PURE__ */ jsx155(Loader225, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx155(Eraser3, { className: "h-3.5 w-3.5" }),
|
|
53069
53184
|
t("activity:worktree.cleanConfirm")
|
|
53070
53185
|
]
|
|
53071
53186
|
}
|
|
@@ -53103,13 +53218,13 @@ import {
|
|
|
53103
53218
|
BarChart3 as BarChart34,
|
|
53104
53219
|
Cpu as Cpu16,
|
|
53105
53220
|
DollarSign as DollarSign2,
|
|
53106
|
-
Loader2 as
|
|
53221
|
+
Loader2 as Loader226,
|
|
53107
53222
|
MessageSquare as MessageSquare9,
|
|
53108
53223
|
Terminal as Terminal8,
|
|
53109
53224
|
TrendingUp as TrendingUp2,
|
|
53110
53225
|
Users as Users7
|
|
53111
53226
|
} from "lucide-react";
|
|
53112
|
-
import { useCallback as
|
|
53227
|
+
import { useCallback as useCallback51, useEffect as useEffect93, useMemo as useMemo45, useRef as useRef49, useState as useState96 } from "react";
|
|
53113
53228
|
import { Fragment as Fragment40, jsx as jsx157, jsxs as jsxs148 } from "react/jsx-runtime";
|
|
53114
53229
|
function fmtDuration3(ms) {
|
|
53115
53230
|
const sec = Math.floor(ms / 1e3);
|
|
@@ -53165,7 +53280,7 @@ function AnalyticsDashboard() {
|
|
|
53165
53280
|
const [loading, setLoading] = useState96(true);
|
|
53166
53281
|
const [statsLoading, setStatsLoading] = useState96(false);
|
|
53167
53282
|
const wsRef = useRef49(null);
|
|
53168
|
-
const fetchSummary =
|
|
53283
|
+
const fetchSummary = useCallback51(async () => {
|
|
53169
53284
|
try {
|
|
53170
53285
|
const res = await fetch("/api/analytics/summary");
|
|
53171
53286
|
if (res.ok) {
|
|
@@ -53175,7 +53290,7 @@ function AnalyticsDashboard() {
|
|
|
53175
53290
|
} catch {
|
|
53176
53291
|
}
|
|
53177
53292
|
}, []);
|
|
53178
|
-
const fetchEvents =
|
|
53293
|
+
const fetchEvents = useCallback51(async () => {
|
|
53179
53294
|
try {
|
|
53180
53295
|
const res = await fetch("/api/analytics?limit=50");
|
|
53181
53296
|
if (res.ok) {
|
|
@@ -53185,7 +53300,7 @@ function AnalyticsDashboard() {
|
|
|
53185
53300
|
} catch {
|
|
53186
53301
|
}
|
|
53187
53302
|
}, []);
|
|
53188
|
-
const fetchSessions =
|
|
53303
|
+
const fetchSessions = useCallback51(async () => {
|
|
53189
53304
|
try {
|
|
53190
53305
|
const res = await fetch("/api/sessions");
|
|
53191
53306
|
if (res.ok) {
|
|
@@ -53195,7 +53310,7 @@ function AnalyticsDashboard() {
|
|
|
53195
53310
|
} catch {
|
|
53196
53311
|
}
|
|
53197
53312
|
}, []);
|
|
53198
|
-
const fetchStats =
|
|
53313
|
+
const fetchStats = useCallback51(async () => {
|
|
53199
53314
|
if (statsLoading) return;
|
|
53200
53315
|
setStatsLoading(true);
|
|
53201
53316
|
let timer = null;
|
|
@@ -53274,7 +53389,7 @@ function AnalyticsDashboard() {
|
|
|
53274
53389
|
const eventPage = usePagination(reversedEvents, 20);
|
|
53275
53390
|
if (loading) {
|
|
53276
53391
|
return /* @__PURE__ */ jsx157("div", { className: "flex h-full min-h-0 items-center justify-center bg-[hsl(var(--surface-2)/0.45)] p-4", children: /* @__PURE__ */ jsxs148("div", { className: "ws-surface flex items-center gap-2 rounded-xl px-4 py-3 text-sm text-muted-foreground", children: [
|
|
53277
|
-
/* @__PURE__ */ jsx157(
|
|
53392
|
+
/* @__PURE__ */ jsx157(Loader226, { className: "h-4 w-4 animate-spin text-primary" }),
|
|
53278
53393
|
t("activity:analytics.loading")
|
|
53279
53394
|
] }) });
|
|
53280
53395
|
}
|
|
@@ -53977,18 +54092,18 @@ var init_roster_ws = __esm({
|
|
|
53977
54092
|
|
|
53978
54093
|
// src/components/AgentRosterCatalogTab.tsx
|
|
53979
54094
|
import { Activity as Activity11, Bot as Bot17, ChevronDown as ChevronDown22, Database as Database4, FileText as FileText12, Search as Search14, Settings as Settings3, X as X27 } from "lucide-react";
|
|
53980
|
-
import { useCallback as
|
|
54095
|
+
import { useCallback as useCallback52, useMemo as useMemo47, useState as useState98 } from "react";
|
|
53981
54096
|
import { jsx as jsx159, jsxs as jsxs150 } from "react/jsx-runtime";
|
|
53982
54097
|
function RosterCatalogTab({
|
|
53983
54098
|
customStats,
|
|
53984
54099
|
catalog
|
|
53985
54100
|
}) {
|
|
53986
54101
|
const { t } = useTranslation();
|
|
53987
|
-
const roleName =
|
|
54102
|
+
const roleName = useCallback52(
|
|
53988
54103
|
(r) => t(`activity:rosterRoles.${r.role}.name`, { defaultValue: r.name }),
|
|
53989
54104
|
[t]
|
|
53990
54105
|
);
|
|
53991
|
-
const roleSummary =
|
|
54106
|
+
const roleSummary = useCallback52(
|
|
53992
54107
|
(r) => t(`activity:rosterRoles.${r.role}.summary`, { defaultValue: r.summary }),
|
|
53993
54108
|
[t]
|
|
53994
54109
|
);
|
|
@@ -54007,7 +54122,7 @@ function RosterCatalogTab({
|
|
|
54007
54122
|
(r) => r.role.includes(q) || roleName(r).toLowerCase().includes(q) || roleSummary(r).toLowerCase().includes(q)
|
|
54008
54123
|
);
|
|
54009
54124
|
}, [catalog, searchQuery, roleName, roleSummary]);
|
|
54010
|
-
const customRoleStats =
|
|
54125
|
+
const customRoleStats = useCallback52(
|
|
54011
54126
|
(role) => customStats.find((s) => s.role === role),
|
|
54012
54127
|
[customStats]
|
|
54013
54128
|
);
|
|
@@ -54347,7 +54462,7 @@ var init_agent_roster_data = __esm({
|
|
|
54347
54462
|
});
|
|
54348
54463
|
|
|
54349
54464
|
// src/components/AgentRosterChrome.tsx
|
|
54350
|
-
import { Library, Loader2 as
|
|
54465
|
+
import { Library, Loader2 as Loader227, RefreshCw as RefreshCw16 } from "lucide-react";
|
|
54351
54466
|
import { jsx as jsx161, jsxs as jsxs151 } from "react/jsx-runtime";
|
|
54352
54467
|
function AgentRosterHeader({
|
|
54353
54468
|
customStats,
|
|
@@ -54369,7 +54484,7 @@ function AgentRosterHeader({
|
|
|
54369
54484
|
] })
|
|
54370
54485
|
] }),
|
|
54371
54486
|
/* @__PURE__ */ jsxs151("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
54372
|
-
rosterLoading && /* @__PURE__ */ jsx161(
|
|
54487
|
+
rosterLoading && /* @__PURE__ */ jsx161(Loader227, { className: "h-4 w-4 animate-spin text-muted-foreground shrink-0" }),
|
|
54373
54488
|
/* @__PURE__ */ jsxs151(
|
|
54374
54489
|
"button",
|
|
54375
54490
|
{
|
|
@@ -54430,7 +54545,7 @@ import {
|
|
|
54430
54545
|
XCircle as XCircle9,
|
|
54431
54546
|
Zap as Zap21
|
|
54432
54547
|
} from "lucide-react";
|
|
54433
|
-
import { useCallback as
|
|
54548
|
+
import { useCallback as useCallback53, useLayoutEffect as useLayoutEffect8, useMemo as useMemo48, useRef as useRef50, useState as useState99 } from "react";
|
|
54434
54549
|
import { Fragment as Fragment41, jsx as jsx162, jsxs as jsxs152 } from "react/jsx-runtime";
|
|
54435
54550
|
function fmtElapsed3(ms) {
|
|
54436
54551
|
const totalSec = Math.floor(ms / 1e3);
|
|
@@ -54506,7 +54621,7 @@ function LiveFleetTab({ nowTick }) {
|
|
|
54506
54621
|
setSelectedId(null);
|
|
54507
54622
|
}
|
|
54508
54623
|
}, [selectedId, sessionAgents]);
|
|
54509
|
-
const openInspector =
|
|
54624
|
+
const openInspector = useCallback53((agentId) => {
|
|
54510
54625
|
const ui = useUIStore.getState();
|
|
54511
54626
|
if (agentId) {
|
|
54512
54627
|
ui.setInspectorFocusedAgentId(agentId);
|
|
@@ -54882,7 +54997,7 @@ var init_AgentRosterLiveTab = __esm({
|
|
|
54882
54997
|
});
|
|
54883
54998
|
|
|
54884
54999
|
// src/components/self-learning/SelfLearningAgentList.tsx
|
|
54885
|
-
import { Database as Database5, Loader2 as
|
|
55000
|
+
import { Database as Database5, Loader2 as Loader228, Zap as Zap22 } from "lucide-react";
|
|
54886
55001
|
import { Fragment as Fragment42, jsx as jsx163, jsxs as jsxs153 } from "react/jsx-runtime";
|
|
54887
55002
|
function SelfLearningAgentList({
|
|
54888
55003
|
populated,
|
|
@@ -54938,7 +55053,7 @@ function SelfLearningAgentList({
|
|
|
54938
55053
|
disabled: bulkOptimizing,
|
|
54939
55054
|
className: "flex items-center justify-center gap-1 rounded bg-warning/20 border border-warning/40 px-2 py-1 text-[10px] font-medium text-warning hover:bg-warning/30 transition-colors disabled:opacity-50",
|
|
54940
55055
|
children: [
|
|
54941
|
-
bulkOptimizing ? /* @__PURE__ */ jsx163(
|
|
55056
|
+
bulkOptimizing ? /* @__PURE__ */ jsx163(Loader228, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ jsx163(Zap22, { className: "h-3 w-3" }),
|
|
54942
55057
|
bulkOptimizing ? t("activity:agentRoster.optimizing") : t("activity:agentRoster.optimizeAll", { count: needsOpt.length })
|
|
54943
55058
|
]
|
|
54944
55059
|
}
|
|
@@ -55047,7 +55162,7 @@ import {
|
|
|
55047
55162
|
BookOpen as BookOpen3,
|
|
55048
55163
|
CheckCircle2 as CheckCircle221,
|
|
55049
55164
|
Database as Database6,
|
|
55050
|
-
Loader2 as
|
|
55165
|
+
Loader2 as Loader229,
|
|
55051
55166
|
Sparkles as Sparkles13,
|
|
55052
55167
|
Zap as Zap23
|
|
55053
55168
|
} from "lucide-react";
|
|
@@ -55175,7 +55290,7 @@ function SelfLearningDetail({
|
|
|
55175
55290
|
disabled: optimizing,
|
|
55176
55291
|
className: "inline-flex items-center gap-1 rounded bg-warning/20 text-warning border border-warning/40 px-2.5 py-1 text-[10px] font-medium hover:bg-warning/30 transition-colors disabled:opacity-50 shrink-0",
|
|
55177
55292
|
children: [
|
|
55178
|
-
optimizing ? /* @__PURE__ */ jsx164(
|
|
55293
|
+
optimizing ? /* @__PURE__ */ jsx164(Loader229, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ jsx164(Zap23, { className: "h-3 w-3" }),
|
|
55179
55294
|
optimizing ? t("activity:agentRoster.optimizing") : "Optimize Now"
|
|
55180
55295
|
]
|
|
55181
55296
|
}
|
|
@@ -55196,7 +55311,7 @@ function SelfLearningDetail({
|
|
|
55196
55311
|
className: "inline-flex items-center gap-1 rounded bg-primary px-3 py-1.5 text-xs text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
55197
55312
|
title: selectedStats.entryCount === 0 ? "No raw entries to optimize" : "Synthesize raw entries into a consolidated, narrowly-scoped document",
|
|
55198
55313
|
children: [
|
|
55199
|
-
optimizing ? /* @__PURE__ */ jsx164(
|
|
55314
|
+
optimizing ? /* @__PURE__ */ jsx164(Loader229, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx164(Zap23, { className: "h-3.5 w-3.5" }),
|
|
55200
55315
|
optimizing ? t("activity:agentRoster.optimizing") : "Optimize"
|
|
55201
55316
|
]
|
|
55202
55317
|
}
|
|
@@ -55378,7 +55493,7 @@ function SelfLearningDetail({
|
|
|
55378
55493
|
disabled: loadingEntries,
|
|
55379
55494
|
className: "inline-flex items-center gap-1 rounded border border-border/50 px-3 py-1.5 text-xs hover:bg-accent transition-colors",
|
|
55380
55495
|
children: [
|
|
55381
|
-
loadingEntries ? /* @__PURE__ */ jsx164(
|
|
55496
|
+
loadingEntries ? /* @__PURE__ */ jsx164(Loader229, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ jsx164(Bookmark2, { className: "h-3 w-3" }),
|
|
55382
55497
|
"Review Learned Entries (",
|
|
55383
55498
|
selectedStats.entryCount,
|
|
55384
55499
|
")"
|
|
@@ -55518,7 +55633,7 @@ var init_SelfLearningDetail = __esm({
|
|
|
55518
55633
|
});
|
|
55519
55634
|
|
|
55520
55635
|
// src/components/self-learning/use-self-learning-state.ts
|
|
55521
|
-
import { useCallback as
|
|
55636
|
+
import { useCallback as useCallback54, useMemo as useMemo49, useState as useState100 } from "react";
|
|
55522
55637
|
function useSelfLearningState({
|
|
55523
55638
|
customStats,
|
|
55524
55639
|
onRefresh
|
|
@@ -55547,7 +55662,7 @@ function useSelfLearningState({
|
|
|
55547
55662
|
() => selectedRole ? populated.find((r) => r.role === selectedRole) : null,
|
|
55548
55663
|
[selectedRole, populated]
|
|
55549
55664
|
);
|
|
55550
|
-
const loadEntries =
|
|
55665
|
+
const loadEntries = useCallback54(async (role) => {
|
|
55551
55666
|
setLoadingEntries(true);
|
|
55552
55667
|
setReviewEntries(null);
|
|
55553
55668
|
try {
|
|
@@ -55558,7 +55673,7 @@ function useSelfLearningState({
|
|
|
55558
55673
|
}
|
|
55559
55674
|
setLoadingEntries(false);
|
|
55560
55675
|
}, []);
|
|
55561
|
-
const applyReview =
|
|
55676
|
+
const applyReview = useCallback54(async () => {
|
|
55562
55677
|
if (!selectedRole || !reviewEntries) return;
|
|
55563
55678
|
setSaving(true);
|
|
55564
55679
|
const kept = reviewEntries.filter((_, i) => reviewDecisions[i] !== "drop");
|
|
@@ -55571,7 +55686,7 @@ function useSelfLearningState({
|
|
|
55571
55686
|
}
|
|
55572
55687
|
setSaving(false);
|
|
55573
55688
|
}, [selectedRole, reviewEntries, reviewDecisions]);
|
|
55574
|
-
const runTeach =
|
|
55689
|
+
const runTeach = useCallback54(async () => {
|
|
55575
55690
|
if (!selectedRole || !teachInput.trim()) return;
|
|
55576
55691
|
setTeachFeedback(null);
|
|
55577
55692
|
setSaving(true);
|
|
@@ -55598,7 +55713,7 @@ ${teachInput.trim()}`;
|
|
|
55598
55713
|
}
|
|
55599
55714
|
setSaving(false);
|
|
55600
55715
|
}, [onRefresh, selectedRole, teachInput, t]);
|
|
55601
|
-
const setLearningEnabled =
|
|
55716
|
+
const setLearningEnabled = useCallback54(
|
|
55602
55717
|
async (role, enabled) => {
|
|
55603
55718
|
setSaving(true);
|
|
55604
55719
|
setTeachFeedback(null);
|
|
@@ -55624,7 +55739,7 @@ ${teachInput.trim()}`;
|
|
|
55624
55739
|
},
|
|
55625
55740
|
[onRefresh, t]
|
|
55626
55741
|
);
|
|
55627
|
-
const loadAutoStatus =
|
|
55742
|
+
const loadAutoStatus = useCallback54(async (role) => {
|
|
55628
55743
|
try {
|
|
55629
55744
|
const data = await sendRosterMessage("agent-roster.auto-optimize-status", { role });
|
|
55630
55745
|
const entry = data.roles?.find((r) => r.role === role);
|
|
@@ -55639,7 +55754,7 @@ ${teachInput.trim()}`;
|
|
|
55639
55754
|
setAutoStatus(null);
|
|
55640
55755
|
}
|
|
55641
55756
|
}, []);
|
|
55642
|
-
const loadSkills =
|
|
55757
|
+
const loadSkills = useCallback54(async (role) => {
|
|
55643
55758
|
try {
|
|
55644
55759
|
const data = await sendRosterMessage("agent-roster.skills", { role });
|
|
55645
55760
|
setSkills(data.skills ?? []);
|
|
@@ -55647,7 +55762,7 @@ ${teachInput.trim()}`;
|
|
|
55647
55762
|
setSkills([]);
|
|
55648
55763
|
}
|
|
55649
55764
|
}, []);
|
|
55650
|
-
const loadRetired =
|
|
55765
|
+
const loadRetired = useCallback54(async (role) => {
|
|
55651
55766
|
try {
|
|
55652
55767
|
const data = await sendRosterMessage("agent-roster.quarantine", { role });
|
|
55653
55768
|
setRetired(data.retired ?? []);
|
|
@@ -55655,7 +55770,7 @@ ${teachInput.trim()}`;
|
|
|
55655
55770
|
setRetired([]);
|
|
55656
55771
|
}
|
|
55657
55772
|
}, []);
|
|
55658
|
-
const toggleSkillBody =
|
|
55773
|
+
const toggleSkillBody = useCallback54(
|
|
55659
55774
|
async (role, skill) => {
|
|
55660
55775
|
if (openSkill?.skill === skill) {
|
|
55661
55776
|
setOpenSkill(null);
|
|
@@ -55670,7 +55785,7 @@ ${teachInput.trim()}`;
|
|
|
55670
55785
|
},
|
|
55671
55786
|
[openSkill]
|
|
55672
55787
|
);
|
|
55673
|
-
const toggleSkillPin =
|
|
55788
|
+
const toggleSkillPin = useCallback54(
|
|
55674
55789
|
async (role, skill, pinned) => {
|
|
55675
55790
|
try {
|
|
55676
55791
|
await sendRosterMessage("agent-roster.pin-skill", { role, skill, pinned });
|
|
@@ -55680,7 +55795,7 @@ ${teachInput.trim()}`;
|
|
|
55680
55795
|
},
|
|
55681
55796
|
[loadSkills]
|
|
55682
55797
|
);
|
|
55683
|
-
const loadConsolidated =
|
|
55798
|
+
const loadConsolidated = useCallback54(async (role) => {
|
|
55684
55799
|
try {
|
|
55685
55800
|
const data = await sendRosterMessage("agent-roster.read-consolidated", { role });
|
|
55686
55801
|
setConsolidatedContent(data.isConsolidated ? data.content : null);
|
|
@@ -55688,7 +55803,7 @@ ${teachInput.trim()}`;
|
|
|
55688
55803
|
setConsolidatedContent(null);
|
|
55689
55804
|
}
|
|
55690
55805
|
}, []);
|
|
55691
|
-
const runOptimize =
|
|
55806
|
+
const runOptimize = useCallback54(
|
|
55692
55807
|
async (role) => {
|
|
55693
55808
|
setOptimizing(true);
|
|
55694
55809
|
setTeachFeedback(null);
|
|
@@ -55747,7 +55862,7 @@ ${teachInput.trim()}`;
|
|
|
55747
55862
|
},
|
|
55748
55863
|
[onRefresh, loadConsolidated, loadSkills, loadAutoStatus, loadRetired, t]
|
|
55749
55864
|
);
|
|
55750
|
-
const runBulkOptimize =
|
|
55865
|
+
const runBulkOptimize = useCallback54(
|
|
55751
55866
|
async (roles) => {
|
|
55752
55867
|
if (roles.length === 0) return;
|
|
55753
55868
|
setBulkOptimizing(true);
|
|
@@ -55839,7 +55954,7 @@ ${r.instruction}`).join("\n\n---\n\n");
|
|
|
55839
55954
|
},
|
|
55840
55955
|
[selectedRole, loadConsolidated, t]
|
|
55841
55956
|
);
|
|
55842
|
-
const selectRole =
|
|
55957
|
+
const selectRole = useCallback54(
|
|
55843
55958
|
(role) => {
|
|
55844
55959
|
setSelectedRole(role);
|
|
55845
55960
|
setReviewEntries(null);
|
|
@@ -56259,13 +56374,13 @@ import {
|
|
|
56259
56374
|
Plus as Plus14,
|
|
56260
56375
|
RefreshCw as RefreshCw17,
|
|
56261
56376
|
Search as Search15,
|
|
56262
|
-
ShieldOff,
|
|
56377
|
+
ShieldOff as ShieldOff2,
|
|
56263
56378
|
Tag as Tag2,
|
|
56264
56379
|
Trash2 as Trash216,
|
|
56265
56380
|
Upload,
|
|
56266
56381
|
X as X28
|
|
56267
56382
|
} from "lucide-react";
|
|
56268
|
-
import { useCallback as
|
|
56383
|
+
import { useCallback as useCallback55, useEffect as useEffect94, useMemo as useMemo50, useRef as useRef51, useState as useState101 } from "react";
|
|
56269
56384
|
import { Fragment as Fragment44, jsx as jsx167, jsxs as jsxs157 } from "react/jsx-runtime";
|
|
56270
56385
|
function cleanStringArray(value) {
|
|
56271
56386
|
if (!Array.isArray(value)) return void 0;
|
|
@@ -56349,7 +56464,7 @@ function AudienceMemoryPanel() {
|
|
|
56349
56464
|
const [creating, setCreating] = useState101(false);
|
|
56350
56465
|
const [deleting, setDeleting] = useState101(false);
|
|
56351
56466
|
const deletingIdRef = useRef51(null);
|
|
56352
|
-
const refresh =
|
|
56467
|
+
const refresh = useCallback55(() => {
|
|
56353
56468
|
setLoading(true);
|
|
56354
56469
|
setFeedback(null);
|
|
56355
56470
|
ws.listSageMemories({ echoToChat: false });
|
|
@@ -56770,7 +56885,7 @@ function AudienceMemoryCard({
|
|
|
56770
56885
|
onClick: onClearScope,
|
|
56771
56886
|
"aria-label": `Remove audience scope from ${memoryPreview(memory.text, 42)}`,
|
|
56772
56887
|
title: t("activity:audienceMem.makeGeneralMemory"),
|
|
56773
|
-
children: /* @__PURE__ */ jsx167(
|
|
56888
|
+
children: /* @__PURE__ */ jsx167(ShieldOff2, { className: "size-3" })
|
|
56774
56889
|
}
|
|
56775
56890
|
),
|
|
56776
56891
|
/* @__PURE__ */ jsx167(
|
|
@@ -59410,7 +59525,7 @@ var init_WatchMessageBubble = __esm({
|
|
|
59410
59525
|
});
|
|
59411
59526
|
|
|
59412
59527
|
// src/components/SessionWatchPanel.tsx
|
|
59413
|
-
import { useCallback as
|
|
59528
|
+
import { useCallback as useCallback56, useEffect as useEffect95, useMemo as useMemo53, useRef as useRef53, useState as useState103 } from "react";
|
|
59414
59529
|
import { Bot as Bot21 } from "lucide-react";
|
|
59415
59530
|
import { jsx as jsx171, jsxs as jsxs161 } from "react/jsx-runtime";
|
|
59416
59531
|
function SessionWatchPanel({
|
|
@@ -59461,7 +59576,7 @@ function SessionWatchPanel({
|
|
|
59461
59576
|
const label = a.id === "leader" ? t("activity:sessionWatch.claude") : a.name || a.id;
|
|
59462
59577
|
return { label, text: a.partialText };
|
|
59463
59578
|
}, [targetSession, t]);
|
|
59464
|
-
const load =
|
|
59579
|
+
const load = useCallback56(async () => {
|
|
59465
59580
|
try {
|
|
59466
59581
|
const res = await fetch(
|
|
59467
59582
|
`/api/sessions/${encodeURIComponent(sessionId)}/events?limit=${limit}`
|
|
@@ -59476,7 +59591,7 @@ function SessionWatchPanel({
|
|
|
59476
59591
|
if (aliveRef.current) setError(e instanceof Error ? e.message : String(e));
|
|
59477
59592
|
}
|
|
59478
59593
|
}, [sessionId, limit]);
|
|
59479
|
-
const loadThread =
|
|
59594
|
+
const loadThread = useCallback56(async () => {
|
|
59480
59595
|
try {
|
|
59481
59596
|
const res = await fetch(`/api/sessions/${encodeURIComponent(sessionId)}/mailbox`);
|
|
59482
59597
|
if (!res.ok) return;
|
|
@@ -60899,7 +61014,7 @@ import {
|
|
|
60899
61014
|
} from "@xyflow/react";
|
|
60900
61015
|
import "@xyflow/react/dist/style.css";
|
|
60901
61016
|
import { Building2 as Building24 } from "lucide-react";
|
|
60902
|
-
import { useCallback as
|
|
61017
|
+
import { useCallback as useCallback57, useEffect as useEffect96, useMemo as useMemo54, useRef as useRef54, useState as useState104 } from "react";
|
|
60903
61018
|
import { jsx as jsx178, jsxs as jsxs168 } from "react/jsx-runtime";
|
|
60904
61019
|
function agentEdgeId(officeId) {
|
|
60905
61020
|
const clientId = officeId.split("__agent-")[0];
|
|
@@ -60964,7 +61079,7 @@ function OfficeMapCanvas() {
|
|
|
60964
61079
|
const serverId = selectedNode.data.serverId ?? (selectedNode.id.includes("__agent-") ? selectedNode.id.split("__agent-").pop() : selectedNode.id.replace(/^agent-/, ""));
|
|
60965
61080
|
return serverId ? agentTranscripts.get(serverId) ?? EMPTY_AGENT_TRANSCRIPT : EMPTY_AGENT_TRANSCRIPT;
|
|
60966
61081
|
}, [agentTranscripts, selectedNode]);
|
|
60967
|
-
const sendBroadcast =
|
|
61082
|
+
const sendBroadcast = useCallback57(async () => {
|
|
60968
61083
|
const text4 = broadcastDraft.trim();
|
|
60969
61084
|
if (!text4 || broadcasting) return;
|
|
60970
61085
|
setBroadcasting(true);
|
|
@@ -61245,7 +61360,7 @@ function OfficeMapCanvas() {
|
|
|
61245
61360
|
}
|
|
61246
61361
|
return { renderedAgents, serverIdToOffice, clientIds: clients.map((c) => c.id) };
|
|
61247
61362
|
}, [clients]);
|
|
61248
|
-
const vizEventToTargets =
|
|
61363
|
+
const vizEventToTargets = useCallback57((event) => {
|
|
61249
61364
|
const toOfficeAgentId = (serverId) => vizTargetModel.serverIdToOffice.get(serverId) ?? `agent-${serverId}`;
|
|
61250
61365
|
switch (event.kind) {
|
|
61251
61366
|
case "mailbox:send":
|
|
@@ -61485,14 +61600,14 @@ function OfficeMapCanvas() {
|
|
|
61485
61600
|
}, 1e3);
|
|
61486
61601
|
return () => clearInterval(interval);
|
|
61487
61602
|
}, [setEdges, setNodes]);
|
|
61488
|
-
const onConnect =
|
|
61603
|
+
const onConnect = useCallback57(
|
|
61489
61604
|
(params) => setEdges((eds) => addEdge({ ...params, type: "wire" }, eds)),
|
|
61490
61605
|
[setEdges]
|
|
61491
61606
|
);
|
|
61492
|
-
const onNodeClick =
|
|
61607
|
+
const onNodeClick = useCallback57((_, node) => {
|
|
61493
61608
|
setSelectedNode(node);
|
|
61494
61609
|
}, []);
|
|
61495
|
-
const onPaneClick =
|
|
61610
|
+
const onPaneClick = useCallback57(() => {
|
|
61496
61611
|
setSelectedNode(null);
|
|
61497
61612
|
}, []);
|
|
61498
61613
|
useEffect96(() => {
|
|
@@ -61503,7 +61618,7 @@ function OfficeMapCanvas() {
|
|
|
61503
61618
|
window.addEventListener("keydown", onKey);
|
|
61504
61619
|
return () => window.removeEventListener("keydown", onKey);
|
|
61505
61620
|
}, [watch]);
|
|
61506
|
-
const onArrange =
|
|
61621
|
+
const onArrange = useCallback57(() => {
|
|
61507
61622
|
setNodes(
|
|
61508
61623
|
(nds) => nds.map((n) => {
|
|
61509
61624
|
const home = layoutPosRef.current.get(n.id);
|
|
@@ -61983,13 +62098,13 @@ var init_OfficeMapSettingsPanel = __esm({
|
|
|
61983
62098
|
});
|
|
61984
62099
|
|
|
61985
62100
|
// src/components/useAgentRosterData.ts
|
|
61986
|
-
import { useCallback as
|
|
62101
|
+
import { useCallback as useCallback58, useEffect as useEffect97, useState as useState105 } from "react";
|
|
61987
62102
|
function useAgentRosterData() {
|
|
61988
62103
|
const [customStats, setCustomStats] = useState105([]);
|
|
61989
62104
|
const [catalog, setCatalog] = useState105(KNOWN_ROLES);
|
|
61990
62105
|
const [rosterLoading, setRosterLoading] = useState105(false);
|
|
61991
62106
|
const [rosterError, setRosterError] = useState105(null);
|
|
61992
|
-
const loadRoster =
|
|
62107
|
+
const loadRoster = useCallback58(async () => {
|
|
61993
62108
|
setRosterLoading(true);
|
|
61994
62109
|
setRosterError(null);
|
|
61995
62110
|
try {
|
|
@@ -62044,7 +62159,7 @@ import {
|
|
|
62044
62159
|
Sparkles as Sparkles14,
|
|
62045
62160
|
Trash2 as Trash217
|
|
62046
62161
|
} from "lucide-react";
|
|
62047
|
-
import { useCallback as
|
|
62162
|
+
import { useCallback as useCallback59, useEffect as useEffect98, useMemo as useMemo55, useState as useState106 } from "react";
|
|
62048
62163
|
import { jsx as jsx181, jsxs as jsxs171 } from "react/jsx-runtime";
|
|
62049
62164
|
function CustomizationTab({
|
|
62050
62165
|
customStats,
|
|
@@ -62074,7 +62189,7 @@ function CustomizationTab({
|
|
|
62074
62189
|
const entry = catalog.find((candidate) => candidate.role === selectedRole);
|
|
62075
62190
|
return entry?.systemProtected ?? !entry?.custom;
|
|
62076
62191
|
}, [catalog, selectedRole]);
|
|
62077
|
-
const startEdit =
|
|
62192
|
+
const startEdit = useCallback59(async (role, mode) => {
|
|
62078
62193
|
setSaving(true);
|
|
62079
62194
|
setEditError(null);
|
|
62080
62195
|
setSelectedRole(role);
|
|
@@ -62094,7 +62209,7 @@ function CustomizationTab({
|
|
|
62094
62209
|
setSaving(false);
|
|
62095
62210
|
}
|
|
62096
62211
|
}, []);
|
|
62097
|
-
const startRuntimeEdit =
|
|
62212
|
+
const startRuntimeEdit = useCallback59(async (role) => {
|
|
62098
62213
|
setSaving(true);
|
|
62099
62214
|
setEditError(null);
|
|
62100
62215
|
setSelectedRole(role);
|
|
@@ -62110,7 +62225,7 @@ function CustomizationTab({
|
|
|
62110
62225
|
setSaving(false);
|
|
62111
62226
|
}
|
|
62112
62227
|
}, []);
|
|
62113
|
-
const saveRuntimeConfig =
|
|
62228
|
+
const saveRuntimeConfig = useCallback59(
|
|
62114
62229
|
async (config) => {
|
|
62115
62230
|
if (!selectedRole) return;
|
|
62116
62231
|
setSaving(true);
|
|
@@ -62129,7 +62244,7 @@ function CustomizationTab({
|
|
|
62129
62244
|
},
|
|
62130
62245
|
[onRefresh, selectedRole]
|
|
62131
62246
|
);
|
|
62132
|
-
const saveEdit =
|
|
62247
|
+
const saveEdit = useCallback59(async () => {
|
|
62133
62248
|
if (!selectedRole || !editMode) return;
|
|
62134
62249
|
setSaving(true);
|
|
62135
62250
|
try {
|
|
@@ -62159,7 +62274,7 @@ function CustomizationTab({
|
|
|
62159
62274
|
}
|
|
62160
62275
|
setSaving(false);
|
|
62161
62276
|
}, [selectedRole, editMode, editContent, onRefresh]);
|
|
62162
|
-
const runImprove =
|
|
62277
|
+
const runImprove = useCallback59(async () => {
|
|
62163
62278
|
if (!selectedRole) return;
|
|
62164
62279
|
try {
|
|
62165
62280
|
const data = await sendRosterMessage("agent-roster.llm-improve", {
|
|
@@ -62180,7 +62295,7 @@ function CustomizationTab({
|
|
|
62180
62295
|
);
|
|
62181
62296
|
}
|
|
62182
62297
|
}, [selectedRole]);
|
|
62183
|
-
const runReset =
|
|
62298
|
+
const runReset = useCallback59(
|
|
62184
62299
|
async (role) => {
|
|
62185
62300
|
if (!window.confirm(t("activity:agentRoster.resetConfirm", { role }))) return;
|
|
62186
62301
|
try {
|
|
@@ -62192,7 +62307,7 @@ function CustomizationTab({
|
|
|
62192
62307
|
},
|
|
62193
62308
|
[onRefresh]
|
|
62194
62309
|
);
|
|
62195
|
-
const runCreate =
|
|
62310
|
+
const runCreate = useCallback59(async () => {
|
|
62196
62311
|
const taskTypes = createDraft.taskTypes.split(/[\n,]+/).map((item) => item.trim()).filter(Boolean);
|
|
62197
62312
|
setSaving(true);
|
|
62198
62313
|
setEditError(null);
|
|
@@ -62548,7 +62663,7 @@ function AgentRosterView({
|
|
|
62548
62663
|
const setStoreActiveTab = useUIStore((s) => s.setAgentRosterActiveTab);
|
|
62549
62664
|
const [localActiveTab, setLocalActiveTab] = useState106(initialTab);
|
|
62550
62665
|
const activeTab = storeActiveTab ?? localActiveTab;
|
|
62551
|
-
const setActiveTab =
|
|
62666
|
+
const setActiveTab = useCallback59(
|
|
62552
62667
|
(tab) => {
|
|
62553
62668
|
setLocalActiveTab(tab);
|
|
62554
62669
|
if (typeof setStoreActiveTab === "function") {
|
|
@@ -63019,9 +63134,9 @@ var init_monaco_theme = __esm({
|
|
|
63019
63134
|
|
|
63020
63135
|
// src/components/MonacoDiffView.tsx
|
|
63021
63136
|
import { DiffEditor, loader } from "@monaco-editor/react";
|
|
63022
|
-
import { Check as Check26, Loader2 as
|
|
63137
|
+
import { Check as Check26, Loader2 as Loader230, Save } from "lucide-react";
|
|
63023
63138
|
import * as monaco2 from "monaco-editor";
|
|
63024
|
-
import { useCallback as
|
|
63139
|
+
import { useCallback as useCallback60, useEffect as useEffect99, useRef as useRef55, useState as useState107 } from "react";
|
|
63025
63140
|
import { jsx as jsx183, jsxs as jsxs173 } from "react/jsx-runtime";
|
|
63026
63141
|
function guessLanguage(path) {
|
|
63027
63142
|
const ext = path.split(".").pop()?.toLowerCase() ?? "";
|
|
@@ -63042,13 +63157,13 @@ function MonacoDiffView({
|
|
|
63042
63157
|
setSaving(false);
|
|
63043
63158
|
setSavedAt(null);
|
|
63044
63159
|
}, []);
|
|
63045
|
-
const handleMount =
|
|
63160
|
+
const handleMount = useCallback60((editor4) => {
|
|
63046
63161
|
editorRef.current = editor4;
|
|
63047
63162
|
monaco2.editor.setTheme(getMonacoTheme());
|
|
63048
63163
|
const modified = editor4.getModifiedEditor();
|
|
63049
63164
|
modified.onDidChangeModelContent(() => setDirty(true));
|
|
63050
63165
|
}, []);
|
|
63051
|
-
const apply =
|
|
63166
|
+
const apply = useCallback60(() => {
|
|
63052
63167
|
const content = editorRef.current?.getModifiedEditor().getValue();
|
|
63053
63168
|
if (content == null) return;
|
|
63054
63169
|
setSaving(true);
|
|
@@ -63083,7 +63198,7 @@ function MonacoDiffView({
|
|
|
63083
63198
|
className: "inline-flex items-center gap-1.5 h-7 px-2.5 rounded-md border border-border text-xs font-medium disabled:opacity-40 enabled:hover:bg-muted transition-colors",
|
|
63084
63199
|
title: t("activity:monacoDiff.applyTitle"),
|
|
63085
63200
|
children: [
|
|
63086
|
-
saving ? /* @__PURE__ */ jsx183(
|
|
63201
|
+
saving ? /* @__PURE__ */ jsx183(Loader230, { className: "h-3.5 w-3.5 animate-spin" }) : savedAt && !dirty ? /* @__PURE__ */ jsx183(Check26, { className: "h-3.5 w-3.5 text-success" }) : /* @__PURE__ */ jsx183(Save, { className: "h-3.5 w-3.5" }),
|
|
63087
63202
|
saving ? t("activity:monacoDiff.applying") : savedAt && !dirty ? t("activity:monacoDiff.applied") : t("activity:monacoDiff.apply")
|
|
63088
63203
|
]
|
|
63089
63204
|
}
|
|
@@ -63158,7 +63273,7 @@ __export(ChangesView_exports, {
|
|
|
63158
63273
|
import {
|
|
63159
63274
|
Columns2,
|
|
63160
63275
|
FileDiff,
|
|
63161
|
-
Loader2 as
|
|
63276
|
+
Loader2 as Loader231,
|
|
63162
63277
|
Minus as Minus3,
|
|
63163
63278
|
Plus as Plus15,
|
|
63164
63279
|
RefreshCw as RefreshCw18,
|
|
@@ -63317,7 +63432,7 @@ function ChangesView({ className }) {
|
|
|
63317
63432
|
}
|
|
63318
63433
|
)
|
|
63319
63434
|
] }) : /* @__PURE__ */ jsxs174("div", { className: "flex min-h-0 flex-1 items-center justify-center gap-2 text-sm text-muted-foreground", children: [
|
|
63320
|
-
/* @__PURE__ */ jsx184(
|
|
63435
|
+
/* @__PURE__ */ jsx184(Loader231, { className: "h-4 w-4 animate-spin" }),
|
|
63321
63436
|
" ",
|
|
63322
63437
|
t("activity:changes.loadingDiff")
|
|
63323
63438
|
] }) : diff.error ? /* @__PURE__ */ jsx184("div", { className: "flex min-h-0 flex-1 items-center justify-center text-sm text-destructive", children: diff.error }) : diff.binary ? /* @__PURE__ */ jsx184("div", { className: "flex min-h-0 flex-1 items-center justify-center text-sm text-muted-foreground", children: t("activity:changes.binary") }) : diff.tooLarge ? /* @__PURE__ */ jsx184("div", { className: "flex min-h-0 flex-1 items-center justify-center text-sm text-muted-foreground", children: t("activity:changes.tooLarge") }) : mode === "edit" ? /* @__PURE__ */ jsx184(
|
|
@@ -63434,7 +63549,7 @@ import {
|
|
|
63434
63549
|
TriangleAlert as TriangleAlert5,
|
|
63435
63550
|
X as X31
|
|
63436
63551
|
} from "lucide-react";
|
|
63437
|
-
import { useCallback as
|
|
63552
|
+
import { useCallback as useCallback61, useEffect as useEffect101, useMemo as useMemo56, useRef as useRef56, useState as useState109 } from "react";
|
|
63438
63553
|
import { jsx as jsx186, jsxs as jsxs176 } from "react/jsx-runtime";
|
|
63439
63554
|
function defaultQuery() {
|
|
63440
63555
|
return {
|
|
@@ -63468,7 +63583,7 @@ function ChronicleDashboard() {
|
|
|
63468
63583
|
const [chronicleStatus, setChronicleStatus] = useState109(null);
|
|
63469
63584
|
const queryRef = useRef56(query);
|
|
63470
63585
|
queryRef.current = query;
|
|
63471
|
-
const run =
|
|
63586
|
+
const run = useCallback61(
|
|
63472
63587
|
(next) => {
|
|
63473
63588
|
if (!client2.supportsCapability("chronicle.query")) {
|
|
63474
63589
|
setLoading(false);
|
|
@@ -63492,12 +63607,12 @@ function ChronicleDashboard() {
|
|
|
63492
63607
|
},
|
|
63493
63608
|
[client2]
|
|
63494
63609
|
);
|
|
63495
|
-
const requestMetrics =
|
|
63610
|
+
const requestMetrics = useCallback61(() => {
|
|
63496
63611
|
if (!client2.supportsCapability("chronicle.metrics")) return;
|
|
63497
63612
|
client2.send({ type: "chronicle.metrics", payload: { view: "providers" } });
|
|
63498
63613
|
client2.send({ type: "chronicle.metrics", payload: { view: "tasks", limit: 200 } });
|
|
63499
63614
|
}, [client2]);
|
|
63500
|
-
const requestStatus =
|
|
63615
|
+
const requestStatus = useCallback61(() => {
|
|
63501
63616
|
if (client2.supportsCapability("chronicle.status")) {
|
|
63502
63617
|
client2.send({ type: "chronicle.status" });
|
|
63503
63618
|
}
|
|
@@ -64436,7 +64551,7 @@ var init_completion = __esm({
|
|
|
64436
64551
|
});
|
|
64437
64552
|
|
|
64438
64553
|
// src/hooks/useMemoryForFile.ts
|
|
64439
|
-
import { useCallback as
|
|
64554
|
+
import { useCallback as useCallback62, useEffect as useEffect102, useRef as useRef57, useState as useState110 } from "react";
|
|
64440
64555
|
function normalizePathForCompare(value) {
|
|
64441
64556
|
return value.replace(/\\/g, "/").replace(/^\.\//, "").replace(/\/{2,}/g, "/").toLowerCase();
|
|
64442
64557
|
}
|
|
@@ -64464,7 +64579,7 @@ function useMemoryForFile(options) {
|
|
|
64464
64579
|
const unsubscribeRef = useRef57(null);
|
|
64465
64580
|
const sendOptionsRef = useRef57(sendOptions);
|
|
64466
64581
|
sendOptionsRef.current = sendOptions;
|
|
64467
|
-
const fetchNow =
|
|
64582
|
+
const fetchNow = useCallback62(() => {
|
|
64468
64583
|
if (!filePath) {
|
|
64469
64584
|
setData(null);
|
|
64470
64585
|
setError(null);
|
|
@@ -64526,7 +64641,7 @@ function useMemoryForFile(options) {
|
|
|
64526
64641
|
unsubscribeRef.current = null;
|
|
64527
64642
|
};
|
|
64528
64643
|
}, [autoFetch, fetchNow, sendOptionsKey]);
|
|
64529
|
-
const refetch =
|
|
64644
|
+
const refetch = useCallback62(() => {
|
|
64530
64645
|
fetchNow();
|
|
64531
64646
|
}, [fetchNow]);
|
|
64532
64647
|
useEffect102(() => {
|
|
@@ -64556,7 +64671,7 @@ var init_useMemoryForFile = __esm({
|
|
|
64556
64671
|
});
|
|
64557
64672
|
|
|
64558
64673
|
// src/components/MemoryManager/MemoryDrawer.tsx
|
|
64559
|
-
import { useCallback as
|
|
64674
|
+
import { useCallback as useCallback63, useEffect as useEffect103, useState as useState111 } from "react";
|
|
64560
64675
|
import {
|
|
64561
64676
|
AlertTriangle as AlertTriangle21,
|
|
64562
64677
|
Check as Check27,
|
|
@@ -64565,7 +64680,7 @@ import {
|
|
|
64565
64680
|
EyeOff as EyeOff2,
|
|
64566
64681
|
FileText as FileText14,
|
|
64567
64682
|
GitMerge as GitMerge2,
|
|
64568
|
-
Loader2 as
|
|
64683
|
+
Loader2 as Loader232,
|
|
64569
64684
|
Pin as Pin3,
|
|
64570
64685
|
RefreshCw as RefreshCw20,
|
|
64571
64686
|
Sparkles as Sparkles15,
|
|
@@ -64787,7 +64902,7 @@ function MemoryCard({
|
|
|
64787
64902
|
}
|
|
64788
64903
|
),
|
|
64789
64904
|
pendingAction && /* @__PURE__ */ jsxs177("span", { className: "ml-auto flex items-center gap-1 text-[10px] text-muted-foreground", children: [
|
|
64790
|
-
/* @__PURE__ */ jsx187(
|
|
64905
|
+
/* @__PURE__ */ jsx187(Loader232, { className: "size-3 animate-spin" }),
|
|
64791
64906
|
" ",
|
|
64792
64907
|
pendingAction
|
|
64793
64908
|
] })
|
|
@@ -64876,7 +64991,7 @@ function MemoryDrawer({
|
|
|
64876
64991
|
autoFetch: open
|
|
64877
64992
|
});
|
|
64878
64993
|
const cursorBoostedBucket = lineStart !== void 0 && lineEnd !== void 0;
|
|
64879
|
-
const runAction =
|
|
64994
|
+
const runAction = useCallback63(
|
|
64880
64995
|
async (memoryId, label, handler) => {
|
|
64881
64996
|
if (!handler) return;
|
|
64882
64997
|
setPendingAction((prev) => new Map(prev).set(memoryId, label));
|
|
@@ -65040,7 +65155,7 @@ function EmptyState2({
|
|
|
65040
65155
|
tone3 === "error" ? "text-destructive" : "text-muted-foreground"
|
|
65041
65156
|
),
|
|
65042
65157
|
children: [
|
|
65043
|
-
loading && /* @__PURE__ */ jsx187(
|
|
65158
|
+
loading && /* @__PURE__ */ jsx187(Loader232, { className: "size-4 animate-spin" }),
|
|
65044
65159
|
/* @__PURE__ */ jsx187("p", { children: message })
|
|
65045
65160
|
]
|
|
65046
65161
|
}
|
|
@@ -65075,13 +65190,13 @@ import {
|
|
|
65075
65190
|
FileDiff as FileDiff2,
|
|
65076
65191
|
GitBranch as GitBranch6,
|
|
65077
65192
|
ListTree,
|
|
65078
|
-
Loader2 as
|
|
65193
|
+
Loader2 as Loader233,
|
|
65079
65194
|
RefreshCw as RefreshCw21,
|
|
65080
65195
|
ShieldAlert as ShieldAlert7,
|
|
65081
65196
|
TerminalSquare as TerminalSquare5,
|
|
65082
65197
|
Users as Users10
|
|
65083
65198
|
} from "lucide-react";
|
|
65084
|
-
import { useCallback as
|
|
65199
|
+
import { useCallback as useCallback64, useEffect as useEffect104, useMemo as useMemo57, useRef as useRef58, useState as useState112 } from "react";
|
|
65085
65200
|
import { Fragment as Fragment52, jsx as jsx188, jsxs as jsxs178 } from "react/jsx-runtime";
|
|
65086
65201
|
function summarizeLineage(rows) {
|
|
65087
65202
|
const sessions = /* @__PURE__ */ new Set();
|
|
@@ -65222,7 +65337,7 @@ function FileActivityDrawer({ file }) {
|
|
|
65222
65337
|
const activeBoard = useKanbanStore((state) => state.activeBoard);
|
|
65223
65338
|
const sddSnapshot = useSddBoardStore((state) => state.snapshot);
|
|
65224
65339
|
const client2 = useMemo57(() => getWSClient(wsUrl), [wsUrl]);
|
|
65225
|
-
const requestEvidence =
|
|
65340
|
+
const requestEvidence = useCallback64(() => {
|
|
65226
65341
|
setChronicleError(null);
|
|
65227
65342
|
setChronicleLoading(true);
|
|
65228
65343
|
if (typeof client2.getGitDiff === "function") client2.getGitDiff(file.path);
|
|
@@ -65341,7 +65456,7 @@ function FileActivityDrawer({ file }) {
|
|
|
65341
65456
|
],
|
|
65342
65457
|
[records]
|
|
65343
65458
|
);
|
|
65344
|
-
const taskLabel =
|
|
65459
|
+
const taskLabel = useCallback64(
|
|
65345
65460
|
(taskId) => {
|
|
65346
65461
|
const kanbanTask = activeBoard?.tasks.find((task) => task.id === taskId);
|
|
65347
65462
|
const sddTask = sddSnapshot?.tasks.find(
|
|
@@ -65722,7 +65837,7 @@ function LogsTab({ records, loading }) {
|
|
|
65722
65837
|
const { t } = useTranslation();
|
|
65723
65838
|
if (loading && records.length === 0)
|
|
65724
65839
|
return /* @__PURE__ */ jsxs178("div", { className: "flex h-full items-center justify-center gap-2 text-[10px] text-muted-foreground", children: [
|
|
65725
|
-
/* @__PURE__ */ jsx188(
|
|
65840
|
+
/* @__PURE__ */ jsx188(Loader233, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
65726
65841
|
t("activity:fileActivity.loadingEvidence")
|
|
65727
65842
|
] });
|
|
65728
65843
|
if (records.length === 0) return /* @__PURE__ */ jsx188(EmptyRow, { text: t("activity:fileActivity.noEvidence") });
|
|
@@ -65770,7 +65885,7 @@ function SkeletonTab({ file }) {
|
|
|
65770
65885
|
const [copied, setCopied] = useState112(false);
|
|
65771
65886
|
const [collapseImports, setCollapseImports] = useState112(false);
|
|
65772
65887
|
const [includeDocs, setIncludeDocs] = useState112(true);
|
|
65773
|
-
const fetchSkeleton =
|
|
65888
|
+
const fetchSkeleton = useCallback64(() => {
|
|
65774
65889
|
setLoading(true);
|
|
65775
65890
|
setError(null);
|
|
65776
65891
|
client2.send({
|
|
@@ -65920,7 +66035,7 @@ function SkeletonTab({ file }) {
|
|
|
65920
66035
|
] })
|
|
65921
66036
|
] }),
|
|
65922
66037
|
/* @__PURE__ */ jsx188("div", { className: "min-h-0 flex-1 overflow-auto rounded border border-border/60 bg-muted/20 p-2 font-mono text-[11px] leading-relaxed", children: loading && !skeleton ? /* @__PURE__ */ jsxs178("div", { className: "flex h-full items-center justify-center text-muted-foreground", children: [
|
|
65923
|
-
/* @__PURE__ */ jsx188(
|
|
66038
|
+
/* @__PURE__ */ jsx188(Loader233, { className: "mr-2 h-4 w-4 animate-spin text-primary" }),
|
|
65924
66039
|
/* @__PURE__ */ jsx188("span", { children: "Extracting AST Skeleton\u2026" })
|
|
65925
66040
|
] }) : error ? /* @__PURE__ */ jsx188("div", { className: "p-4 text-warning", children: error }) : /* @__PURE__ */ jsx188("div", { className: "font-mono select-text", children: skeleton.split("\n").map((line, idx) => renderInteractiveLine(line, idx)) }) })
|
|
65926
66041
|
] });
|
|
@@ -65948,7 +66063,7 @@ __export(CodeEditor_exports, {
|
|
|
65948
66063
|
CodeEditor: () => CodeEditor
|
|
65949
66064
|
});
|
|
65950
66065
|
import { Circle as Circle8, FileText as FileText15, GitBranch as GitBranch7, Map as MapIcon, Send as Send9, WrapText, X as X33 } from "lucide-react";
|
|
65951
|
-
import { useCallback as
|
|
66066
|
+
import { useCallback as useCallback65, useEffect as useEffect105, useMemo as useMemo58, useRef as useRef59, useState as useState113 } from "react";
|
|
65952
66067
|
import Editor, { loader as loader2 } from "@monaco-editor/react";
|
|
65953
66068
|
import * as monaco3 from "monaco-editor";
|
|
65954
66069
|
import { jsx as jsx189, jsxs as jsxs179 } from "react/jsx-runtime";
|
|
@@ -66175,7 +66290,7 @@ function CodeEditor() {
|
|
|
66175
66290
|
});
|
|
66176
66291
|
};
|
|
66177
66292
|
}, []);
|
|
66178
|
-
const captureSelection =
|
|
66293
|
+
const captureSelection = useCallback65(() => {
|
|
66179
66294
|
const editor4 = editorRef.current;
|
|
66180
66295
|
if (!editor4) return null;
|
|
66181
66296
|
const selection = editor4.getSelection();
|
|
@@ -66190,14 +66305,14 @@ function CodeEditor() {
|
|
|
66190
66305
|
endLine: selection.endLineNumber
|
|
66191
66306
|
};
|
|
66192
66307
|
}, []);
|
|
66193
|
-
const focusChat =
|
|
66308
|
+
const focusChat = useCallback65(() => {
|
|
66194
66309
|
showPanel("chat");
|
|
66195
66310
|
requestAnimationFrame(() => {
|
|
66196
66311
|
const ta = document.querySelector("[data-chat-textarea]");
|
|
66197
66312
|
ta?.focus();
|
|
66198
66313
|
});
|
|
66199
66314
|
}, []);
|
|
66200
|
-
const sendSelectionToChat =
|
|
66315
|
+
const sendSelectionToChat = useCallback65(() => {
|
|
66201
66316
|
const filePath = activeFilePathRef.current;
|
|
66202
66317
|
if (!filePath) return;
|
|
66203
66318
|
const sel = captureSelection();
|
|
@@ -66211,13 +66326,13 @@ function CodeEditor() {
|
|
|
66211
66326
|
});
|
|
66212
66327
|
focusChat();
|
|
66213
66328
|
}, [captureSelection, focusChat]);
|
|
66214
|
-
const mentionWholeFile =
|
|
66329
|
+
const mentionWholeFile = useCallback65(() => {
|
|
66215
66330
|
const filePath = activeFilePathRef.current;
|
|
66216
66331
|
if (!filePath) return;
|
|
66217
66332
|
useFileReferenceStore.getState().addRef({ kind: "file", path: filePath });
|
|
66218
66333
|
focusChat();
|
|
66219
66334
|
}, [focusChat]);
|
|
66220
|
-
const handleMount =
|
|
66335
|
+
const handleMount = useCallback65(
|
|
66221
66336
|
(editor4) => {
|
|
66222
66337
|
editorRef.current = editor4;
|
|
66223
66338
|
monaco3.editor.setTheme(getMonacoTheme());
|
|
@@ -66250,7 +66365,7 @@ function CodeEditor() {
|
|
|
66250
66365
|
},
|
|
66251
66366
|
[sendSelectionToChat, mentionWholeFile]
|
|
66252
66367
|
);
|
|
66253
|
-
const handleChange =
|
|
66368
|
+
const handleChange = useCallback65(
|
|
66254
66369
|
(value) => {
|
|
66255
66370
|
if (activeFilePath && value !== void 0) {
|
|
66256
66371
|
updateContent(activeFilePath, value);
|
|
@@ -67195,7 +67310,7 @@ import {
|
|
|
67195
67310
|
MiniMap as MiniMap2,
|
|
67196
67311
|
ReactFlow as ReactFlow2
|
|
67197
67312
|
} from "@xyflow/react";
|
|
67198
|
-
import { Loader2 as
|
|
67313
|
+
import { Loader2 as Loader234, Network as Network4 } from "lucide-react";
|
|
67199
67314
|
import { Fragment as Fragment53, jsx as jsx192, jsxs as jsxs182 } from "react/jsx-runtime";
|
|
67200
67315
|
function isAuthError(message) {
|
|
67201
67316
|
return /Authentication required|Unauthorized/i.test(message);
|
|
@@ -67214,7 +67329,7 @@ function CodeMapCanvasSurface({
|
|
|
67214
67329
|
const { t } = useTranslation();
|
|
67215
67330
|
return /* @__PURE__ */ jsxs182(Fragment53, { children: [
|
|
67216
67331
|
loading && /* @__PURE__ */ jsxs182("div", { className: "absolute inset-0 z-20 flex flex-col items-center justify-center gap-3 bg-background/75 backdrop-blur-sm", children: [
|
|
67217
|
-
/* @__PURE__ */ jsx192(
|
|
67332
|
+
/* @__PURE__ */ jsx192(Loader234, { className: "h-7 w-7 animate-spin text-primary" }),
|
|
67218
67333
|
/* @__PURE__ */ jsx192("span", { className: "font-mono text-[10px] uppercase tracking-widest text-muted-foreground", children: t("activity:codeMap.mappingRelationships") })
|
|
67219
67334
|
] }),
|
|
67220
67335
|
error && !loading && /* @__PURE__ */ jsxs182("div", { className: "absolute inset-0 z-20 flex flex-col items-center justify-center gap-3 p-8 text-center", children: [
|
|
@@ -68173,7 +68288,7 @@ import {
|
|
|
68173
68288
|
FileCode as FileCode6,
|
|
68174
68289
|
Folder as Folder3,
|
|
68175
68290
|
FolderOpen as FolderOpen6,
|
|
68176
|
-
Loader2 as
|
|
68291
|
+
Loader2 as Loader235,
|
|
68177
68292
|
Radio as Radio7
|
|
68178
68293
|
} from "lucide-react";
|
|
68179
68294
|
import { memo as memo15 } from "react";
|
|
@@ -68272,7 +68387,7 @@ var init_CodeMapDirectoryTree = __esm({
|
|
|
68272
68387
|
className: "flex h-6 w-4 shrink-0 items-center justify-center text-muted-foreground",
|
|
68273
68388
|
onClick: () => onToggleFile(file),
|
|
68274
68389
|
"aria-label": `${expanded ? "Collapse" : "Expand"} ${file.label}`,
|
|
68275
|
-
children: loadingBranches.has(branchKey) ? /* @__PURE__ */ jsx201(
|
|
68390
|
+
children: loadingBranches.has(branchKey) ? /* @__PURE__ */ jsx201(Loader235, { className: "h-3 w-3 animate-spin" }) : expanded ? /* @__PURE__ */ jsx201(ChevronDown25, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx201(ChevronRight17, { className: "h-3 w-3" })
|
|
68276
68391
|
}
|
|
68277
68392
|
),
|
|
68278
68393
|
/* @__PURE__ */ jsxs191(
|
|
@@ -68368,7 +68483,7 @@ var init_CodeMapDirectoryTree = __esm({
|
|
|
68368
68483
|
});
|
|
68369
68484
|
|
|
68370
68485
|
// src/components/CodeMapTreeSidebar.tsx
|
|
68371
|
-
import { ChevronDown as ChevronDown26, ChevronRight as ChevronRight18, ExternalLink as ExternalLink7, Loader2 as
|
|
68486
|
+
import { ChevronDown as ChevronDown26, ChevronRight as ChevronRight18, ExternalLink as ExternalLink7, Loader2 as Loader236, Package as Package4, Search as Search20, X as X36 } from "lucide-react";
|
|
68372
68487
|
import { jsx as jsx202, jsxs as jsxs192 } from "react/jsx-runtime";
|
|
68373
68488
|
function CodeMapTreeSidebar({
|
|
68374
68489
|
rootGraph,
|
|
@@ -68493,7 +68608,7 @@ function CodeMapTreeSidebar({
|
|
|
68493
68608
|
className: "flex h-6 w-5 items-center justify-center text-muted-foreground",
|
|
68494
68609
|
onClick: () => togglePackage(packageNode),
|
|
68495
68610
|
"aria-label": `${expanded ? "Collapse" : "Expand"} ${packageName}`,
|
|
68496
|
-
children: loadingBranches.has(branchKey) ? /* @__PURE__ */ jsx202(
|
|
68611
|
+
children: loadingBranches.has(branchKey) ? /* @__PURE__ */ jsx202(Loader236, { className: "h-3 w-3 animate-spin" }) : expanded ? /* @__PURE__ */ jsx202(ChevronDown26, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx202(ChevronRight18, { className: "h-3 w-3" })
|
|
68497
68612
|
}
|
|
68498
68613
|
),
|
|
68499
68614
|
/* @__PURE__ */ jsxs192(
|
|
@@ -68622,7 +68737,7 @@ import {
|
|
|
68622
68737
|
useNodesState as useNodesState2,
|
|
68623
68738
|
useReactFlow as useReactFlow2
|
|
68624
68739
|
} from "@xyflow/react";
|
|
68625
|
-
import { useCallback as
|
|
68740
|
+
import { useCallback as useCallback66, useDeferredValue, useEffect as useEffect106, useMemo as useMemo59, useRef as useRef60, useState as useState114 } from "react";
|
|
68626
68741
|
import "@xyflow/react/dist/style.css";
|
|
68627
68742
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
68628
68743
|
import { useShallow as useShallow15 } from "zustand/react/shallow";
|
|
@@ -68715,7 +68830,7 @@ function CodeMapInner() {
|
|
|
68715
68830
|
const [flowNodes, setFlowNodes, onNodesChange] = useNodesState2([]);
|
|
68716
68831
|
const [flowEdges, setFlowEdges, onEdgesChange] = useEdgesState2([]);
|
|
68717
68832
|
const { fitView } = useReactFlow2();
|
|
68718
|
-
const fetchGraph =
|
|
68833
|
+
const fetchGraph = useCallback66(
|
|
68719
68834
|
async (targetScope, force = false) => {
|
|
68720
68835
|
const key = scopeKey(targetScope);
|
|
68721
68836
|
const existing = cache.current.get(key);
|
|
@@ -68780,7 +68895,7 @@ function CodeMapInner() {
|
|
|
68780
68895
|
cancelled = true;
|
|
68781
68896
|
};
|
|
68782
68897
|
}, [currentScopeKey, fetchGraph, indexGeneration, scope]);
|
|
68783
|
-
const navigate =
|
|
68898
|
+
const navigate = useCallback66(
|
|
68784
68899
|
(nextScope, preferredSelection) => {
|
|
68785
68900
|
pendingSelection.current = preferredSelection ?? null;
|
|
68786
68901
|
if (scopeKey(nextScope) === currentScopeKey) {
|
|
@@ -68792,7 +68907,7 @@ function CodeMapInner() {
|
|
|
68792
68907
|
},
|
|
68793
68908
|
[currentScopeKey]
|
|
68794
68909
|
);
|
|
68795
|
-
const ensureBranch =
|
|
68910
|
+
const ensureBranch = useCallback66(
|
|
68796
68911
|
async (targetScope) => {
|
|
68797
68912
|
const key = scopeKey(targetScope);
|
|
68798
68913
|
if (cache.current.has(key) || loadingBranches.has(key)) return;
|
|
@@ -68876,11 +68991,11 @@ function CodeMapInner() {
|
|
|
68876
68991
|
].join(""),
|
|
68877
68992
|
[canvasGraph, currentScopeKey, layout, selectedId]
|
|
68878
68993
|
);
|
|
68879
|
-
const handleSelectNode =
|
|
68994
|
+
const handleSelectNode = useCallback66((node) => {
|
|
68880
68995
|
setSelectedId(node.id);
|
|
68881
68996
|
setExpandedRelations(/* @__PURE__ */ new Set());
|
|
68882
68997
|
}, []);
|
|
68883
|
-
const handleOpenNode =
|
|
68998
|
+
const handleOpenNode = useCallback66(
|
|
68884
68999
|
(node) => {
|
|
68885
69000
|
if (node.kind === "package")
|
|
68886
69001
|
navigate({ level: "files", package: node.package ?? node.label });
|
|
@@ -69082,15 +69197,15 @@ function CodeMapInner() {
|
|
|
69082
69197
|
return () => window.clearInterval(interval);
|
|
69083
69198
|
}, [sweepActivity]);
|
|
69084
69199
|
const rootGraph = cache.current.get("packages") ?? (scope.level === "packages" ? graph : EMPTY_GRAPH);
|
|
69085
|
-
const packageGraph =
|
|
69200
|
+
const packageGraph = useCallback66(
|
|
69086
69201
|
(packageName) => cache.current.get(scopeKey({ level: "files", package: packageName })),
|
|
69087
69202
|
[cacheRevision]
|
|
69088
69203
|
);
|
|
69089
|
-
const graphForFile =
|
|
69204
|
+
const graphForFile = useCallback66(
|
|
69090
69205
|
(filePath) => cache.current.get(scopeKey({ level: "symbols", file: filePath })),
|
|
69091
69206
|
[cacheRevision]
|
|
69092
69207
|
);
|
|
69093
|
-
const locateActivity =
|
|
69208
|
+
const locateActivity = useCallback66(
|
|
69094
69209
|
(activity) => {
|
|
69095
69210
|
let indexedFile = activity.filePath;
|
|
69096
69211
|
let indexedPackage = packageForFile(activity.filePath);
|
|
@@ -69125,7 +69240,7 @@ function CodeMapInner() {
|
|
|
69125
69240
|
lastFollowedActivity.current = followKey;
|
|
69126
69241
|
locateActivity(latest);
|
|
69127
69242
|
}, [displayedActiveOperations, followLive, locateActivity, pausedOperations]);
|
|
69128
|
-
const toggleTelemetryPaused =
|
|
69243
|
+
const toggleTelemetryPaused = useCallback66(() => {
|
|
69129
69244
|
if (pausedOperations) {
|
|
69130
69245
|
setPausedOperations(null);
|
|
69131
69246
|
setPausedRecent(null);
|
|
@@ -69134,7 +69249,7 @@ function CodeMapInner() {
|
|
|
69134
69249
|
setPausedOperations([...activeOperations]);
|
|
69135
69250
|
setPausedRecent([...recentActivities]);
|
|
69136
69251
|
}, [activeOperations, pausedOperations, recentActivities]);
|
|
69137
|
-
const togglePackage =
|
|
69252
|
+
const togglePackage = useCallback66(
|
|
69138
69253
|
(node) => {
|
|
69139
69254
|
const packageName = node.package ?? node.label;
|
|
69140
69255
|
const opening = !expandedPackages.has(packageName);
|
|
@@ -69157,7 +69272,7 @@ function CodeMapInner() {
|
|
|
69157
69272
|
},
|
|
69158
69273
|
[ensureBranch, expandedPackages]
|
|
69159
69274
|
);
|
|
69160
|
-
const toggleFile =
|
|
69275
|
+
const toggleFile = useCallback66(
|
|
69161
69276
|
(node) => {
|
|
69162
69277
|
if (!node.file) return;
|
|
69163
69278
|
const opening = !expandedFiles.has(node.file);
|
|
@@ -69173,23 +69288,23 @@ function CodeMapInner() {
|
|
|
69173
69288
|
},
|
|
69174
69289
|
[ensureBranch, expandedFiles]
|
|
69175
69290
|
);
|
|
69176
|
-
const toggleDirectory =
|
|
69291
|
+
const toggleDirectory = useCallback66((key) => {
|
|
69177
69292
|
setExpandedDirectories((current) => {
|
|
69178
69293
|
const next = new Set(current);
|
|
69179
69294
|
next.has(key) ? next.delete(key) : next.add(key);
|
|
69180
69295
|
return next;
|
|
69181
69296
|
});
|
|
69182
69297
|
}, []);
|
|
69183
|
-
const revealAllTree =
|
|
69298
|
+
const revealAllTree = useCallback66((key) => {
|
|
69184
69299
|
setRevealAllKeys((current) => new Set(current).add(key));
|
|
69185
69300
|
}, []);
|
|
69186
|
-
const selectFileFromTree =
|
|
69301
|
+
const selectFileFromTree = useCallback66(
|
|
69187
69302
|
(node) => {
|
|
69188
69303
|
navigate({ level: "files", package: node.package ?? "(root)" }, node.id);
|
|
69189
69304
|
},
|
|
69190
69305
|
[navigate]
|
|
69191
69306
|
);
|
|
69192
|
-
const selectSymbolFromTree =
|
|
69307
|
+
const selectSymbolFromTree = useCallback66(
|
|
69193
69308
|
(node) => {
|
|
69194
69309
|
if (node.file)
|
|
69195
69310
|
navigate({ level: "symbols", file: node.file, package: node.package }, node.id);
|
|
@@ -69216,7 +69331,7 @@ function CodeMapInner() {
|
|
|
69216
69331
|
overscan: 8,
|
|
69217
69332
|
enabled: virtualizeSearch
|
|
69218
69333
|
});
|
|
69219
|
-
const selectSearchResult =
|
|
69334
|
+
const selectSearchResult = useCallback66(
|
|
69220
69335
|
(node) => {
|
|
69221
69336
|
if (node.kind === "package") navigate({ level: "packages" }, node.id);
|
|
69222
69337
|
else if (node.kind === "file")
|
|
@@ -69414,7 +69529,7 @@ import {
|
|
|
69414
69529
|
Server as Server5,
|
|
69415
69530
|
TrendingUp as TrendingUp3
|
|
69416
69531
|
} from "lucide-react";
|
|
69417
|
-
import { useCallback as
|
|
69532
|
+
import { useCallback as useCallback67, useEffect as useEffect107, useState as useState115 } from "react";
|
|
69418
69533
|
import { Fragment as Fragment56, jsx as jsx204, jsxs as jsxs194 } from "react/jsx-runtime";
|
|
69419
69534
|
function MetricCard2({
|
|
69420
69535
|
title,
|
|
@@ -69451,7 +69566,7 @@ function DebugDashboard() {
|
|
|
69451
69566
|
});
|
|
69452
69567
|
const [isLoading, setIsLoading] = useState115(true);
|
|
69453
69568
|
const [refreshInterval, setRefreshInterval] = useState115(2e3);
|
|
69454
|
-
const fetchMetrics =
|
|
69569
|
+
const fetchMetrics = useCallback67(async () => {
|
|
69455
69570
|
try {
|
|
69456
69571
|
const [watcherRes, systemRes] = await Promise.all([
|
|
69457
69572
|
fetch("/debug/watcher-metrics"),
|
|
@@ -69997,7 +70112,7 @@ __export(DesignGalleryView_exports, {
|
|
|
69997
70112
|
DesignGalleryView: () => DesignGalleryView
|
|
69998
70113
|
});
|
|
69999
70114
|
import { Check as Check29, Download as Download7, Palette as Palette5, Search as Search21, ShieldCheck as ShieldCheck9, X as X37 } from "lucide-react";
|
|
70000
|
-
import { useCallback as
|
|
70115
|
+
import { useCallback as useCallback68, useEffect as useEffect108, useMemo as useMemo60, useState as useState116 } from "react";
|
|
70001
70116
|
import { jsx as jsx205, jsxs as jsxs195 } from "react/jsx-runtime";
|
|
70002
70117
|
function applyOv(base, overrides, theme) {
|
|
70003
70118
|
const out = { ...base };
|
|
@@ -70301,11 +70416,11 @@ function DesignGalleryView({ className }) {
|
|
|
70301
70416
|
client2.off("design.verify", onVer);
|
|
70302
70417
|
};
|
|
70303
70418
|
}, [client2, sessionId]);
|
|
70304
|
-
const useKit =
|
|
70419
|
+
const useKit = useCallback68(
|
|
70305
70420
|
(id) => client2?.send({ type: "design.use", payload: client2.withSession({ kit: id, stack }) }),
|
|
70306
70421
|
[client2, stack]
|
|
70307
70422
|
);
|
|
70308
|
-
const setOverride =
|
|
70423
|
+
const setOverride = useCallback68(
|
|
70309
70424
|
(key, hex) => {
|
|
70310
70425
|
setOverrides((prev) => ({ ...prev, [key]: hex }));
|
|
70311
70426
|
client2?.send({
|
|
@@ -70315,15 +70430,15 @@ function DesignGalleryView({ className }) {
|
|
|
70315
70430
|
},
|
|
70316
70431
|
[client2]
|
|
70317
70432
|
);
|
|
70318
|
-
const tuneKit =
|
|
70433
|
+
const tuneKit = useCallback68(
|
|
70319
70434
|
(tune) => client2?.send({ type: "design.tune", payload: client2.withSession({ tune }) }),
|
|
70320
70435
|
[client2]
|
|
70321
70436
|
);
|
|
70322
|
-
const materialize =
|
|
70437
|
+
const materialize = useCallback68(() => {
|
|
70323
70438
|
setStatus(default2.t("activity:design.writing"));
|
|
70324
70439
|
client2?.send({ type: "design.materialize", payload: client2.withSession({ stack }) });
|
|
70325
70440
|
}, [client2, stack]);
|
|
70326
|
-
const verify =
|
|
70441
|
+
const verify = useCallback68(() => {
|
|
70327
70442
|
setStatus(default2.t("activity:design.scanning"));
|
|
70328
70443
|
client2?.send({ type: "design.verify", payload: client2.withSession({}) });
|
|
70329
70444
|
}, [client2]);
|
|
@@ -70679,7 +70794,7 @@ var init_TaskCard = __esm({
|
|
|
70679
70794
|
});
|
|
70680
70795
|
|
|
70681
70796
|
// src/components/BoardView.tsx
|
|
70682
|
-
import { useCallback as
|
|
70797
|
+
import { useCallback as useCallback69, useMemo as useMemo61, useState as useState118 } from "react";
|
|
70683
70798
|
import { Columns3 as Columns33, Plus as Plus16, Rows3 as Rows32 } from "lucide-react";
|
|
70684
70799
|
import { Fragment as Fragment57, jsx as jsx207, jsxs as jsxs197 } from "react/jsx-runtime";
|
|
70685
70800
|
function BoardView() {
|
|
@@ -70701,23 +70816,23 @@ function BoardView() {
|
|
|
70701
70816
|
() => [...new Set(tasks.map((t2) => t2.assignee).filter((a) => Boolean(a)))],
|
|
70702
70817
|
[tasks]
|
|
70703
70818
|
);
|
|
70704
|
-
const send =
|
|
70819
|
+
const send = useCallback69(
|
|
70705
70820
|
(msg) => client2?.send?.(msg),
|
|
70706
70821
|
[client2]
|
|
70707
70822
|
);
|
|
70708
|
-
const onStatusChange =
|
|
70823
|
+
const onStatusChange = useCallback69(
|
|
70709
70824
|
(taskId, status) => send({ type: "goal.taskStatus", payload: { taskId, status } }),
|
|
70710
70825
|
[send]
|
|
70711
70826
|
);
|
|
70712
|
-
const onRetry =
|
|
70827
|
+
const onRetry = useCallback69(
|
|
70713
70828
|
(taskId) => send({ type: "goal.retryTask", payload: { taskId } }),
|
|
70714
70829
|
[send]
|
|
70715
70830
|
);
|
|
70716
|
-
const onAssign =
|
|
70831
|
+
const onAssign = useCallback69(
|
|
70717
70832
|
(taskId, agentName) => send({ type: "goal.assignTask", payload: { taskId, agentName: agentName || void 0 } }),
|
|
70718
70833
|
[send]
|
|
70719
70834
|
);
|
|
70720
|
-
const onAddTask =
|
|
70835
|
+
const onAddTask = useCallback69(
|
|
70721
70836
|
(phaseId) => {
|
|
70722
70837
|
void promptModal({ title: t("activity:board.newTaskTitle"), placeholder: t("activity:board.newTaskPlaceholder"), confirmLabel: t("activity:board.addTask") }).then(
|
|
70723
70838
|
(title) => {
|
|
@@ -70727,7 +70842,7 @@ function BoardView() {
|
|
|
70727
70842
|
},
|
|
70728
70843
|
[send]
|
|
70729
70844
|
);
|
|
70730
|
-
const dropToPhase =
|
|
70845
|
+
const dropToPhase = useCallback69(
|
|
70731
70846
|
(toPhaseId) => {
|
|
70732
70847
|
if (dragId) send({ type: "goal.moveTask", payload: { taskId: dragId, toPhaseId } });
|
|
70733
70848
|
setDragId(null);
|
|
@@ -70735,7 +70850,7 @@ function BoardView() {
|
|
|
70735
70850
|
},
|
|
70736
70851
|
[dragId, send]
|
|
70737
70852
|
);
|
|
70738
|
-
const dropToStatus =
|
|
70853
|
+
const dropToStatus = useCallback69(
|
|
70739
70854
|
(status) => {
|
|
70740
70855
|
if (dragId) send({ type: "goal.taskStatus", payload: { taskId: dragId, status } });
|
|
70741
70856
|
setDragId(null);
|
|
@@ -71102,8 +71217,8 @@ var GoalView_exports = {};
|
|
|
71102
71217
|
__export(GoalView_exports, {
|
|
71103
71218
|
GoalView: () => GoalView
|
|
71104
71219
|
});
|
|
71105
|
-
import { useCallback as
|
|
71106
|
-
import { Layers as Layers11, Loader2 as
|
|
71220
|
+
import { useCallback as useCallback70, useEffect as useEffect109, useRef as useRef61, useState as useState119 } from "react";
|
|
71221
|
+
import { Layers as Layers11, Loader2 as Loader237, Pause as Pause7, Play as Play5, Plus as Plus17, Rocket as Rocket4, Square as Square7, Undo2 as Undo23, X as X38, Zap as Zap27 } from "lucide-react";
|
|
71107
71222
|
import { Fragment as Fragment58, jsx as jsx208, jsxs as jsxs198 } from "react/jsx-runtime";
|
|
71108
71223
|
function GoalView({ onClose }) {
|
|
71109
71224
|
const { client: client2 } = useWebSocket();
|
|
@@ -71157,7 +71272,7 @@ function GoalView({ onClose }) {
|
|
|
71157
71272
|
useEffect109(() => {
|
|
71158
71273
|
if (hasPhases) setPlanningGoal(null);
|
|
71159
71274
|
}, [hasPhases]);
|
|
71160
|
-
const handleStart =
|
|
71275
|
+
const handleStart = useCallback70(() => {
|
|
71161
71276
|
const g = goal.trim();
|
|
71162
71277
|
if (!g || planningGoal != null) return;
|
|
71163
71278
|
const chat = useChatStore.getState();
|
|
@@ -71174,35 +71289,35 @@ function GoalView({ onClose }) {
|
|
|
71174
71289
|
});
|
|
71175
71290
|
showPanel("chat");
|
|
71176
71291
|
}, [goal, planningGoal, client2, isolate]);
|
|
71177
|
-
const handleCancelPlanning =
|
|
71292
|
+
const handleCancelPlanning = useCallback70(() => {
|
|
71178
71293
|
client2?.send?.({ type: "goal.stop", payload: {} });
|
|
71179
71294
|
setPlanningGoal(null);
|
|
71180
71295
|
}, [client2]);
|
|
71181
|
-
const handleToggleAutonomous =
|
|
71296
|
+
const handleToggleAutonomous = useCallback70(() => {
|
|
71182
71297
|
client2?.send?.({ type: "goal.toggleAutonomous", payload: {} });
|
|
71183
71298
|
}, [client2]);
|
|
71184
|
-
const handlePauseResume =
|
|
71299
|
+
const handlePauseResume = useCallback70(() => {
|
|
71185
71300
|
client2?.send?.(
|
|
71186
71301
|
status === "paused" ? { type: "goal.resume", payload: {} } : { type: "goal.pause", payload: {} }
|
|
71187
71302
|
);
|
|
71188
71303
|
}, [client2, status]);
|
|
71189
|
-
const handleStop =
|
|
71304
|
+
const handleStop = useCallback70(() => {
|
|
71190
71305
|
client2?.send?.({ type: "goal.stop", payload: {} });
|
|
71191
71306
|
}, [client2]);
|
|
71192
|
-
const handleNew =
|
|
71307
|
+
const handleNew = useCallback70(() => {
|
|
71193
71308
|
client2?.send?.({ type: "goal.clear", payload: {} });
|
|
71194
71309
|
useGoalRunStore.getState().clear();
|
|
71195
71310
|
setPlanningGoal(null);
|
|
71196
71311
|
setGoal("");
|
|
71197
71312
|
}, [client2]);
|
|
71198
71313
|
const [confirmRevert, setConfirmRevert] = useState119(false);
|
|
71199
|
-
const handleRevert =
|
|
71314
|
+
const handleRevert = useCallback70(() => {
|
|
71200
71315
|
client2?.send?.({ type: "goal.revert", payload: {} });
|
|
71201
71316
|
setConfirmRevert(false);
|
|
71202
71317
|
}, [client2]);
|
|
71203
71318
|
const isLive = status === "running" || status === "paused";
|
|
71204
71319
|
const isDone = status === "stopped" || status === "completed" || status === "failed";
|
|
71205
|
-
const handleSelectBoard =
|
|
71320
|
+
const handleSelectBoard = useCallback70(
|
|
71206
71321
|
(graphId) => {
|
|
71207
71322
|
if (graphId) client2?.send?.({ type: "goal.load", payload: { graphId } });
|
|
71208
71323
|
},
|
|
@@ -71359,7 +71474,7 @@ function GoalView({ onClose }) {
|
|
|
71359
71474
|
) : planning ? (
|
|
71360
71475
|
/* ── Planning state — goal accepted, phases not built yet ── */
|
|
71361
71476
|
/* @__PURE__ */ jsx208("div", { className: "flex-1 flex items-center justify-center p-8", children: /* @__PURE__ */ jsxs198("div", { className: "max-w-lg w-full space-y-5 text-center", children: [
|
|
71362
|
-
/* @__PURE__ */ jsx208(
|
|
71477
|
+
/* @__PURE__ */ jsx208(Loader237, { className: "h-10 w-10 mx-auto animate-spin text-primary/70" }),
|
|
71363
71478
|
/* @__PURE__ */ jsxs198("div", { className: "space-y-1", children: [
|
|
71364
71479
|
/* @__PURE__ */ jsx208("h2", { className: "text-xl font-semibold", children: t("activity:goalRun.planning") }),
|
|
71365
71480
|
/* @__PURE__ */ jsx208("p", { className: "text-sm text-muted-foreground", children: t("activity:goalRun.planningBody") })
|
|
@@ -71403,7 +71518,7 @@ function GoalView({ onClose }) {
|
|
|
71403
71518
|
}
|
|
71404
71519
|
),
|
|
71405
71520
|
assessLoading && /* @__PURE__ */ jsxs198("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
71406
|
-
/* @__PURE__ */ jsx208(
|
|
71521
|
+
/* @__PURE__ */ jsx208(Loader237, { className: "h-3 w-3 animate-spin" }),
|
|
71407
71522
|
t("activity:goalRun.assess.analyzing")
|
|
71408
71523
|
] }),
|
|
71409
71524
|
!assessLoading && assessResult && !assessResult.parseFailed && /* @__PURE__ */ jsxs198(
|
|
@@ -74442,7 +74557,7 @@ import {
|
|
|
74442
74557
|
CircleDot as CircleDot7,
|
|
74443
74558
|
GitMerge as GitMerge3,
|
|
74444
74559
|
Layers as Layers12,
|
|
74445
|
-
Loader2 as
|
|
74560
|
+
Loader2 as Loader238,
|
|
74446
74561
|
Play as Play6,
|
|
74447
74562
|
RotateCcw as RotateCcw12,
|
|
74448
74563
|
ShieldAlert as ShieldAlert10,
|
|
@@ -74497,7 +74612,7 @@ var init_sdd_theme = __esm({
|
|
|
74497
74612
|
},
|
|
74498
74613
|
in_progress: {
|
|
74499
74614
|
label: "Running",
|
|
74500
|
-
icon:
|
|
74615
|
+
icon: Loader238,
|
|
74501
74616
|
spin: true,
|
|
74502
74617
|
text: "text-warning",
|
|
74503
74618
|
ring: "border-warning/45 bg-warning/10",
|
|
@@ -74610,14 +74725,14 @@ import {
|
|
|
74610
74725
|
useReactFlow as useReactFlow3
|
|
74611
74726
|
} from "@xyflow/react";
|
|
74612
74727
|
import "@xyflow/react/dist/style.css";
|
|
74613
|
-
import { Check as Check32, Loader2 as
|
|
74728
|
+
import { Check as Check32, Loader2 as Loader239, X as X41, GitBranch as GitBranch11, RotateCcw as RotateCcw13, CircleDot as CircleDot8 } from "lucide-react";
|
|
74614
74729
|
import { jsx as jsx219, jsxs as jsxs209 } from "react/jsx-runtime";
|
|
74615
74730
|
function TaskNode({ data }) {
|
|
74616
74731
|
const t = data.task;
|
|
74617
74732
|
const { t: tt } = useTranslation();
|
|
74618
74733
|
const s = STATUS[t.displayStatus];
|
|
74619
74734
|
const running = t.displayStatus === "in_progress";
|
|
74620
|
-
const StatusIcon2 = t.displayStatus === "completed" ? Check32 : t.displayStatus === "failed" ? X41 : running ?
|
|
74735
|
+
const StatusIcon2 = t.displayStatus === "completed" ? Check32 : t.displayStatus === "failed" ? X41 : running ? Loader239 : CircleDot8;
|
|
74621
74736
|
return /* @__PURE__ */ jsxs209(
|
|
74622
74737
|
"div",
|
|
74623
74738
|
{
|
|
@@ -77477,7 +77592,7 @@ var init_VerificationReportPanel = __esm({
|
|
|
77477
77592
|
});
|
|
77478
77593
|
|
|
77479
77594
|
// src/components/TaskVerificationSection.tsx
|
|
77480
|
-
import { Loader2 as
|
|
77595
|
+
import { Loader2 as Loader240, ShieldQuestion } from "lucide-react";
|
|
77481
77596
|
import { Fragment as Fragment61, jsx as jsx232, jsxs as jsxs222 } from "react/jsx-runtime";
|
|
77482
77597
|
function TaskVerificationSection({
|
|
77483
77598
|
board,
|
|
@@ -77491,7 +77606,7 @@ function TaskVerificationSection({
|
|
|
77491
77606
|
let verification;
|
|
77492
77607
|
if (state === "running") {
|
|
77493
77608
|
verification = /* @__PURE__ */ jsxs222("div", { className: "mt-4 flex items-center gap-2 rounded-md border border-info/30 bg-info/5 p-3 text-xs text-info", children: [
|
|
77494
|
-
/* @__PURE__ */ jsx232(
|
|
77609
|
+
/* @__PURE__ */ jsx232(Loader240, { size: 14, className: "animate-spin" }),
|
|
77495
77610
|
t("activity:taskVerify.verificationRunningChecksAreBeingExecuted")
|
|
77496
77611
|
] });
|
|
77497
77612
|
} else if (task.verificationReport) {
|
|
@@ -78523,7 +78638,7 @@ import {
|
|
|
78523
78638
|
Check as Check37,
|
|
78524
78639
|
ChevronRight as ChevronRight21,
|
|
78525
78640
|
CircleDot as CircleDot9,
|
|
78526
|
-
Loader2 as
|
|
78641
|
+
Loader2 as Loader241,
|
|
78527
78642
|
ShieldCheck as ShieldCheck17,
|
|
78528
78643
|
ShieldQuestion as ShieldQuestion2,
|
|
78529
78644
|
ShieldX,
|
|
@@ -78535,7 +78650,7 @@ function StatusIcon({ task }) {
|
|
|
78535
78650
|
if (task.status === "completed") return /* @__PURE__ */ jsx234(Check37, { size: 13, className: "text-success" });
|
|
78536
78651
|
if (task.status === "failed") return /* @__PURE__ */ jsx234(X46, { size: 13, className: "text-destructive" });
|
|
78537
78652
|
if (task.status === "in_progress")
|
|
78538
|
-
return /* @__PURE__ */ jsx234(
|
|
78653
|
+
return /* @__PURE__ */ jsx234(Loader241, { size: 13, className: "animate-spin text-info" });
|
|
78539
78654
|
return /* @__PURE__ */ jsx234(CircleDot9, { size: 13, className: "text-muted-foreground" });
|
|
78540
78655
|
}
|
|
78541
78656
|
function KanbanTaskTree({
|
|
@@ -78621,7 +78736,7 @@ var init_KanbanTaskTree = __esm({
|
|
|
78621
78736
|
className: "bg-muted text-muted-foreground",
|
|
78622
78737
|
icon: ShieldQuestion2
|
|
78623
78738
|
},
|
|
78624
|
-
running: { labelKey: "activity:kanbanTree.verifyVerifying", className: "bg-info/10 text-info", icon:
|
|
78739
|
+
running: { labelKey: "activity:kanbanTree.verifyVerifying", className: "bg-info/10 text-info", icon: Loader241 },
|
|
78625
78740
|
passed: { labelKey: "activity:kanbanTree.verifyVerified", className: "bg-success/10 text-success", icon: ShieldCheck17 },
|
|
78626
78741
|
failed: { labelKey: "activity:kanbanTree.verifyFailed", className: "bg-destructive/10 text-destructive", icon: ShieldX },
|
|
78627
78742
|
needs_human: { labelKey: "activity:kanbanTree.verifyNeedsReview", className: "bg-warning/10 text-warning", icon: AlertTriangle28 },
|
|
@@ -79881,7 +79996,7 @@ import {
|
|
|
79881
79996
|
ScrollText as ScrollText4,
|
|
79882
79997
|
TriangleAlert as TriangleAlert6
|
|
79883
79998
|
} from "lucide-react";
|
|
79884
|
-
import { useCallback as
|
|
79999
|
+
import { useCallback as useCallback71, useEffect as useEffect122, useMemo as useMemo71, useState as useState135 } from "react";
|
|
79885
80000
|
import { jsx as jsx240, jsxs as jsxs229 } from "react/jsx-runtime";
|
|
79886
80001
|
function categoryLabel(t, category) {
|
|
79887
80002
|
return t(`activity:promptJournal.cat.${category}`, category);
|
|
@@ -79899,7 +80014,7 @@ function PromptJournalView() {
|
|
|
79899
80014
|
limit: DEFAULT_LIMIT
|
|
79900
80015
|
});
|
|
79901
80016
|
const [expanded, setExpanded] = useState135(/* @__PURE__ */ new Set());
|
|
79902
|
-
const load =
|
|
80017
|
+
const load = useCallback71(() => {
|
|
79903
80018
|
if (!client2.isConnected) {
|
|
79904
80019
|
setLoading(false);
|
|
79905
80020
|
return;
|
|
@@ -80344,7 +80459,7 @@ var init_RefreshDebugView = __esm({
|
|
|
80344
80459
|
});
|
|
80345
80460
|
|
|
80346
80461
|
// src/components/MemoryManager/DeleteMemoryDialog.tsx
|
|
80347
|
-
import { Loader2 as
|
|
80462
|
+
import { Loader2 as Loader242, Trash2 as Trash220 } from "lucide-react";
|
|
80348
80463
|
import { jsx as jsx242, jsxs as jsxs231 } from "react/jsx-runtime";
|
|
80349
80464
|
function DeleteMemoryDialog({
|
|
80350
80465
|
busyAction,
|
|
@@ -80365,7 +80480,7 @@ function DeleteMemoryDialog({
|
|
|
80365
80480
|
/* @__PURE__ */ jsxs231(DialogFooter, { children: [
|
|
80366
80481
|
/* @__PURE__ */ jsx242(Button, { variant: "outline", onClick: onCancel, disabled: busyAction === "delete", children: t("common:action.cancel") }),
|
|
80367
80482
|
/* @__PURE__ */ jsxs231(Button, { variant: "destructive", onClick: onConfirm, disabled: busyAction === "delete", children: [
|
|
80368
|
-
busyAction === "delete" ? /* @__PURE__ */ jsx242(
|
|
80483
|
+
busyAction === "delete" ? /* @__PURE__ */ jsx242(Loader242, { className: "size-4 animate-spin" }) : /* @__PURE__ */ jsx242(Trash220, { className: "size-4" }),
|
|
80369
80484
|
busyAction === "delete" ? t("activity:memoryManager.deletingLabel") : t("activity:memoryManager.actionDeleteMemory")
|
|
80370
80485
|
] })
|
|
80371
80486
|
] })
|
|
@@ -81087,7 +81202,7 @@ var init_MemoryDrawerToolbar = __esm({
|
|
|
81087
81202
|
import {
|
|
81088
81203
|
AlertTriangle as AlertTriangle32,
|
|
81089
81204
|
Link2,
|
|
81090
|
-
Loader2 as
|
|
81205
|
+
Loader2 as Loader243,
|
|
81091
81206
|
Pencil as Pencil6,
|
|
81092
81207
|
Plus as Plus23,
|
|
81093
81208
|
Save as Save5,
|
|
@@ -81151,7 +81266,7 @@ function MemoryEditor({
|
|
|
81151
81266
|
t("common:action.cancel")
|
|
81152
81267
|
] }),
|
|
81153
81268
|
/* @__PURE__ */ jsxs235(Button, { type: "submit", size: "sm", disabled: busy || !draft.text.trim(), children: [
|
|
81154
|
-
busy ? /* @__PURE__ */ jsx246(
|
|
81269
|
+
busy ? /* @__PURE__ */ jsx246(Loader243, { className: "size-3.5 animate-spin" }) : mode === "create" ? /* @__PURE__ */ jsx246(Plus23, { className: "size-3.5" }) : /* @__PURE__ */ jsx246(Save5, { className: "size-3.5" }),
|
|
81155
81270
|
busy ? t("common:action.saving") : mode === "create" ? t("activity:memoryManager.createMemory") : t("activity:memoryManager.saveChanges")
|
|
81156
81271
|
] })
|
|
81157
81272
|
] })
|
|
@@ -82279,8 +82394,8 @@ var init_MemoryManagerStatsBar = __esm({
|
|
|
82279
82394
|
});
|
|
82280
82395
|
|
|
82281
82396
|
// src/components/MemoryManager/ReviewQueue.tsx
|
|
82282
|
-
import { AlertTriangle as AlertTriangle33, Check as Check39, Loader2 as
|
|
82283
|
-
import { useCallback as
|
|
82397
|
+
import { AlertTriangle as AlertTriangle33, Check as Check39, Loader2 as Loader244, RefreshCw as RefreshCw28, X as X51 } from "lucide-react";
|
|
82398
|
+
import { useCallback as useCallback72, useEffect as useEffect124, useRef as useRef67, useState as useState140 } from "react";
|
|
82284
82399
|
import { Fragment as Fragment68, jsx as jsx253, jsxs as jsxs242 } from "react/jsx-runtime";
|
|
82285
82400
|
function ReviewQueue({
|
|
82286
82401
|
listCandidates,
|
|
@@ -82297,7 +82412,7 @@ function ReviewQueue({
|
|
|
82297
82412
|
const [bulkBusy, setBulkBusy] = useState140(false);
|
|
82298
82413
|
const [selected, setSelected] = useState140(() => /* @__PURE__ */ new Set());
|
|
82299
82414
|
const generationRef = useRef67(0);
|
|
82300
|
-
const load =
|
|
82415
|
+
const load = useCallback72(() => {
|
|
82301
82416
|
const generation = ++generationRef.current;
|
|
82302
82417
|
setLoading(true);
|
|
82303
82418
|
setError(null);
|
|
@@ -82337,7 +82452,7 @@ function ReviewQueue({
|
|
|
82337
82452
|
if (!active) return;
|
|
82338
82453
|
return load();
|
|
82339
82454
|
}, [active, load]);
|
|
82340
|
-
const resolveOne =
|
|
82455
|
+
const resolveOne = useCallback72(
|
|
82341
82456
|
(candidateId, action) => new Promise((resolve) => {
|
|
82342
82457
|
const off = client2.on("memory.sage.candidateResolve", (message) => {
|
|
82343
82458
|
off();
|
|
@@ -82359,7 +82474,7 @@ function ReviewQueue({
|
|
|
82359
82474
|
}),
|
|
82360
82475
|
[client2, resolveCandidate]
|
|
82361
82476
|
);
|
|
82362
|
-
const act =
|
|
82477
|
+
const act = useCallback72(
|
|
82363
82478
|
async (candidateId, action) => {
|
|
82364
82479
|
setBusyId(candidateId);
|
|
82365
82480
|
await resolveOne(candidateId, action);
|
|
@@ -82368,7 +82483,7 @@ function ReviewQueue({
|
|
|
82368
82483
|
},
|
|
82369
82484
|
[load, resolveOne]
|
|
82370
82485
|
);
|
|
82371
|
-
const bulkAct =
|
|
82486
|
+
const bulkAct = useCallback72(
|
|
82372
82487
|
async (action) => {
|
|
82373
82488
|
const ids = [...selected];
|
|
82374
82489
|
if (ids.length === 0) return;
|
|
@@ -82396,7 +82511,7 @@ function ReviewQueue({
|
|
|
82396
82511
|
const clearSelection = () => setSelected(/* @__PURE__ */ new Set());
|
|
82397
82512
|
if (loading && candidates.length === 0) {
|
|
82398
82513
|
return /* @__PURE__ */ jsxs242("div", { className: "flex flex-1 items-center justify-center gap-2 p-6 text-sm text-muted-foreground", children: [
|
|
82399
|
-
/* @__PURE__ */ jsx253(
|
|
82514
|
+
/* @__PURE__ */ jsx253(Loader244, { className: "size-4 animate-spin" }),
|
|
82400
82515
|
t("activity:memoryManager.reviewLoading")
|
|
82401
82516
|
] });
|
|
82402
82517
|
}
|
|
@@ -82447,7 +82562,7 @@ function ReviewQueue({
|
|
|
82447
82562
|
disabled: selectedCount === 0 || bulkBusy,
|
|
82448
82563
|
onClick: () => void bulkAct("accept"),
|
|
82449
82564
|
children: [
|
|
82450
|
-
bulkBusy ? /* @__PURE__ */ jsx253(
|
|
82565
|
+
bulkBusy ? /* @__PURE__ */ jsx253(Loader244, { className: "size-3 animate-spin" }) : /* @__PURE__ */ jsx253(Check39, { className: "size-3" }),
|
|
82451
82566
|
t("activity:memoryManager.reviewBulkAccept"),
|
|
82452
82567
|
selectedCount > 0 ? ` (${selectedCount})` : ""
|
|
82453
82568
|
]
|
|
@@ -82528,7 +82643,7 @@ function ReviewQueue({
|
|
|
82528
82643
|
disabled: busy,
|
|
82529
82644
|
onClick: () => void act(c.id, "accept"),
|
|
82530
82645
|
children: [
|
|
82531
|
-
busyId === c.id ? /* @__PURE__ */ jsx253(
|
|
82646
|
+
busyId === c.id ? /* @__PURE__ */ jsx253(Loader244, { className: "size-3 animate-spin" }) : /* @__PURE__ */ jsx253(Check39, { className: "size-3" }),
|
|
82532
82647
|
t("activity:memoryManager.actionAcceptDeletion")
|
|
82533
82648
|
]
|
|
82534
82649
|
}
|
|
@@ -82617,7 +82732,7 @@ var init_selectors = __esm({
|
|
|
82617
82732
|
});
|
|
82618
82733
|
|
|
82619
82734
|
// src/components/MemoryManager/useMemoryManagerState.ts
|
|
82620
|
-
import { useCallback as
|
|
82735
|
+
import { useCallback as useCallback73, useEffect as useEffect125, useMemo as useMemo74, useRef as useRef68, useState as useState141 } from "react";
|
|
82621
82736
|
function useMemoryManagerState() {
|
|
82622
82737
|
const { t } = useTranslation();
|
|
82623
82738
|
const {
|
|
@@ -82693,7 +82808,7 @@ function useMemoryManagerState() {
|
|
|
82693
82808
|
() => memories.find((memory) => memory.id === selectedId) ?? null,
|
|
82694
82809
|
[memories, selectedId]
|
|
82695
82810
|
);
|
|
82696
|
-
const loadPage =
|
|
82811
|
+
const loadPage = useCallback73(
|
|
82697
82812
|
(cursor) => {
|
|
82698
82813
|
const isAppend = cursor !== null;
|
|
82699
82814
|
const generation = ++listGenerationRef.current;
|
|
@@ -82777,12 +82892,12 @@ function useMemoryManagerState() {
|
|
|
82777
82892
|
},
|
|
82778
82893
|
[client2, kindFilter, listSageMemoriesPage, searchQuery, showDeleted]
|
|
82779
82894
|
);
|
|
82780
|
-
const loadMemories =
|
|
82895
|
+
const loadMemories = useCallback73(() => {
|
|
82781
82896
|
setPageCursor(null);
|
|
82782
82897
|
setHasMore(false);
|
|
82783
82898
|
loadPage(null);
|
|
82784
82899
|
}, [loadPage]);
|
|
82785
|
-
const loadMore =
|
|
82900
|
+
const loadMore = useCallback73(() => {
|
|
82786
82901
|
if (loadingMore || !pageCursor) return;
|
|
82787
82902
|
loadPage(pageCursor);
|
|
82788
82903
|
}, [loadPage, loadingMore, pageCursor]);
|
|
@@ -82882,11 +82997,11 @@ function useMemoryManagerState() {
|
|
|
82882
82997
|
const timer = setTimeout(() => setNotice(null), 4e3);
|
|
82883
82998
|
return () => clearTimeout(timer);
|
|
82884
82999
|
}, [notice]);
|
|
82885
|
-
const confirmDiscard =
|
|
83000
|
+
const confirmDiscard = useCallback73(() => {
|
|
82886
83001
|
if (!dirty || !editing && !creating) return true;
|
|
82887
83002
|
return window.confirm("Discard the unsaved memory changes?");
|
|
82888
83003
|
}, [creating, dirty, editing]);
|
|
82889
|
-
const openCreate =
|
|
83004
|
+
const openCreate = useCallback73(() => {
|
|
82890
83005
|
if (!confirmDiscard()) return;
|
|
82891
83006
|
const next = emptyDraft2();
|
|
82892
83007
|
setDraft(next);
|
|
@@ -82896,7 +83011,7 @@ function useMemoryManagerState() {
|
|
|
82896
83011
|
setSelectedId(null);
|
|
82897
83012
|
setMutationError(null);
|
|
82898
83013
|
}, [confirmDiscard]);
|
|
82899
|
-
const openMemory =
|
|
83014
|
+
const openMemory = useCallback73(
|
|
82900
83015
|
(id) => {
|
|
82901
83016
|
if (!confirmDiscard()) return;
|
|
82902
83017
|
setSelectedId(id);
|
|
@@ -82906,7 +83021,7 @@ function useMemoryManagerState() {
|
|
|
82906
83021
|
},
|
|
82907
83022
|
[confirmDiscard]
|
|
82908
83023
|
);
|
|
82909
|
-
const openEdit =
|
|
83024
|
+
const openEdit = useCallback73(
|
|
82910
83025
|
(id) => {
|
|
82911
83026
|
const target = id !== void 0 ? memories.find((memory) => memory.id === id) ?? null : selectedMemory;
|
|
82912
83027
|
if (!target || target.status === "deleted") return;
|
|
@@ -82920,13 +83035,13 @@ function useMemoryManagerState() {
|
|
|
82920
83035
|
},
|
|
82921
83036
|
[memories, selectedMemory]
|
|
82922
83037
|
);
|
|
82923
|
-
const cancelEditor =
|
|
83038
|
+
const cancelEditor = useCallback73(() => {
|
|
82924
83039
|
if (!confirmDiscard()) return;
|
|
82925
83040
|
setEditing(false);
|
|
82926
83041
|
setCreating(false);
|
|
82927
83042
|
setMutationError(null);
|
|
82928
83043
|
}, [confirmDiscard]);
|
|
82929
|
-
const runMutation =
|
|
83044
|
+
const runMutation = useCallback73(
|
|
82930
83045
|
(type, send, action) => {
|
|
82931
83046
|
if (!draft.text.trim()) {
|
|
82932
83047
|
setMutationError("Memory content is required.");
|
|
@@ -82992,7 +83107,7 @@ function useMemoryManagerState() {
|
|
|
82992
83107
|
},
|
|
82993
83108
|
[client2, draft.text, loadMemories, t]
|
|
82994
83109
|
);
|
|
82995
|
-
const submitCreate =
|
|
83110
|
+
const submitCreate = useCallback73(() => {
|
|
82996
83111
|
runMutation(
|
|
82997
83112
|
"memory.sage.remember",
|
|
82998
83113
|
() => rememberSage(
|
|
@@ -83020,7 +83135,7 @@ function useMemoryManagerState() {
|
|
|
83020
83135
|
"create"
|
|
83021
83136
|
);
|
|
83022
83137
|
}, [draft, rememberSage, runMutation]);
|
|
83023
|
-
const submitUpdate =
|
|
83138
|
+
const submitUpdate = useCallback73(() => {
|
|
83024
83139
|
if (!selectedMemory) return;
|
|
83025
83140
|
runMutation(
|
|
83026
83141
|
"memory.sage.update",
|
|
@@ -83050,7 +83165,7 @@ function useMemoryManagerState() {
|
|
|
83050
83165
|
"update"
|
|
83051
83166
|
);
|
|
83052
83167
|
}, [draft, runMutation, selectedMemory, updateSage]);
|
|
83053
|
-
const confirmDelete =
|
|
83168
|
+
const confirmDelete = useCallback73(() => {
|
|
83054
83169
|
if (!deletingId) return;
|
|
83055
83170
|
const generation = ++mutationGenerationRef.current;
|
|
83056
83171
|
mutationCleanupRef.current?.();
|
|
@@ -83093,7 +83208,7 @@ function useMemoryManagerState() {
|
|
|
83093
83208
|
mutationCleanupRef.current = cleanup;
|
|
83094
83209
|
deleteSage(deletingId, "Deleted from the WebUI Memory Manager.");
|
|
83095
83210
|
}, [client2, deleteSage, deletingId, loadMemories]);
|
|
83096
|
-
const sendWithAck =
|
|
83211
|
+
const sendWithAck = useCallback73(
|
|
83097
83212
|
(type, send, onResponse) => {
|
|
83098
83213
|
const generation = ++mutationGenerationRef.current;
|
|
83099
83214
|
mutationCleanupRef.current?.();
|
|
@@ -83141,7 +83256,7 @@ function useMemoryManagerState() {
|
|
|
83141
83256
|
);
|
|
83142
83257
|
const allTags = useMemo74(() => collectMemoryTags(memories), [memories]);
|
|
83143
83258
|
const relatedMemories = useMemo74(() => selectRelatedMemories(selectedMemory), [selectedMemory]);
|
|
83144
|
-
const clearFilters =
|
|
83259
|
+
const clearFilters = useCallback73(() => {
|
|
83145
83260
|
setSearchQuery("");
|
|
83146
83261
|
setStatusFilter("all");
|
|
83147
83262
|
setKindFilter("all");
|
|
@@ -83703,7 +83818,7 @@ var init_model2 = __esm({
|
|
|
83703
83818
|
});
|
|
83704
83819
|
|
|
83705
83820
|
// src/components/vector-memory-panel/ForgetVectorMemoryDialog.tsx
|
|
83706
|
-
import { Loader2 as
|
|
83821
|
+
import { Loader2 as Loader245, Trash2 as Trash223 } from "lucide-react";
|
|
83707
83822
|
import { jsx as jsx255, jsxs as jsxs244 } from "react/jsx-runtime";
|
|
83708
83823
|
function ForgetVectorMemoryDialog({
|
|
83709
83824
|
hit,
|
|
@@ -83724,7 +83839,7 @@ function ForgetVectorMemoryDialog({
|
|
|
83724
83839
|
/* @__PURE__ */ jsxs244(DialogFooter, { children: [
|
|
83725
83840
|
/* @__PURE__ */ jsx255(Button, { variant: "outline", onClick: onCancel, disabled: busy, children: "Cancel" }),
|
|
83726
83841
|
/* @__PURE__ */ jsxs244(Button, { variant: "destructive", onClick: onConfirm, disabled: busy, children: [
|
|
83727
|
-
busy ? /* @__PURE__ */ jsx255(
|
|
83842
|
+
busy ? /* @__PURE__ */ jsx255(Loader245, { className: "size-4 animate-spin" }) : /* @__PURE__ */ jsx255(Trash223, { className: "size-4" }),
|
|
83728
83843
|
busy ? "Forgetting\u2026" : "Forget memory"
|
|
83729
83844
|
] })
|
|
83730
83845
|
] })
|
|
@@ -84211,7 +84326,7 @@ var RequirementIntakeView_exports = {};
|
|
|
84211
84326
|
__export(RequirementIntakeView_exports, {
|
|
84212
84327
|
RequirementIntakeView: () => RequirementIntakeView
|
|
84213
84328
|
});
|
|
84214
|
-
import { useCallback as
|
|
84329
|
+
import { useCallback as useCallback74, useEffect as useEffect128, useState as useState144 } from "react";
|
|
84215
84330
|
import { jsx as jsx258, jsxs as jsxs247 } from "react/jsx-runtime";
|
|
84216
84331
|
function relativeTime3(timestamp2) {
|
|
84217
84332
|
const elapsedMs2 = Date.now() - timestamp2;
|
|
@@ -84236,7 +84351,7 @@ function RequirementIntakeView() {
|
|
|
84236
84351
|
const [submitting, setSubmitting] = useState144(false);
|
|
84237
84352
|
const [formError, setFormError] = useState144(null);
|
|
84238
84353
|
const [formNotice, setFormNotice] = useState144(null);
|
|
84239
|
-
const load =
|
|
84354
|
+
const load = useCallback74(async () => {
|
|
84240
84355
|
setLoading(true);
|
|
84241
84356
|
setError(null);
|
|
84242
84357
|
try {
|
|
@@ -84257,7 +84372,7 @@ function RequirementIntakeView() {
|
|
|
84257
84372
|
useEffect128(() => {
|
|
84258
84373
|
void load();
|
|
84259
84374
|
}, [load]);
|
|
84260
|
-
const submit =
|
|
84375
|
+
const submit = useCallback74(async () => {
|
|
84261
84376
|
const text4 = request.trim();
|
|
84262
84377
|
if (!text4) {
|
|
84263
84378
|
setFormError("Describe the request first \u2014 it is preserved verbatim.");
|
|
@@ -84596,7 +84711,7 @@ var init_SddActivityFeed = __esm({
|
|
|
84596
84711
|
});
|
|
84597
84712
|
|
|
84598
84713
|
// src/components/SddDestroyDialog.tsx
|
|
84599
|
-
import { AlertTriangle as AlertTriangle35, Loader2 as
|
|
84714
|
+
import { AlertTriangle as AlertTriangle35, Loader2 as Loader246, Trash2 as Trash224 } from "lucide-react";
|
|
84600
84715
|
import { useEffect as useEffect129, useMemo as useMemo76, useState as useState145 } from "react";
|
|
84601
84716
|
import { Fragment as Fragment71, jsx as jsx260, jsxs as jsxs249 } from "react/jsx-runtime";
|
|
84602
84717
|
function SddDestroyDialog({
|
|
@@ -84679,7 +84794,7 @@ function SddDestroyDialog({
|
|
|
84679
84794
|
onClick: () => onConfirm(revertMerged),
|
|
84680
84795
|
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
84681
84796
|
children: busy ? /* @__PURE__ */ jsxs249(Fragment71, { children: [
|
|
84682
|
-
/* @__PURE__ */ jsx260(
|
|
84797
|
+
/* @__PURE__ */ jsx260(Loader246, { className: "mr-1 h-3.5 w-3.5 animate-spin" }),
|
|
84683
84798
|
" ",
|
|
84684
84799
|
t("activity:sdd.destroying")
|
|
84685
84800
|
] }) : /* @__PURE__ */ jsxs249(Fragment71, { children: [
|
|
@@ -84702,7 +84817,7 @@ var init_SddDestroyDialog = __esm({
|
|
|
84702
84817
|
});
|
|
84703
84818
|
|
|
84704
84819
|
// src/components/SddKanbanView.tsx
|
|
84705
|
-
import { Check as Check41, GitBranch as GitBranch16, Loader2 as
|
|
84820
|
+
import { Check as Check41, GitBranch as GitBranch16, Loader2 as Loader247, RotateCcw as RotateCcw15, X as X52 } from "lucide-react";
|
|
84706
84821
|
import { useMemo as useMemo77 } from "react";
|
|
84707
84822
|
import { jsx as jsx261, jsxs as jsxs250 } from "react/jsx-runtime";
|
|
84708
84823
|
function SddKanbanView({
|
|
@@ -84762,7 +84877,7 @@ function KanbanCard({
|
|
|
84762
84877
|
),
|
|
84763
84878
|
children: [
|
|
84764
84879
|
/* @__PURE__ */ jsxs250("div", { className: "flex items-center gap-1.5", children: [
|
|
84765
|
-
running && /* @__PURE__ */ jsx261(
|
|
84880
|
+
running && /* @__PURE__ */ jsx261(Loader247, { className: "h-3 w-3 animate-spin text-warning" }),
|
|
84766
84881
|
task.displayStatus === "completed" && /* @__PURE__ */ jsx261(Check41, { className: "h-3 w-3 text-success" }),
|
|
84767
84882
|
task.displayStatus === "failed" && /* @__PURE__ */ jsx261(X52, { className: "h-3 w-3 text-destructive" }),
|
|
84768
84883
|
/* @__PURE__ */ jsx261("span", { className: "font-mono text-[10px] text-muted-foreground", children: task.shortId }),
|
|
@@ -85485,7 +85600,7 @@ import {
|
|
|
85485
85600
|
XCircle as XCircle12,
|
|
85486
85601
|
Zap as Zap28
|
|
85487
85602
|
} from "lucide-react";
|
|
85488
|
-
import { useCallback as
|
|
85603
|
+
import { useCallback as useCallback75, useEffect as useEffect130, useMemo as useMemo79, useRef as useRef70, useState as useState147 } from "react";
|
|
85489
85604
|
import { Fragment as Fragment72, jsx as jsx263, jsxs as jsxs252 } from "react/jsx-runtime";
|
|
85490
85605
|
function SddBoardView({ onClose }) {
|
|
85491
85606
|
const { t } = useTranslation();
|
|
@@ -85510,19 +85625,19 @@ function SddBoardView({ onClose }) {
|
|
|
85510
85625
|
setNow(Date.now());
|
|
85511
85626
|
return () => clearInterval(id);
|
|
85512
85627
|
}, [active]);
|
|
85513
|
-
const send =
|
|
85628
|
+
const send = useCallback75(
|
|
85514
85629
|
(msg) => client2?.send?.(msg),
|
|
85515
85630
|
[client2]
|
|
85516
85631
|
);
|
|
85517
85632
|
const pendingDestroy = useRef70(null);
|
|
85518
|
-
const fireDestroy =
|
|
85633
|
+
const fireDestroy = useCallback75(
|
|
85519
85634
|
(revertMerged) => {
|
|
85520
85635
|
pendingDestroy.current = null;
|
|
85521
85636
|
send({ type: "sdd.board.destroy", payload: { revertMerged } });
|
|
85522
85637
|
},
|
|
85523
85638
|
[send]
|
|
85524
85639
|
);
|
|
85525
|
-
const handleConfirmDestroy =
|
|
85640
|
+
const handleConfirmDestroy = useCallback75(
|
|
85526
85641
|
(revertMerged) => {
|
|
85527
85642
|
setDestroyOpen(false);
|
|
85528
85643
|
setLifecycleResult(null);
|
|
@@ -85552,11 +85667,11 @@ function SddBoardView({ onClose }) {
|
|
|
85552
85667
|
);
|
|
85553
85668
|
return () => clearTimeout(timer);
|
|
85554
85669
|
}, [active, snapshot, fireDestroy]);
|
|
85555
|
-
const onCleanWorktrees =
|
|
85670
|
+
const onCleanWorktrees = useCallback75(() => {
|
|
85556
85671
|
setLifecycleResult(null);
|
|
85557
85672
|
send({ type: "sdd.board.cleanup_worktrees", payload: {} });
|
|
85558
85673
|
}, [send, setLifecycleResult]);
|
|
85559
|
-
const onRollback =
|
|
85674
|
+
const onRollback = useCallback75(() => {
|
|
85560
85675
|
setLifecycleResult(null);
|
|
85561
85676
|
send({ type: "sdd.board.rollback", payload: {} });
|
|
85562
85677
|
}, [send, setLifecycleResult]);
|
|
@@ -85582,39 +85697,39 @@ function SddBoardView({ onClose }) {
|
|
|
85582
85697
|
}
|
|
85583
85698
|
return [...m.values()];
|
|
85584
85699
|
}, [snapshot?.tasks]);
|
|
85585
|
-
const onTaskClick =
|
|
85586
|
-
const closeTaskDetail =
|
|
85700
|
+
const onTaskClick = useCallback75((taskId) => setSelectedTaskId(taskId), []);
|
|
85701
|
+
const closeTaskDetail = useCallback75(() => {
|
|
85587
85702
|
setSelectedTaskId(null);
|
|
85588
85703
|
setTaskDetailExpanded(false);
|
|
85589
85704
|
}, []);
|
|
85590
|
-
const onRetry =
|
|
85705
|
+
const onRetry = useCallback75(
|
|
85591
85706
|
(taskId) => send({ type: "sdd.board.retry", payload: { taskId } }),
|
|
85592
85707
|
[send]
|
|
85593
85708
|
);
|
|
85594
|
-
const onRetryAllFailed =
|
|
85709
|
+
const onRetryAllFailed = useCallback75(
|
|
85595
85710
|
() => send({ type: "sdd.board.retry_all_failed", payload: {} }),
|
|
85596
85711
|
[send]
|
|
85597
85712
|
);
|
|
85598
|
-
const onReassign =
|
|
85713
|
+
const onReassign = useCallback75(
|
|
85599
85714
|
(taskId, agentName) => {
|
|
85600
85715
|
const name = agentName.trim();
|
|
85601
85716
|
if (name) send({ type: "sdd.board.reassign", payload: { taskId, agentName: name } });
|
|
85602
85717
|
},
|
|
85603
85718
|
[send]
|
|
85604
85719
|
);
|
|
85605
|
-
const onSetModel =
|
|
85720
|
+
const onSetModel = useCallback75(
|
|
85606
85721
|
(taskId, model, provider) => send({ type: "sdd.board.set_task_model", payload: { taskId, model, provider } }),
|
|
85607
85722
|
[send]
|
|
85608
85723
|
);
|
|
85609
|
-
const onSetVerification =
|
|
85724
|
+
const onSetVerification = useCallback75(
|
|
85610
85725
|
(taskId, verificationCommand) => send({ type: "sdd.board.set_task_verification", payload: { taskId, verificationCommand } }),
|
|
85611
85726
|
[send]
|
|
85612
85727
|
);
|
|
85613
|
-
const onCancel =
|
|
85728
|
+
const onCancel = useCallback75(
|
|
85614
85729
|
(taskId) => send({ type: "sdd.board.cancel_task", payload: { taskId } }),
|
|
85615
85730
|
[send]
|
|
85616
85731
|
);
|
|
85617
|
-
const onDelete =
|
|
85732
|
+
const onDelete = useCallback75(
|
|
85618
85733
|
(taskId) => {
|
|
85619
85734
|
send({ type: "sdd.board.delete_task", payload: { taskId } });
|
|
85620
85735
|
setSelectedTaskId(null);
|
|
@@ -85622,7 +85737,7 @@ function SddBoardView({ onClose }) {
|
|
|
85622
85737
|
},
|
|
85623
85738
|
[send]
|
|
85624
85739
|
);
|
|
85625
|
-
const onSplit =
|
|
85740
|
+
const onSplit = useCallback75(
|
|
85626
85741
|
(taskId, subtasks) => {
|
|
85627
85742
|
send({ type: "sdd.board.split_task", payload: { taskId, subtasks } });
|
|
85628
85743
|
setSelectedTaskId(null);
|
|
@@ -86045,7 +86160,7 @@ import {
|
|
|
86045
86160
|
ChevronRight as ChevronRight26,
|
|
86046
86161
|
Copy as Copy12,
|
|
86047
86162
|
Lightbulb as Lightbulb3,
|
|
86048
|
-
Loader2 as
|
|
86163
|
+
Loader2 as Loader248,
|
|
86049
86164
|
Network as Network10,
|
|
86050
86165
|
Rocket as Rocket6,
|
|
86051
86166
|
RotateCcw as RotateCcw18,
|
|
@@ -86057,7 +86172,7 @@ import {
|
|
|
86057
86172
|
X as X55,
|
|
86058
86173
|
Zap as Zap29
|
|
86059
86174
|
} from "lucide-react";
|
|
86060
|
-
import { useCallback as
|
|
86175
|
+
import { useCallback as useCallback76, useEffect as useEffect131, useMemo as useMemo80, useRef as useRef71, useState as useState148 } from "react";
|
|
86061
86176
|
import { Fragment as Fragment73, jsx as jsx264, jsxs as jsxs253 } from "react/jsx-runtime";
|
|
86062
86177
|
function SddWizard({
|
|
86063
86178
|
onClose,
|
|
@@ -86083,7 +86198,7 @@ function SddWizard({
|
|
|
86083
86198
|
const [runWorktrees, setRunWorktrees] = useState148(true);
|
|
86084
86199
|
const [runPlanDecompose, setRunPlanDecompose] = useState148(false);
|
|
86085
86200
|
const modelCandidates = useProviderModels(runCfgOpen);
|
|
86086
|
-
const send =
|
|
86201
|
+
const send = useCallback76(
|
|
86087
86202
|
(msg) => client2?.send?.(msg),
|
|
86088
86203
|
[client2]
|
|
86089
86204
|
);
|
|
@@ -86180,7 +86295,7 @@ function SddWizard({
|
|
|
86180
86295
|
snapshot && snapshot.taskCount > 0 ? ` \xB7 ${t("activity:sddWizard.tasksSuffix", { count: snapshot.taskCount })}` : ""
|
|
86181
86296
|
] })
|
|
86182
86297
|
] }),
|
|
86183
|
-
busy && /* @__PURE__ */ jsx264(
|
|
86298
|
+
busy && /* @__PURE__ */ jsx264(Loader248, { className: "h-4 w-4 animate-spin text-muted-foreground" })
|
|
86184
86299
|
] }),
|
|
86185
86300
|
/* @__PURE__ */ jsxs253("div", { className: "flex items-center gap-2", children: [
|
|
86186
86301
|
priorRunId && /* @__PURE__ */ jsxs253(
|
|
@@ -86371,7 +86486,7 @@ function SddWizard({
|
|
|
86371
86486
|
}
|
|
86372
86487
|
),
|
|
86373
86488
|
/* @__PURE__ */ jsx264(Button, { className: "mt-3", onClick: startGoal, disabled: !goal.trim() || submitting, children: submitting ? /* @__PURE__ */ jsxs253(Fragment73, { children: [
|
|
86374
|
-
/* @__PURE__ */ jsx264(
|
|
86489
|
+
/* @__PURE__ */ jsx264(Loader248, { className: "mr-1.5 h-4 w-4 animate-spin" }),
|
|
86375
86490
|
" ",
|
|
86376
86491
|
t("activity:sddWizard.startingInterview")
|
|
86377
86492
|
] }) : /* @__PURE__ */ jsxs253(Fragment73, { children: [
|
|
@@ -86739,7 +86854,7 @@ import {
|
|
|
86739
86854
|
ChevronRight as ChevronRight27,
|
|
86740
86855
|
Circle as Circle11,
|
|
86741
86856
|
Clock as Clock21,
|
|
86742
|
-
Loader2 as
|
|
86857
|
+
Loader2 as Loader249,
|
|
86743
86858
|
Lock as Lock4,
|
|
86744
86859
|
RotateCcw as RotateCcw19,
|
|
86745
86860
|
XCircle as XCircle13
|
|
@@ -86803,7 +86918,7 @@ function TaskNodeCard({
|
|
|
86803
86918
|
),
|
|
86804
86919
|
title: task.worktreeBranch ? t("activity:board.worktreePrefix", { branch: task.worktreeBranch }) : void 0,
|
|
86805
86920
|
children: [
|
|
86806
|
-
task.displayStatus === "in_progress" && /* @__PURE__ */ jsx265(
|
|
86921
|
+
task.displayStatus === "in_progress" && /* @__PURE__ */ jsx265(Loader249, { className: "h-3 w-3 animate-spin" }),
|
|
86807
86922
|
/* @__PURE__ */ jsx265("span", { children: task.agentName })
|
|
86808
86923
|
]
|
|
86809
86924
|
}
|
|
@@ -86820,7 +86935,7 @@ var init_DependencyGraph = __esm({
|
|
|
86820
86935
|
init_i18n();
|
|
86821
86936
|
STATUS2 = {
|
|
86822
86937
|
completed: { icon: /* @__PURE__ */ jsx265(CheckCircle232, { className: "h-3.5 w-3.5" }), text: "text-success", ring: "border-success/35" },
|
|
86823
|
-
in_progress: { icon: /* @__PURE__ */ jsx265(
|
|
86938
|
+
in_progress: { icon: /* @__PURE__ */ jsx265(Loader249, { className: "h-3.5 w-3.5 animate-spin" }), text: "text-primary", ring: "border-primary/45" },
|
|
86824
86939
|
queued: { icon: /* @__PURE__ */ jsx265(Clock21, { className: "h-3.5 w-3.5" }), text: "text-warning", ring: "border-warning/35" },
|
|
86825
86940
|
blocked: { icon: /* @__PURE__ */ jsx265(Lock4, { className: "h-3.5 w-3.5" }), text: "text-destructive", ring: "border-destructive/30" },
|
|
86826
86941
|
pending: { icon: /* @__PURE__ */ jsx265(Circle11, { className: "h-3.5 w-3.5" }), text: "text-muted-foreground", ring: "border-border/70" },
|
|
@@ -86843,7 +86958,7 @@ var SpecsView_exports = {};
|
|
|
86843
86958
|
__export(SpecsView_exports, {
|
|
86844
86959
|
SpecsView: () => SpecsView
|
|
86845
86960
|
});
|
|
86846
|
-
import { useCallback as
|
|
86961
|
+
import { useCallback as useCallback77, useEffect as useEffect132, useState as useState149 } from "react";
|
|
86847
86962
|
import { ChevronDown as ChevronDown39, ChevronRight as ChevronRight28, FileText as FileText21, LayoutList, Network as Network11, Play as Play10, X as X56 } from "lucide-react";
|
|
86848
86963
|
import { jsx as jsx266, jsxs as jsxs255 } from "react/jsx-runtime";
|
|
86849
86964
|
function detailToPhases(detail) {
|
|
@@ -86873,7 +86988,7 @@ function SpecsView({
|
|
|
86873
86988
|
const expandedSpecId = useSpecsStore((s) => s.expandedSpecId);
|
|
86874
86989
|
const setExpanded = useSpecsStore((s) => s.setExpanded);
|
|
86875
86990
|
const [mode, setMode] = useState149("graph");
|
|
86876
|
-
const runSpecAsGoal =
|
|
86991
|
+
const runSpecAsGoal = useCallback77(
|
|
86877
86992
|
(spec) => {
|
|
86878
86993
|
if (!detail || detail.specId !== spec.id) return;
|
|
86879
86994
|
client2?.send?.({
|
|
@@ -86884,7 +86999,7 @@ function SpecsView({
|
|
|
86884
86999
|
},
|
|
86885
87000
|
[detail, client2]
|
|
86886
87001
|
);
|
|
86887
|
-
const runSpecAsSdd =
|
|
87002
|
+
const runSpecAsSdd = useCallback77(
|
|
86888
87003
|
(spec) => {
|
|
86889
87004
|
const graphId = spec.graphId ?? (detail?.specId === spec.id ? detail.graphId : void 0);
|
|
86890
87005
|
if (graphId) {
|
|
@@ -86906,7 +87021,7 @@ function SpecsView({
|
|
|
86906
87021
|
useEffect132(() => {
|
|
86907
87022
|
client2?.send?.({ type: "specs.list" });
|
|
86908
87023
|
}, [client2]);
|
|
86909
|
-
const toggle =
|
|
87024
|
+
const toggle = useCallback77(
|
|
86910
87025
|
(spec) => {
|
|
86911
87026
|
if (expandedSpecId === spec.id) {
|
|
86912
87027
|
setExpanded(null);
|
|
@@ -87084,7 +87199,7 @@ var SddHub_exports = {};
|
|
|
87084
87199
|
__export(SddHub_exports, {
|
|
87085
87200
|
SddHub: () => SddHub
|
|
87086
87201
|
});
|
|
87087
|
-
import { useCallback as
|
|
87202
|
+
import { useCallback as useCallback78, useEffect as useEffect133, useState as useState150 } from "react";
|
|
87088
87203
|
import { jsx as jsx267, jsxs as jsxs256 } from "react/jsx-runtime";
|
|
87089
87204
|
function SddHub() {
|
|
87090
87205
|
const { t } = useTranslation();
|
|
@@ -87092,7 +87207,7 @@ function SddHub() {
|
|
|
87092
87207
|
const startedRunId = useSddWizardStore((s) => s.startedRunId);
|
|
87093
87208
|
const setStartedRunId = useSddWizardStore((s) => s.setStartedRunId);
|
|
87094
87209
|
const onClose = () => showPanel("chat");
|
|
87095
|
-
const showBoard =
|
|
87210
|
+
const showBoard = useCallback78(() => setActiveTab("board"), []);
|
|
87096
87211
|
useEffect133(() => {
|
|
87097
87212
|
if (!startedRunId) return;
|
|
87098
87213
|
setActiveTab("board");
|
|
@@ -87210,7 +87325,7 @@ import {
|
|
|
87210
87325
|
Clock3 as Clock39,
|
|
87211
87326
|
FileCode2 as FileCode26,
|
|
87212
87327
|
History as History9,
|
|
87213
|
-
Loader2 as
|
|
87328
|
+
Loader2 as Loader250,
|
|
87214
87329
|
Pencil as Pencil7,
|
|
87215
87330
|
Play as Play11,
|
|
87216
87331
|
RefreshCw as RefreshCw30,
|
|
@@ -87221,7 +87336,7 @@ import {
|
|
|
87221
87336
|
Wrench as Wrench18,
|
|
87222
87337
|
X as X57
|
|
87223
87338
|
} from "lucide-react";
|
|
87224
|
-
import { useCallback as
|
|
87339
|
+
import { useCallback as useCallback79, useEffect as useEffect134, useMemo as useMemo81, useRef as useRef72, useState as useState151 } from "react";
|
|
87225
87340
|
import { jsx as jsx268, jsxs as jsxs257 } from "react/jsx-runtime";
|
|
87226
87341
|
function formatSessionDuration(entry) {
|
|
87227
87342
|
const start = timestamp(entry.startedAt);
|
|
@@ -87448,18 +87563,18 @@ function SessionList({
|
|
|
87448
87563
|
const resumeTimer = useRef72(null);
|
|
87449
87564
|
const renameInput = useRef72(null);
|
|
87450
87565
|
const workspace = variant === "workspace";
|
|
87451
|
-
const displayName2 =
|
|
87566
|
+
const displayName2 = useCallback79(
|
|
87452
87567
|
(entry) => entry.name || sessionNicknames[entry.id] || entry.title || t("activity:sessions.empty"),
|
|
87453
87568
|
[sessionNicknames, t]
|
|
87454
87569
|
);
|
|
87455
|
-
const beginRename =
|
|
87570
|
+
const beginRename = useCallback79(
|
|
87456
87571
|
(entry) => {
|
|
87457
87572
|
setRenamingId(entry.id);
|
|
87458
87573
|
setRenameDraft(entry.name ?? sessionNicknames[entry.id] ?? entry.title ?? "");
|
|
87459
87574
|
},
|
|
87460
87575
|
[sessionNicknames]
|
|
87461
87576
|
);
|
|
87462
|
-
const commitRename =
|
|
87577
|
+
const commitRename = useCallback79(
|
|
87463
87578
|
(id) => {
|
|
87464
87579
|
setRenamingId(null);
|
|
87465
87580
|
setSessionNickname(id, renameDraft);
|
|
@@ -87485,7 +87600,7 @@ function SessionList({
|
|
|
87485
87600
|
[]
|
|
87486
87601
|
);
|
|
87487
87602
|
const openTabIds = useSessionTabStore((s) => s.openTabIds);
|
|
87488
|
-
const handleResume =
|
|
87603
|
+
const handleResume = useCallback79(
|
|
87489
87604
|
(id) => {
|
|
87490
87605
|
const result = useSessionTabStore.getState().openTab(id, { resumeSession });
|
|
87491
87606
|
if (!result.success || result.reason === "already_active") return;
|
|
@@ -87528,7 +87643,7 @@ function SessionList({
|
|
|
87528
87643
|
const totalPages = Math.max(1, Math.ceil(visibleEntries.length / pageSize));
|
|
87529
87644
|
if (page > totalPages) setPage(totalPages);
|
|
87530
87645
|
}, [page, pageSize, visibleEntries.length]);
|
|
87531
|
-
const handleDeleteEmpty =
|
|
87646
|
+
const handleDeleteEmpty = useCallback79(async () => {
|
|
87532
87647
|
if (emptySessionIds.length === 0) return;
|
|
87533
87648
|
const ok = await confirmModal({
|
|
87534
87649
|
title: t("activity:sessions.deleteEmptyTitle", { count: emptySessionIds.length }),
|
|
@@ -87605,7 +87720,7 @@ function SessionList({
|
|
|
87605
87720
|
onClick: () => listSessions(200),
|
|
87606
87721
|
disabled: !wsConnected,
|
|
87607
87722
|
title: t("common:action.refresh"),
|
|
87608
|
-
children: historyLoading ? /* @__PURE__ */ jsx268(
|
|
87723
|
+
children: historyLoading ? /* @__PURE__ */ jsx268(Loader250, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx268(RefreshCw30, { className: "h-3.5 w-3.5" })
|
|
87609
87724
|
}
|
|
87610
87725
|
)
|
|
87611
87726
|
] })
|
|
@@ -87815,7 +87930,7 @@ function SessionList({
|
|
|
87815
87930
|
) : null,
|
|
87816
87931
|
/* @__PURE__ */ jsxs257("div", { className: "mt-2 flex flex-wrap items-center gap-x-2 gap-y-1 font-mono text-[10px] text-muted-foreground", children: [
|
|
87817
87932
|
isResuming ? /* @__PURE__ */ jsxs257("span", { className: "inline-flex items-center gap-1 font-sans font-semibold text-primary", children: [
|
|
87818
|
-
/* @__PURE__ */ jsx268(
|
|
87933
|
+
/* @__PURE__ */ jsx268(Loader250, { className: "h-3 w-3 animate-spin" }),
|
|
87819
87934
|
t("activity:sessions.resuming")
|
|
87820
87935
|
] }) : /* @__PURE__ */ jsx268(
|
|
87821
87936
|
"span",
|
|
@@ -88010,13 +88125,13 @@ import {
|
|
|
88010
88125
|
Cpu as Cpu22,
|
|
88011
88126
|
FolderGit2,
|
|
88012
88127
|
History as HistoryIcon2,
|
|
88013
|
-
Loader2 as
|
|
88128
|
+
Loader2 as Loader251,
|
|
88014
88129
|
PauseCircle,
|
|
88015
88130
|
Radio as Radio8,
|
|
88016
88131
|
Wifi as Wifi5,
|
|
88017
88132
|
WifiOff as WifiOff3
|
|
88018
88133
|
} from "lucide-react";
|
|
88019
|
-
import { useCallback as
|
|
88134
|
+
import { useCallback as useCallback80, useEffect as useEffect135, useState as useState152 } from "react";
|
|
88020
88135
|
import { useShallow as useShallow16 } from "zustand/react/shallow";
|
|
88021
88136
|
import { jsx as jsx269, jsxs as jsxs258 } from "react/jsx-runtime";
|
|
88022
88137
|
async function sessionApiError(res) {
|
|
@@ -88207,7 +88322,7 @@ function LiveSessionsDashboard() {
|
|
|
88207
88322
|
"sessions",
|
|
88208
88323
|
!loading && !error && sessions.length > 0
|
|
88209
88324
|
);
|
|
88210
|
-
const fetchSessions =
|
|
88325
|
+
const fetchSessions = useCallback80(async () => {
|
|
88211
88326
|
try {
|
|
88212
88327
|
const res = await fetch("/api/sessions");
|
|
88213
88328
|
if (!res.ok) {
|
|
@@ -88275,7 +88390,7 @@ function LiveSessionsDashboard() {
|
|
|
88275
88390
|
}, [page, sessions.length]);
|
|
88276
88391
|
if (loading) {
|
|
88277
88392
|
return /* @__PURE__ */ jsx269("div", { className: "flex h-full min-h-0 items-center justify-center bg-[hsl(var(--surface-2)/0.45)] p-4", children: /* @__PURE__ */ jsxs258("div", { className: "ws-surface flex items-center gap-2 px-4 py-3 text-sm text-muted-foreground", children: [
|
|
88278
|
-
/* @__PURE__ */ jsx269(
|
|
88393
|
+
/* @__PURE__ */ jsx269(Loader251, { className: "h-4 w-4 animate-spin text-primary" }),
|
|
88279
88394
|
t("activity:liveSessions.loading")
|
|
88280
88395
|
] }) });
|
|
88281
88396
|
}
|
|
@@ -88476,14 +88591,14 @@ import {
|
|
|
88476
88591
|
Cpu as Cpu23,
|
|
88477
88592
|
FileCode2 as FileCode27,
|
|
88478
88593
|
History as History10,
|
|
88479
|
-
Loader2 as
|
|
88594
|
+
Loader2 as Loader252,
|
|
88480
88595
|
MessageSquareText as MessageSquareText4,
|
|
88481
88596
|
RotateCw as RotateCw6,
|
|
88482
88597
|
Search as Search26,
|
|
88483
88598
|
Wrench as Wrench19,
|
|
88484
88599
|
XCircle as XCircle14
|
|
88485
88600
|
} from "lucide-react";
|
|
88486
|
-
import { useCallback as
|
|
88601
|
+
import { useCallback as useCallback81, useEffect as useEffect136, useMemo as useMemo82, useState as useState153 } from "react";
|
|
88487
88602
|
import { jsx as jsx270, jsxs as jsxs259 } from "react/jsx-runtime";
|
|
88488
88603
|
function eventColor2(type) {
|
|
88489
88604
|
switch (type) {
|
|
@@ -88554,10 +88669,10 @@ function SessionInspectView() {
|
|
|
88554
88669
|
useEffect136(() => {
|
|
88555
88670
|
return () => clearPayload();
|
|
88556
88671
|
}, [clearPayload]);
|
|
88557
|
-
const handleBack =
|
|
88672
|
+
const handleBack = useCallback81(() => {
|
|
88558
88673
|
clearInspectSession();
|
|
88559
88674
|
}, [clearInspectSession]);
|
|
88560
|
-
const handleRefresh =
|
|
88675
|
+
const handleRefresh = useCallback81(() => {
|
|
88561
88676
|
if (!inspectSessionId) return;
|
|
88562
88677
|
useSessionInspectStore.getState().setLoading(true);
|
|
88563
88678
|
inspectSession(inspectSessionId);
|
|
@@ -88574,7 +88689,7 @@ function SessionInspectView() {
|
|
|
88574
88689
|
);
|
|
88575
88690
|
if (loading) {
|
|
88576
88691
|
return /* @__PURE__ */ jsx270("div", { className: "flex h-full min-h-0 items-center justify-center bg-[hsl(var(--surface-2)/0.45)]", children: /* @__PURE__ */ jsxs259("div", { className: "flex items-center gap-3 px-5 py-4 border border-border/60 bg-card text-sm text-muted-foreground", children: [
|
|
88577
|
-
/* @__PURE__ */ jsx270(
|
|
88692
|
+
/* @__PURE__ */ jsx270(Loader252, { className: "h-5 w-5 animate-spin text-primary" }),
|
|
88578
88693
|
t("activity:sessionInspect.loadingSessionInspection")
|
|
88579
88694
|
] }) });
|
|
88580
88695
|
}
|
|
@@ -88952,11 +89067,11 @@ import {
|
|
|
88952
89067
|
ArrowUpRight,
|
|
88953
89068
|
FolderOpen as FolderOpen7,
|
|
88954
89069
|
FileText as FileText22,
|
|
88955
|
-
Loader2 as
|
|
89070
|
+
Loader2 as Loader253,
|
|
88956
89071
|
PanelRight as PanelRight2,
|
|
88957
89072
|
BookOpen as BookOpen4
|
|
88958
89073
|
} from "lucide-react";
|
|
88959
|
-
import { lazy as lazy4, Suspense as Suspense4, useCallback as
|
|
89074
|
+
import { lazy as lazy4, Suspense as Suspense4, useCallback as useCallback82, useEffect as useEffect137, useMemo as useMemo83, useRef as useRef73, useState as useState154 } from "react";
|
|
88960
89075
|
import rehypeHighlight2 from "rehype-highlight";
|
|
88961
89076
|
import { jsx as jsx271, jsxs as jsxs260 } from "react/jsx-runtime";
|
|
88962
89077
|
function isWritableSkillSource(source) {
|
|
@@ -89127,11 +89242,11 @@ function SkillDetailView({ className }) {
|
|
|
89127
89242
|
setEditError(null);
|
|
89128
89243
|
}
|
|
89129
89244
|
}, [selectedSkill?.name]);
|
|
89130
|
-
const findSkillByName =
|
|
89245
|
+
const findSkillByName = useCallback82(
|
|
89131
89246
|
(name) => skills.find((s) => s.name.toLowerCase() === name.toLowerCase()),
|
|
89132
89247
|
[skills]
|
|
89133
89248
|
);
|
|
89134
|
-
const handleNavigateToSkill =
|
|
89249
|
+
const handleNavigateToSkill = useCallback82(
|
|
89135
89250
|
(name) => {
|
|
89136
89251
|
const skill = findSkillByName(name);
|
|
89137
89252
|
if (skill) {
|
|
@@ -89151,7 +89266,7 @@ function SkillDetailView({ className }) {
|
|
|
89151
89266
|
},
|
|
89152
89267
|
[findSkillByName, navHistory, historyIndex, setSkillsState]
|
|
89153
89268
|
);
|
|
89154
|
-
const handleBreadcrumbBack =
|
|
89269
|
+
const handleBreadcrumbBack = useCallback82(() => {
|
|
89155
89270
|
if (historyIndex <= 0) return;
|
|
89156
89271
|
isNavigatingBack.current = true;
|
|
89157
89272
|
const newIndex = historyIndex - 1;
|
|
@@ -89165,7 +89280,7 @@ function SkillDetailView({ className }) {
|
|
|
89165
89280
|
setEditContent("");
|
|
89166
89281
|
setUpdateResult(null);
|
|
89167
89282
|
}, [historyIndex, navHistory, setSkillsState]);
|
|
89168
|
-
const handleBreadcrumbForward =
|
|
89283
|
+
const handleBreadcrumbForward = useCallback82(() => {
|
|
89169
89284
|
if (historyIndex >= navHistory.length - 1) return;
|
|
89170
89285
|
isNavigatingBack.current = true;
|
|
89171
89286
|
const newIndex = historyIndex + 1;
|
|
@@ -89179,10 +89294,10 @@ function SkillDetailView({ className }) {
|
|
|
89179
89294
|
setEditContent("");
|
|
89180
89295
|
setUpdateResult(null);
|
|
89181
89296
|
}, [historyIndex, navHistory, setSkillsState]);
|
|
89182
|
-
const handleClose =
|
|
89297
|
+
const handleClose = useCallback82(() => {
|
|
89183
89298
|
showPanel("chat");
|
|
89184
89299
|
}, []);
|
|
89185
|
-
const handleStartEdit =
|
|
89300
|
+
const handleStartEdit = useCallback82(() => {
|
|
89186
89301
|
if (!skillContent) return;
|
|
89187
89302
|
setEditContent(skillContent.body);
|
|
89188
89303
|
lastSavedDraftRef.current = skillContent.body;
|
|
@@ -89191,7 +89306,7 @@ function SkillDetailView({ className }) {
|
|
|
89191
89306
|
setEditMode(true);
|
|
89192
89307
|
setSplitPreview(false);
|
|
89193
89308
|
}, [skillContent]);
|
|
89194
|
-
const handleCancelEdit =
|
|
89309
|
+
const handleCancelEdit = useCallback82(() => {
|
|
89195
89310
|
setEditMode(false);
|
|
89196
89311
|
setEditContent("");
|
|
89197
89312
|
setEditError(null);
|
|
@@ -89199,14 +89314,14 @@ function SkillDetailView({ className }) {
|
|
|
89199
89314
|
setDraftRestored(false);
|
|
89200
89315
|
if (selectedSkill) localStorage.removeItem(`skills_draft_${selectedSkill.name}`);
|
|
89201
89316
|
}, [selectedSkill]);
|
|
89202
|
-
const handleDiscardDraft =
|
|
89317
|
+
const handleDiscardDraft = useCallback82(() => {
|
|
89203
89318
|
if (!selectedSkill || !skillContent) return;
|
|
89204
89319
|
setDraftRestored(false);
|
|
89205
89320
|
setEditContent(skillContent.body);
|
|
89206
89321
|
lastSavedDraftRef.current = skillContent.body;
|
|
89207
89322
|
if (selectedSkill) localStorage.removeItem(`skills_draft_${selectedSkill.name}`);
|
|
89208
89323
|
}, [selectedSkill, skillContent]);
|
|
89209
|
-
const handleSaveEdit =
|
|
89324
|
+
const handleSaveEdit = useCallback82(() => {
|
|
89210
89325
|
if (!client2 || !selectedSkill || !editContent.trim()) return;
|
|
89211
89326
|
setEditSaving(true);
|
|
89212
89327
|
setEditError(null);
|
|
@@ -89228,20 +89343,20 @@ function SkillDetailView({ className }) {
|
|
|
89228
89343
|
client2.on("skills.edited", handler);
|
|
89229
89344
|
client2.editSkill(selectedSkill.name, editContent);
|
|
89230
89345
|
}, [client2, selectedSkill, editContent]);
|
|
89231
|
-
const handleCheckForUpdates =
|
|
89346
|
+
const handleCheckForUpdates = useCallback82(() => {
|
|
89232
89347
|
if (!client2 || !selectedSkill) return;
|
|
89233
89348
|
setCheckingForUpdates(true);
|
|
89234
89349
|
setUpdateResult(null);
|
|
89235
89350
|
client2.checkForUpdates(selectedSkill.name, selectedSkill.source === "user");
|
|
89236
89351
|
}, [client2, selectedSkill]);
|
|
89237
|
-
const handleCopySourceUrl =
|
|
89352
|
+
const handleCopySourceUrl = useCallback82(() => {
|
|
89238
89353
|
if (!selectedSkill?.sourceUrl) return;
|
|
89239
89354
|
navigator.clipboard.writeText(selectedSkill.sourceUrl).then(() => {
|
|
89240
89355
|
setCopiedSourceUrl(true);
|
|
89241
89356
|
setTimeout(() => setCopiedSourceUrl(false), 2e3);
|
|
89242
89357
|
});
|
|
89243
89358
|
}, [selectedSkill]);
|
|
89244
|
-
const handleExportSkill =
|
|
89359
|
+
const handleExportSkill = useCallback82(() => {
|
|
89245
89360
|
if (!skillContent?.body) return;
|
|
89246
89361
|
const blob = new Blob([skillContent.body], { type: "text/markdown" });
|
|
89247
89362
|
const url = URL.createObjectURL(blob);
|
|
@@ -89253,7 +89368,7 @@ function SkillDetailView({ className }) {
|
|
|
89253
89368
|
document.body.removeChild(a);
|
|
89254
89369
|
URL.revokeObjectURL(url);
|
|
89255
89370
|
}, [skillContent]);
|
|
89256
|
-
const handleUninstallSkill =
|
|
89371
|
+
const handleUninstallSkill = useCallback82(
|
|
89257
89372
|
async (skill) => {
|
|
89258
89373
|
if (!client2 || !skill) return;
|
|
89259
89374
|
setUninstalling(true);
|
|
@@ -89342,7 +89457,7 @@ function SkillDetailView({ className }) {
|
|
|
89342
89457
|
disabled: checkingForUpdates,
|
|
89343
89458
|
className: "flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-50",
|
|
89344
89459
|
title: t("activity:skillDetail.checkUpdatesTitle"),
|
|
89345
|
-
children: checkingForUpdates ? /* @__PURE__ */ jsx271(
|
|
89460
|
+
children: checkingForUpdates ? /* @__PURE__ */ jsx271(Loader253, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx271(RefreshCw31, { className: "h-3.5 w-3.5" })
|
|
89346
89461
|
}
|
|
89347
89462
|
),
|
|
89348
89463
|
selectedSkill.source !== "bundled" && !editMode && /* @__PURE__ */ jsx271(
|
|
@@ -89496,7 +89611,7 @@ function SkillDetailView({ className }) {
|
|
|
89496
89611
|
] })
|
|
89497
89612
|
] }),
|
|
89498
89613
|
/* @__PURE__ */ jsx271("div", { className: "min-h-0 min-w-0 flex-1 overflow-hidden rounded-xl border border-border/70 bg-card/70 shadow-sm", children: contentLoading ? /* @__PURE__ */ jsxs260("div", { className: "flex h-full min-h-[16rem] flex-col items-center justify-center p-8 text-center text-muted-foreground", children: [
|
|
89499
|
-
/* @__PURE__ */ jsx271(
|
|
89614
|
+
/* @__PURE__ */ jsx271(Loader253, { className: "mx-auto mb-2 h-6 w-6 animate-spin text-primary" }),
|
|
89500
89615
|
/* @__PURE__ */ jsx271("p", { children: t("activity:skillDetail.loadingContent") })
|
|
89501
89616
|
] }) : editMode ? /* @__PURE__ */ jsxs260("div", { className: "flex h-full min-h-0 min-w-0 flex-col", children: [
|
|
89502
89617
|
/* @__PURE__ */ jsxs260("div", { className: "flex shrink-0 flex-col gap-2 border-b border-border/70 bg-muted/30 px-4 py-2 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
@@ -89542,7 +89657,7 @@ function SkillDetailView({ className }) {
|
|
|
89542
89657
|
onClick: handleSaveEdit,
|
|
89543
89658
|
disabled: editSaving || !editContent.trim(),
|
|
89544
89659
|
className: "rounded-md bg-primary px-3 py-1 text-xs text-primary-foreground shadow-sm shadow-primary/15 transition-colors hover:bg-primary/90 disabled:opacity-50",
|
|
89545
|
-
children: editSaving ? /* @__PURE__ */ jsx271(
|
|
89660
|
+
children: editSaving ? /* @__PURE__ */ jsx271(Loader253, { className: "h-3 w-3 animate-spin inline" }) : t("common:action.save")
|
|
89546
89661
|
}
|
|
89547
89662
|
)
|
|
89548
89663
|
] })
|
|
@@ -89626,7 +89741,7 @@ function SkillDetailView({ className }) {
|
|
|
89626
89741
|
disabled: uninstalling,
|
|
89627
89742
|
className: "flex items-center gap-1.5 rounded-md bg-destructive px-3 py-1.5 text-xs text-destructive-foreground transition-colors hover:bg-destructive/90 disabled:cursor-not-allowed disabled:opacity-50",
|
|
89628
89743
|
children: [
|
|
89629
|
-
uninstalling && /* @__PURE__ */ jsx271(
|
|
89744
|
+
uninstalling && /* @__PURE__ */ jsx271(Loader253, { className: "h-3 w-3 animate-spin" }),
|
|
89630
89745
|
t("activity:skillDetail.uninstallAction")
|
|
89631
89746
|
]
|
|
89632
89747
|
}
|
|
@@ -90007,7 +90122,7 @@ var init_shared2 = __esm({
|
|
|
90007
90122
|
});
|
|
90008
90123
|
|
|
90009
90124
|
// src/components/TechStackView/DependencyDetail.tsx
|
|
90010
|
-
import { ArrowLeft as ArrowLeft10, ExternalLink as ExternalLink8, Loader2 as
|
|
90125
|
+
import { ArrowLeft as ArrowLeft10, ExternalLink as ExternalLink8, Loader2 as Loader254, Sparkles as Sparkles22 } from "lucide-react";
|
|
90011
90126
|
import { Fragment as Fragment74, jsx as jsx273, jsxs as jsxs262 } from "react/jsx-runtime";
|
|
90012
90127
|
function DependencyDetail({
|
|
90013
90128
|
dependency,
|
|
@@ -90100,7 +90215,7 @@ function DependencyDetail({
|
|
|
90100
90215
|
disabled: deepDive.status === "loading",
|
|
90101
90216
|
className: "h-7 text-[10px]",
|
|
90102
90217
|
children: [
|
|
90103
|
-
deepDive.status === "loading" ? /* @__PURE__ */ jsx273(
|
|
90218
|
+
deepDive.status === "loading" ? /* @__PURE__ */ jsx273(Loader254, { className: "size-3 animate-spin" }) : /* @__PURE__ */ jsx273(Sparkles22, { className: "size-3" }),
|
|
90104
90219
|
deepDive.status === "loading" ? "Researching\u2026" : "Deep dive"
|
|
90105
90220
|
]
|
|
90106
90221
|
}
|
|
@@ -90538,8 +90653,8 @@ var TechStackView_exports = {};
|
|
|
90538
90653
|
__export(TechStackView_exports, {
|
|
90539
90654
|
TechStackView: () => TechStackView
|
|
90540
90655
|
});
|
|
90541
|
-
import { Boxes as Boxes2, Download as Download10, FileCode as FileCode7, FileText as FileText23, Loader2 as
|
|
90542
|
-
import { useCallback as
|
|
90656
|
+
import { Boxes as Boxes2, Download as Download10, FileCode as FileCode7, FileText as FileText23, Loader2 as Loader255, RefreshCw as RefreshCw32, Shield as Shield6, ShieldCheck as ShieldCheck20, Sparkles as Sparkles24, X as X60 } from "lucide-react";
|
|
90657
|
+
import { useCallback as useCallback83, useEffect as useEffect138, useMemo as useMemo84, useState as useState155 } from "react";
|
|
90543
90658
|
import { Fragment as Fragment76, jsx as jsx277, jsxs as jsxs266 } from "react/jsx-runtime";
|
|
90544
90659
|
function TechStackView() {
|
|
90545
90660
|
const { t } = useTranslation();
|
|
@@ -90561,7 +90676,7 @@ function TechStackView() {
|
|
|
90561
90676
|
const [remediation, setRemediation] = useState155(null);
|
|
90562
90677
|
const [approvedDependencies, setApprovedDependencies] = useState155(/* @__PURE__ */ new Set());
|
|
90563
90678
|
const [applying, setApplying] = useState155(false);
|
|
90564
|
-
const fetchSnapshot =
|
|
90679
|
+
const fetchSnapshot = useCallback83(async () => {
|
|
90565
90680
|
const store = useTechStackStore.getState();
|
|
90566
90681
|
store.setLoading(true);
|
|
90567
90682
|
store.setError(null);
|
|
@@ -90578,7 +90693,7 @@ function TechStackView() {
|
|
|
90578
90693
|
store.setError(cause instanceof Error ? cause.message : String(cause));
|
|
90579
90694
|
}
|
|
90580
90695
|
}, []);
|
|
90581
|
-
const startJob =
|
|
90696
|
+
const startJob = useCallback83(async (kind) => {
|
|
90582
90697
|
const store = useTechStackStore.getState();
|
|
90583
90698
|
store.setLoading(true);
|
|
90584
90699
|
store.setError(null);
|
|
@@ -90593,7 +90708,7 @@ function TechStackView() {
|
|
|
90593
90708
|
store.setError(cause instanceof Error ? cause.message : String(cause));
|
|
90594
90709
|
}
|
|
90595
90710
|
}, []);
|
|
90596
|
-
const cancelJob =
|
|
90711
|
+
const cancelJob = useCallback83(async () => {
|
|
90597
90712
|
const job = useTechStackStore.getState().activeJob;
|
|
90598
90713
|
if (!job) return;
|
|
90599
90714
|
try {
|
|
@@ -90606,7 +90721,7 @@ function TechStackView() {
|
|
|
90606
90721
|
useTechStackStore.getState().setError(cause instanceof Error ? cause.message : String(cause));
|
|
90607
90722
|
}
|
|
90608
90723
|
}, []);
|
|
90609
|
-
const runDeepDive =
|
|
90724
|
+
const runDeepDive = useCallback83(async (dependency) => {
|
|
90610
90725
|
setDeepDive({ status: "loading", error: null });
|
|
90611
90726
|
try {
|
|
90612
90727
|
const response = await fetch(
|
|
@@ -90639,7 +90754,7 @@ function TechStackView() {
|
|
|
90639
90754
|
(cause) => useTechStackStore.getState().setError(cause instanceof Error ? cause.message : String(cause))
|
|
90640
90755
|
);
|
|
90641
90756
|
}, [tab, snapshot?.id]);
|
|
90642
|
-
const applyRemediation =
|
|
90757
|
+
const applyRemediation = useCallback83(async () => {
|
|
90643
90758
|
if (approvedDependencies.size === 0) return;
|
|
90644
90759
|
setApplying(true);
|
|
90645
90760
|
try {
|
|
@@ -90715,7 +90830,7 @@ function TechStackView() {
|
|
|
90715
90830
|
[dependencies]
|
|
90716
90831
|
);
|
|
90717
90832
|
const hasFilters = searchQuery.trim() !== "" || ecosystemFilter !== "all" || statusFilter !== "all" || directOnly;
|
|
90718
|
-
const clearFilters =
|
|
90833
|
+
const clearFilters = useCallback83(() => {
|
|
90719
90834
|
setSearchQuery("");
|
|
90720
90835
|
setEcosystemFilter("all");
|
|
90721
90836
|
setStatusFilter("all");
|
|
@@ -90724,7 +90839,7 @@ function TechStackView() {
|
|
|
90724
90839
|
const jobRunning = Boolean(
|
|
90725
90840
|
activeJob && !["completed", "failed", "cancelled"].includes(activeJob.status)
|
|
90726
90841
|
);
|
|
90727
|
-
const selectDependencyById =
|
|
90842
|
+
const selectDependencyById = useCallback83((dependencyId) => {
|
|
90728
90843
|
setSelectedId(dependencyId);
|
|
90729
90844
|
setTab("dependencies");
|
|
90730
90845
|
}, []);
|
|
@@ -90848,7 +90963,7 @@ function TechStackView() {
|
|
|
90848
90963
|
] }),
|
|
90849
90964
|
(jobRunning || error) && /* @__PURE__ */ jsxs266("div", { className: "shrink-0 border-b border-border/70 px-4 py-2", "aria-live": "polite", children: [
|
|
90850
90965
|
jobRunning && activeJob && /* @__PURE__ */ jsxs266("div", { role: "status", className: "flex items-center gap-2 text-xs text-info", children: [
|
|
90851
|
-
/* @__PURE__ */ jsx277(
|
|
90966
|
+
/* @__PURE__ */ jsx277(Loader255, { className: "size-3.5 animate-spin" }),
|
|
90852
90967
|
/* @__PURE__ */ jsx277("span", { className: "font-mono", children: activeJob.status }),
|
|
90853
90968
|
activeJob.progress && /* @__PURE__ */ jsxs266("span", { className: "text-muted-foreground", children: [
|
|
90854
90969
|
activeJob.progress.completed,
|
|
@@ -91015,7 +91130,7 @@ function RemediationPanel({
|
|
|
91015
91130
|
/* @__PURE__ */ jsxs266("div", { className: "mb-3 flex items-center justify-between gap-3", children: [
|
|
91016
91131
|
/* @__PURE__ */ jsx277("p", { className: "text-xs text-muted-foreground", children: plan.warning }),
|
|
91017
91132
|
/* @__PURE__ */ jsxs266(Button, { size: "sm", disabled: approved.size === 0 || applying, onClick: onApply, children: [
|
|
91018
|
-
applying && /* @__PURE__ */ jsx277(
|
|
91133
|
+
applying && /* @__PURE__ */ jsx277(Loader255, { className: "size-3.5 animate-spin" }),
|
|
91019
91134
|
"Apply ",
|
|
91020
91135
|
approved.size > 0 ? approved.size : ""
|
|
91021
91136
|
] })
|
|
@@ -91122,7 +91237,7 @@ function WorkspaceList({ snapshot }) {
|
|
|
91122
91237
|
function LoadingState() {
|
|
91123
91238
|
const { t } = useTranslation();
|
|
91124
91239
|
return /* @__PURE__ */ jsx277("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ jsxs266("div", { className: "flex flex-col items-center gap-2", children: [
|
|
91125
|
-
/* @__PURE__ */ jsx277(
|
|
91240
|
+
/* @__PURE__ */ jsx277(Loader255, { className: "size-5 animate-spin text-muted-foreground" }),
|
|
91126
91241
|
/* @__PURE__ */ jsx277("span", { className: "text-xs text-muted-foreground", children: t("activity:techStack.loadingSnapshot") })
|
|
91127
91242
|
] }) });
|
|
91128
91243
|
}
|
|
@@ -91181,7 +91296,7 @@ var DeadCodeScanPanel_exports = {};
|
|
|
91181
91296
|
__export(DeadCodeScanPanel_exports, {
|
|
91182
91297
|
DeadCodeScanPanel: () => DeadCodeScanPanel
|
|
91183
91298
|
});
|
|
91184
|
-
import { useCallback as
|
|
91299
|
+
import { useCallback as useCallback84, useState as useState156 } from "react";
|
|
91185
91300
|
import { jsx as jsx278, jsxs as jsxs267 } from "react/jsx-runtime";
|
|
91186
91301
|
async function safeJsonParse(res) {
|
|
91187
91302
|
const raw = await res.text();
|
|
@@ -91202,7 +91317,7 @@ function DeadCodeScanPanel() {
|
|
|
91202
91317
|
const [scanResult, setScanResult] = useState156(null);
|
|
91203
91318
|
const [actionPlan, setActionPlan] = useState156(null);
|
|
91204
91319
|
const [error, setError] = useState156(null);
|
|
91205
|
-
const handleScan =
|
|
91320
|
+
const handleScan = useCallback84(async () => {
|
|
91206
91321
|
setScanPhase("scanning");
|
|
91207
91322
|
setError(null);
|
|
91208
91323
|
setScanResult(null);
|
|
@@ -91226,7 +91341,7 @@ function DeadCodeScanPanel() {
|
|
|
91226
91341
|
setScanPhase("error");
|
|
91227
91342
|
}
|
|
91228
91343
|
}, []);
|
|
91229
|
-
const handleGeneratePlan =
|
|
91344
|
+
const handleGeneratePlan = useCallback84(async () => {
|
|
91230
91345
|
if (!scanResult) return;
|
|
91231
91346
|
setPlanPhase("generating");
|
|
91232
91347
|
setError(null);
|
|
@@ -91248,7 +91363,7 @@ function DeadCodeScanPanel() {
|
|
|
91248
91363
|
setPlanPhase("idle");
|
|
91249
91364
|
}
|
|
91250
91365
|
}, [scanResult]);
|
|
91251
|
-
const handleExecutePlan =
|
|
91366
|
+
const handleExecutePlan = useCallback84(() => {
|
|
91252
91367
|
if (!actionPlan) return;
|
|
91253
91368
|
setPlanPhase("executing");
|
|
91254
91369
|
const prompt = [
|
|
@@ -91651,7 +91766,7 @@ import {
|
|
|
91651
91766
|
ChevronRight as ChevronRight30,
|
|
91652
91767
|
FileCode2 as FileCode28,
|
|
91653
91768
|
History as History11,
|
|
91654
|
-
Loader2 as
|
|
91769
|
+
Loader2 as Loader256,
|
|
91655
91770
|
Plus as Plus27,
|
|
91656
91771
|
RefreshCw as RefreshCw33,
|
|
91657
91772
|
RotateCw as RotateCw7,
|
|
@@ -91834,7 +91949,7 @@ function ChimeraReviewsView() {
|
|
|
91834
91949
|
filteredReports.length,
|
|
91835
91950
|
")"
|
|
91836
91951
|
] }),
|
|
91837
|
-
loading && /* @__PURE__ */ jsx279(
|
|
91952
|
+
loading && /* @__PURE__ */ jsx279(Loader256, { className: "h-3 w-3 animate-spin" })
|
|
91838
91953
|
] }),
|
|
91839
91954
|
filteredReports.length === 0 ? /* @__PURE__ */ jsx279("div", { className: "p-6 text-center text-xs text-muted-foreground", children: loading ? "Loading review reports\u2026" : "No review reports match your filter." }) : /* @__PURE__ */ jsx279("div", { className: "divide-y divide-border/60", children: filteredReports.map((r) => {
|
|
91840
91955
|
const isSelected = r.reportId === selectedReportId;
|
|
@@ -92270,7 +92385,7 @@ var init_key_operation = __esm({
|
|
|
92270
92385
|
});
|
|
92271
92386
|
|
|
92272
92387
|
// src/components/SetupScreen/CustomProviderSection.tsx
|
|
92273
|
-
import { ChevronRight as ChevronRight31, Loader2 as
|
|
92388
|
+
import { ChevronRight as ChevronRight31, Loader2 as Loader257, Plus as Plus28 } from "lucide-react";
|
|
92274
92389
|
import { useState as useState158 } from "react";
|
|
92275
92390
|
import { jsx as jsx280, jsxs as jsxs269 } from "react/jsx-runtime";
|
|
92276
92391
|
function CustomProviderSection({ onKeySaved }) {
|
|
@@ -92448,7 +92563,7 @@ function CustomProviderSection({ onKeySaved }) {
|
|
|
92448
92563
|
ref: setFieldRef(4),
|
|
92449
92564
|
onKeyDown: (e) => handleKeyDown(e, 4, handleSave),
|
|
92450
92565
|
children: [
|
|
92451
|
-
isSaving ? /* @__PURE__ */ jsx280(
|
|
92566
|
+
isSaving ? /* @__PURE__ */ jsx280(Loader257, { className: "h-4 w-4 animate-spin mr-2" }) : null,
|
|
92452
92567
|
t("setup:screen.custom.add")
|
|
92453
92568
|
]
|
|
92454
92569
|
}
|
|
@@ -92531,7 +92646,7 @@ import {
|
|
|
92531
92646
|
Copy as Copy14,
|
|
92532
92647
|
ExternalLink as ExternalLink10,
|
|
92533
92648
|
Gift,
|
|
92534
|
-
Loader2 as
|
|
92649
|
+
Loader2 as Loader258,
|
|
92535
92650
|
Share2
|
|
92536
92651
|
} from "lucide-react";
|
|
92537
92652
|
import { useEffect as useEffect140, useState as useState159 } from "react";
|
|
@@ -92657,7 +92772,7 @@ function ProviderKeyCard({
|
|
|
92657
92772
|
disabled: !key.trim() || isSaving,
|
|
92658
92773
|
size: "sm",
|
|
92659
92774
|
className: "shrink-0",
|
|
92660
|
-
children: isSaving ? /* @__PURE__ */ jsx281(
|
|
92775
|
+
children: isSaving ? /* @__PURE__ */ jsx281(Loader258, { className: "h-4 w-4 animate-spin" }) : t("setup:screen.card.save")
|
|
92661
92776
|
}
|
|
92662
92777
|
)
|
|
92663
92778
|
] }),
|
|
@@ -92730,7 +92845,7 @@ function ProviderKeyCard({
|
|
|
92730
92845
|
] })
|
|
92731
92846
|
] }),
|
|
92732
92847
|
probeResult === "probing" ? /* @__PURE__ */ jsxs270("div", { className: "flex items-center gap-1.5 text-[11px] text-muted-foreground mt-1", children: [
|
|
92733
|
-
/* @__PURE__ */ jsx281(
|
|
92848
|
+
/* @__PURE__ */ jsx281(Loader258, { className: "h-3 w-3 animate-spin" }),
|
|
92734
92849
|
t("setup:screen.probe.checking", "Checking connection\u2026")
|
|
92735
92850
|
] }) : probeResult?.ok ? /* @__PURE__ */ jsxs270("div", { className: "flex items-center gap-1.5 text-[11px] text-success mt-1", children: [
|
|
92736
92851
|
/* @__PURE__ */ jsx281(Check46, { className: "h-3 w-3" }),
|
|
@@ -92790,7 +92905,7 @@ function ProviderKeyCard({
|
|
|
92790
92905
|
alt: t("setup:screen.card.qrAlt", { name: popular.name }),
|
|
92791
92906
|
className: "w-[200px] h-[200px]"
|
|
92792
92907
|
}
|
|
92793
|
-
) }) : /* @__PURE__ */ jsx281("div", { className: "w-[200px] h-[200px] rounded-lg border border-border flex items-center justify-center bg-muted", children: /* @__PURE__ */ jsx281(
|
|
92908
|
+
) }) : /* @__PURE__ */ jsx281("div", { className: "w-[200px] h-[200px] rounded-lg border border-border flex items-center justify-center bg-muted", children: /* @__PURE__ */ jsx281(Loader258, { className: "h-6 w-6 animate-spin text-muted-foreground" }) }),
|
|
92794
92909
|
/* @__PURE__ */ jsxs270("div", { className: "w-full space-y-2", children: [
|
|
92795
92910
|
/* @__PURE__ */ jsxs270("div", { className: "flex items-center justify-center gap-2", children: [
|
|
92796
92911
|
/* @__PURE__ */ jsxs270(
|
|
@@ -93009,12 +93124,12 @@ import {
|
|
|
93009
93124
|
ChevronRight as ChevronRight33,
|
|
93010
93125
|
Globe as Globe10,
|
|
93011
93126
|
KeyRound as KeyRound2,
|
|
93012
|
-
Loader2 as
|
|
93127
|
+
Loader2 as Loader259,
|
|
93013
93128
|
RefreshCw as RefreshCw34,
|
|
93014
93129
|
Sparkles as Sparkles26,
|
|
93015
93130
|
Shield as Shield7
|
|
93016
93131
|
} from "lucide-react";
|
|
93017
|
-
import { useCallback as
|
|
93132
|
+
import { useCallback as useCallback86, useEffect as useEffect141, useRef as useRef74, useState as useState160 } from "react";
|
|
93018
93133
|
import { useShallow as useShallow17 } from "zustand/react/shallow";
|
|
93019
93134
|
import { Fragment as Fragment78, jsx as jsx282, jsxs as jsxs271 } from "react/jsx-runtime";
|
|
93020
93135
|
function SetupScreen() {
|
|
@@ -93178,18 +93293,18 @@ function SetupScreen() {
|
|
|
93178
93293
|
off4?.();
|
|
93179
93294
|
};
|
|
93180
93295
|
}, [wsConnected, wsUrl, model, reloadNonce, selectedProvider]);
|
|
93181
|
-
const handleRetryCatalog =
|
|
93296
|
+
const handleRetryCatalog = useCallback86(() => {
|
|
93182
93297
|
setCatalogError(null);
|
|
93183
93298
|
setReloadNonce((n) => n + 1);
|
|
93184
93299
|
}, []);
|
|
93185
|
-
const handleRefreshProviders =
|
|
93300
|
+
const handleRefreshProviders = useCallback86(() => {
|
|
93186
93301
|
setPopularRefreshNonce((n) => n + 1);
|
|
93187
93302
|
}, []);
|
|
93188
|
-
const formatRelativeTime2 =
|
|
93303
|
+
const formatRelativeTime2 = useCallback86(
|
|
93189
93304
|
(date) => formatSetupRelativeTime(date, t),
|
|
93190
93305
|
[t]
|
|
93191
93306
|
);
|
|
93192
|
-
const handleKeySaved =
|
|
93307
|
+
const handleKeySaved = useCallback86((providerId) => {
|
|
93193
93308
|
setSavedProviderIds((prev) => /* @__PURE__ */ new Set([...prev, providerId]));
|
|
93194
93309
|
setSelectedProvider(providerId);
|
|
93195
93310
|
setSelectedModel(null);
|
|
@@ -93204,7 +93319,7 @@ function SetupScreen() {
|
|
|
93204
93319
|
}
|
|
93205
93320
|
}, [selectedProvider, wsConnected, wsUrl, catalogModels]);
|
|
93206
93321
|
const currentModels = selectedProvider ? catalogModels[selectedProvider] ?? [] : [];
|
|
93207
|
-
const handleStartSession =
|
|
93322
|
+
const handleStartSession = useCallback86(async () => {
|
|
93208
93323
|
if (!selectedProvider || !selectedModel) return;
|
|
93209
93324
|
if (!savedProviderIds.has(selectedProvider)) {
|
|
93210
93325
|
toast.error("Please save the provider configuration before starting a session.");
|
|
@@ -93221,7 +93336,7 @@ function SetupScreen() {
|
|
|
93221
93336
|
toast.error(result.message || default2.t("setup:screen.errors.modelSwitchTimeout"));
|
|
93222
93337
|
}
|
|
93223
93338
|
}, [selectedProvider, selectedModel, setProvider, setModel, wsUrl]);
|
|
93224
|
-
const handleSaveConfig =
|
|
93339
|
+
const handleSaveConfig = useCallback86(async () => {
|
|
93225
93340
|
if (!selectedProvider || !selectedModel) return;
|
|
93226
93341
|
setProvider(selectedProvider);
|
|
93227
93342
|
setModel(selectedModel);
|
|
@@ -93318,7 +93433,7 @@ function SetupScreen() {
|
|
|
93318
93433
|
/* @__PURE__ */ jsx282("p", { className: "text-xs text-muted-foreground mt-1 max-w-sm", children: catalogError })
|
|
93319
93434
|
] }),
|
|
93320
93435
|
/* @__PURE__ */ jsxs271(Button, { onClick: handleRetryCatalog, size: "sm", variant: "outline", children: [
|
|
93321
|
-
/* @__PURE__ */ jsx282(
|
|
93436
|
+
/* @__PURE__ */ jsx282(Loader259, { className: "h-4 w-4 mr-2" }),
|
|
93322
93437
|
t("setup:screen.errors.retry")
|
|
93323
93438
|
] })
|
|
93324
93439
|
] }) : /* @__PURE__ */ jsxs271(Fragment78, { children: [
|
|
@@ -93327,7 +93442,7 @@ function SetupScreen() {
|
|
|
93327
93442
|
/* @__PURE__ */ jsx282("h2", { className: "text-sm font-medium text-muted-foreground uppercase tracking-wider", children: t("setup:screen.providers.popular") }),
|
|
93328
93443
|
/* @__PURE__ */ jsxs271("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
93329
93444
|
isLoadingPopular && /* @__PURE__ */ jsxs271("span", { className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground", children: [
|
|
93330
|
-
/* @__PURE__ */ jsx282(
|
|
93445
|
+
/* @__PURE__ */ jsx282(Loader259, { className: "h-3 w-3 animate-spin" }),
|
|
93331
93446
|
t("setup:screen.providers.updating")
|
|
93332
93447
|
] }),
|
|
93333
93448
|
lastUpdatedAt && !isLoadingPopular && /* @__PURE__ */ jsx282(
|
|
@@ -93406,7 +93521,7 @@ function SetupScreen() {
|
|
|
93406
93521
|
/* @__PURE__ */ jsx282(CustomProviderSection, { onKeySaved: handleKeySaved })
|
|
93407
93522
|
] })
|
|
93408
93523
|
] }),
|
|
93409
|
-
isLoadingCatalog && /* @__PURE__ */ jsx282("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ jsx282(
|
|
93524
|
+
isLoadingCatalog && /* @__PURE__ */ jsx282("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ jsx282(Loader259, { className: "h-6 w-6 animate-spin text-muted-foreground" }) }),
|
|
93410
93525
|
selectedProvider && /* @__PURE__ */ jsxs271("div", { className: "space-y-3", children: [
|
|
93411
93526
|
/* @__PURE__ */ jsxs271("div", { className: "flex items-center justify-between", children: [
|
|
93412
93527
|
/* @__PURE__ */ jsxs271("h2", { className: "text-base font-semibold flex items-center gap-2", children: [
|
|
@@ -93427,7 +93542,7 @@ function SetupScreen() {
|
|
|
93427
93542
|
)
|
|
93428
93543
|
] }),
|
|
93429
93544
|
/* @__PURE__ */ jsx282("p", { className: "text-xs text-muted-foreground", children: t("setup:screen.start.modelsFor", { provider: selectedProvider }) }),
|
|
93430
|
-
isLoadingModels ? /* @__PURE__ */ jsx282("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ jsx282(
|
|
93545
|
+
isLoadingModels ? /* @__PURE__ */ jsx282("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ jsx282(Loader259, { className: "h-6 w-6 animate-spin text-muted-foreground" }) }) : currentModels.length > 0 ? /* @__PURE__ */ jsx282("div", { className: "grid grid-cols-1 gap-2", children: modelPage.pageItems.map((m) => {
|
|
93431
93546
|
const ctx2 = m.contextWindow ? `${(m.contextWindow / 1e6).toFixed(0)}M ctx` : null;
|
|
93432
93547
|
return /* @__PURE__ */ jsx282(
|
|
93433
93548
|
"button",
|
|
@@ -93996,7 +94111,7 @@ __export(CronJobsPanel_exports, {
|
|
|
93996
94111
|
CronJobsPanel: () => CronJobsPanel
|
|
93997
94112
|
});
|
|
93998
94113
|
import { Clock as Clock25, PauseCircle as PauseCircle2, PlayCircle, RotateCw as RotateCw9 } from "lucide-react";
|
|
93999
|
-
import { useCallback as
|
|
94114
|
+
import { useCallback as useCallback89 } from "react";
|
|
94000
94115
|
import { jsx as jsx288, jsxs as jsxs277 } from "react/jsx-runtime";
|
|
94001
94116
|
function fmtInterval(ms) {
|
|
94002
94117
|
if (ms < 1e3) return `${ms}ms`;
|
|
@@ -94053,7 +94168,7 @@ function CronJobsPanel({ open, onClose }) {
|
|
|
94053
94168
|
const overdueCount = jobs.filter((j) => j.overdue).length;
|
|
94054
94169
|
const enabledCount = jobs.filter((j) => j.enabled).length;
|
|
94055
94170
|
const totalRuns = jobs.reduce((s, j) => s + j.runCount, 0);
|
|
94056
|
-
const handleOpenChange =
|
|
94171
|
+
const handleOpenChange = useCallback89(
|
|
94057
94172
|
(open2) => {
|
|
94058
94173
|
if (!open2) onClose();
|
|
94059
94174
|
},
|
|
@@ -94137,7 +94252,7 @@ __export(QueuePanel_exports, {
|
|
|
94137
94252
|
QueuePanel: () => QueuePanel
|
|
94138
94253
|
});
|
|
94139
94254
|
import { ArrowDownAZ as ArrowDownAZ2, ArrowUpAZ as ArrowUpAZ2, Check as Check50, ListOrdered, Trash2 as Trash231, X as X63 } from "lucide-react";
|
|
94140
|
-
import { useCallback as
|
|
94255
|
+
import { useCallback as useCallback90, useLayoutEffect as useLayoutEffect9, useMemo as useMemo87, useRef as useRef76, useState as useState165 } from "react";
|
|
94141
94256
|
import { jsx as jsx289, jsxs as jsxs278 } from "react/jsx-runtime";
|
|
94142
94257
|
function QueuePanel({
|
|
94143
94258
|
open,
|
|
@@ -94160,7 +94275,7 @@ function QueuePanel({
|
|
|
94160
94275
|
setSortDir(queueSortBySession.get(next) ?? "oldest");
|
|
94161
94276
|
sortSessionRef.current = next;
|
|
94162
94277
|
}, [sessionId]);
|
|
94163
|
-
const handleRemove =
|
|
94278
|
+
const handleRemove = useCallback90(
|
|
94164
94279
|
(index) => {
|
|
94165
94280
|
removeQueued(index);
|
|
94166
94281
|
},
|
|
@@ -111901,14 +112016,30 @@ function SessionCard({ session, label }) {
|
|
|
111901
112016
|
|
|
111902
112017
|
// src/components/WelcomeScreen.tsx
|
|
111903
112018
|
init_i18n();
|
|
112019
|
+
init_bug_hunt_message();
|
|
111904
112020
|
init_utils();
|
|
111905
|
-
init_ws_client();
|
|
111906
112021
|
init_view_navigation();
|
|
112022
|
+
init_ws_client();
|
|
111907
112023
|
init_stores();
|
|
111908
|
-
|
|
111909
|
-
import {
|
|
112024
|
+
init_local_prefs();
|
|
112025
|
+
import { ArrowRight as ArrowRight3, Crosshair, KeyRound, Loader2 as Loader212, ShieldOff } from "lucide-react";
|
|
112026
|
+
import { useCallback as useCallback21, useEffect as useEffect56, useState as useState46 } from "react";
|
|
111910
112027
|
import { useShallow as useShallow7 } from "zustand/react/shallow";
|
|
111911
112028
|
import { jsx as jsx73, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
112029
|
+
var ELITE_BUG_HUNTER_SLUG = "elite-bug-hunter";
|
|
112030
|
+
function directoryPaths(tree) {
|
|
112031
|
+
const paths = [];
|
|
112032
|
+
const visit = (nodes) => {
|
|
112033
|
+
for (const node of nodes) {
|
|
112034
|
+
if (node.type !== "directory") continue;
|
|
112035
|
+
if (node.ignored) continue;
|
|
112036
|
+
paths.push(node.path);
|
|
112037
|
+
if (node.children) visit(node.children);
|
|
112038
|
+
}
|
|
112039
|
+
};
|
|
112040
|
+
visit(tree);
|
|
112041
|
+
return paths.sort((a, b) => a.localeCompare(b));
|
|
112042
|
+
}
|
|
111912
112043
|
function WelcomeScreen() {
|
|
111913
112044
|
const { t } = useTranslation();
|
|
111914
112045
|
const { projectName, cwd } = useSessionStore(
|
|
@@ -111919,7 +112050,19 @@ function WelcomeScreen() {
|
|
|
111919
112050
|
);
|
|
111920
112051
|
const wsConnected = useConfigStore((s) => s.wsConnected);
|
|
111921
112052
|
const wsUrl = useConfigStore((s) => s.wsUrl);
|
|
112053
|
+
const projectTree = useFileStore((s) => s.tree);
|
|
112054
|
+
const sessionId = useSessionStore((s) => s.session?.id);
|
|
112055
|
+
const { subagentsAllowed, setPrefs } = useLocalPrefs(
|
|
112056
|
+
useShallow7((s) => ({ subagentsAllowed: s.subagentsAllowed, setPrefs: s.set }))
|
|
112057
|
+
);
|
|
112058
|
+
const { addMessage, setLoading } = useChatStore(
|
|
112059
|
+
useShallow7((s) => ({ addMessage: s.addMessage, setLoading: s.setLoading }))
|
|
112060
|
+
);
|
|
111922
112061
|
const [savedCount, setSavedCount] = useState46(void 0);
|
|
112062
|
+
const [bugHuntState, setBugHuntState] = useState46("idle");
|
|
112063
|
+
const [bugHuntScope, setBugHuntScope] = useState46("");
|
|
112064
|
+
const [bugHuntMaxBugs, setBugHuntMaxBugs] = useState46(1);
|
|
112065
|
+
const scopeDirectories = directoryPaths(projectTree);
|
|
111923
112066
|
useEffect56(() => {
|
|
111924
112067
|
if (!wsConnected) return;
|
|
111925
112068
|
const client2 = getWSClient(wsUrl);
|
|
@@ -111932,6 +112075,102 @@ function WelcomeScreen() {
|
|
|
111932
112075
|
off();
|
|
111933
112076
|
};
|
|
111934
112077
|
}, [wsConnected, wsUrl]);
|
|
112078
|
+
useEffect56(() => {
|
|
112079
|
+
if (!wsConnected) return;
|
|
112080
|
+
getWSClient(wsUrl).send({
|
|
112081
|
+
type: "files.tree",
|
|
112082
|
+
payload: sessionId ? { sessionId } : {}
|
|
112083
|
+
});
|
|
112084
|
+
}, [sessionId, wsConnected, wsUrl]);
|
|
112085
|
+
const startBugHunt = useCallback21(() => {
|
|
112086
|
+
const client2 = getWSClient(wsUrl);
|
|
112087
|
+
if (!client2.isConnected || bugHuntState === "loading") return;
|
|
112088
|
+
setBugHuntState("loading");
|
|
112089
|
+
let settled = false;
|
|
112090
|
+
let policyOff = () => {
|
|
112091
|
+
};
|
|
112092
|
+
let contentOff = () => {
|
|
112093
|
+
};
|
|
112094
|
+
const finish = (next) => {
|
|
112095
|
+
if (settled) return;
|
|
112096
|
+
settled = true;
|
|
112097
|
+
clearTimeout(timeout);
|
|
112098
|
+
policyOff();
|
|
112099
|
+
contentOff();
|
|
112100
|
+
setBugHuntState(next);
|
|
112101
|
+
};
|
|
112102
|
+
const timeout = setTimeout(() => finish("error"), 8e3);
|
|
112103
|
+
const requestPrompt = () => {
|
|
112104
|
+
contentOff = client2.on("prompts.content", (message) => {
|
|
112105
|
+
const payload = message.payload;
|
|
112106
|
+
if (payload?.slug !== ELITE_BUG_HUNTER_SLUG) return;
|
|
112107
|
+
const content = payload.content?.trim() ?? "";
|
|
112108
|
+
if (!payload.found || !content) {
|
|
112109
|
+
finish("error");
|
|
112110
|
+
return;
|
|
112111
|
+
}
|
|
112112
|
+
const scopeText = bugHuntScope ? `${bugHuntScope} and all of its descendants` : "the whole project";
|
|
112113
|
+
const runPrompt = buildBugHuntMessage(
|
|
112114
|
+
`${content}
|
|
112115
|
+
|
|
112116
|
+
## WebUI run configuration (mandatory)
|
|
112117
|
+
This run may complete up to ${bugHuntMaxBugs} proven bug ${bugHuntMaxBugs === 1 ? "round" : "rounds"}. Work on only one bug at a time; after its proof, fix, verification, and cleanup are complete, continue to the next round only while below this limit. Stop early when no further proven bug is available. Stay strictly within ${scopeText}. This configuration overrides the prompt's one-issue total limit, but not its one-issue-per-round discipline.`,
|
|
112118
|
+
{ scope: bugHuntScope, maxBugs: bugHuntMaxBugs }
|
|
112119
|
+
);
|
|
112120
|
+
const id = client2.sendMessage(runPrompt);
|
|
112121
|
+
addMessage({
|
|
112122
|
+
id,
|
|
112123
|
+
role: "user",
|
|
112124
|
+
content: runPrompt,
|
|
112125
|
+
bugHunt: { scope: bugHuntScope, maxBugs: bugHuntMaxBugs }
|
|
112126
|
+
});
|
|
112127
|
+
setLoading(true);
|
|
112128
|
+
client2.send({ type: "prompts.used", payload: { slug: ELITE_BUG_HUNTER_SLUG } });
|
|
112129
|
+
finish("idle");
|
|
112130
|
+
});
|
|
112131
|
+
client2.send({ type: "prompts.content", payload: { slug: ELITE_BUG_HUNTER_SLUG } });
|
|
112132
|
+
};
|
|
112133
|
+
if (!subagentsAllowed) {
|
|
112134
|
+
requestPrompt();
|
|
112135
|
+
return;
|
|
112136
|
+
}
|
|
112137
|
+
policyOff = client2.on("prefs.updated", (message) => {
|
|
112138
|
+
const payload = message.payload;
|
|
112139
|
+
if (sessionId && payload["sessionId"] !== sessionId) return;
|
|
112140
|
+
if (typeof payload["subagentsAllowed"] !== "boolean") return;
|
|
112141
|
+
if (payload["subagentsAllowed"] !== false) {
|
|
112142
|
+
finish("error");
|
|
112143
|
+
return;
|
|
112144
|
+
}
|
|
112145
|
+
policyOff();
|
|
112146
|
+
policyOff = () => {
|
|
112147
|
+
};
|
|
112148
|
+
requestPrompt();
|
|
112149
|
+
});
|
|
112150
|
+
setPrefs({ subagentsAllowed: false });
|
|
112151
|
+
client2.send({
|
|
112152
|
+
type: "prefs.update",
|
|
112153
|
+
payload: { subagentsAllowed: false, ...sessionId ? { sessionId } : {} }
|
|
112154
|
+
});
|
|
112155
|
+
}, [
|
|
112156
|
+
addMessage,
|
|
112157
|
+
bugHuntMaxBugs,
|
|
112158
|
+
bugHuntScope,
|
|
112159
|
+
bugHuntState,
|
|
112160
|
+
sessionId,
|
|
112161
|
+
setLoading,
|
|
112162
|
+
setPrefs,
|
|
112163
|
+
subagentsAllowed,
|
|
112164
|
+
wsUrl
|
|
112165
|
+
]);
|
|
112166
|
+
const toggleSoloSession = useCallback21(() => {
|
|
112167
|
+
const allowed = !subagentsAllowed;
|
|
112168
|
+
setPrefs({ subagentsAllowed: allowed });
|
|
112169
|
+
getWSClient(wsUrl).send({
|
|
112170
|
+
type: "prefs.update",
|
|
112171
|
+
payload: { subagentsAllowed: allowed, ...sessionId ? { sessionId } : {} }
|
|
112172
|
+
});
|
|
112173
|
+
}, [sessionId, setPrefs, subagentsAllowed, wsUrl]);
|
|
111935
112174
|
return /* @__PURE__ */ jsxs68("div", { className: "flex flex-col gap-5 py-5 sm:py-7 max-w-6xl mx-auto w-full", children: [
|
|
111936
112175
|
/* @__PURE__ */ jsxs68("div", { className: "ws-surface relative overflow-hidden rounded-xl p-5 sm:p-6", children: [
|
|
111937
112176
|
/* @__PURE__ */ jsx73("div", { className: "absolute -top-24 -right-24 w-72 h-72 rounded-full bg-gradient-to-br from-primary/8 via-primary/5 to-transparent blur-3xl pointer-events-none" }),
|
|
@@ -111959,6 +112198,85 @@ function WelcomeScreen() {
|
|
|
111959
112198
|
model
|
|
111960
112199
|
] }),
|
|
111961
112200
|
cwd && /* @__PURE__ */ jsx73("p", { className: "truncate text-[11px] text-muted-foreground/75 font-mono", title: cwd, children: t("setup:welcome.workingDirectory", { cwd }) })
|
|
112201
|
+
] }),
|
|
112202
|
+
/* @__PURE__ */ jsxs68("div", { className: "mt-2 border-t border-border/70 pt-4", children: [
|
|
112203
|
+
/* @__PURE__ */ jsxs68(
|
|
112204
|
+
"button",
|
|
112205
|
+
{
|
|
112206
|
+
type: "button",
|
|
112207
|
+
role: "switch",
|
|
112208
|
+
"aria-checked": !subagentsAllowed,
|
|
112209
|
+
onClick: toggleSoloSession,
|
|
112210
|
+
disabled: !wsConnected,
|
|
112211
|
+
className: cn(
|
|
112212
|
+
"mb-3 flex w-full items-center gap-3 rounded-md border px-4 py-3 text-left transition-colors",
|
|
112213
|
+
!subagentsAllowed ? "border-warning/45 bg-warning/10" : "border-border/70 bg-background/35 hover:bg-muted/45",
|
|
112214
|
+
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
112215
|
+
),
|
|
112216
|
+
children: [
|
|
112217
|
+
/* @__PURE__ */ jsx73(ShieldOff, { className: "h-5 w-5 shrink-0" }),
|
|
112218
|
+
/* @__PURE__ */ jsxs68("span", { className: "min-w-0 flex-1", children: [
|
|
112219
|
+
/* @__PURE__ */ jsx73("span", { className: "block text-sm font-semibold", children: t("setup:welcome.soloSessionTitle") }),
|
|
112220
|
+
/* @__PURE__ */ jsx73("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: t("setup:welcome.soloSessionBody") })
|
|
112221
|
+
] }),
|
|
112222
|
+
/* @__PURE__ */ jsx73("span", { className: "text-xs font-semibold uppercase", children: !subagentsAllowed ? t("setup:welcome.on") : t("setup:welcome.off") })
|
|
112223
|
+
]
|
|
112224
|
+
}
|
|
112225
|
+
),
|
|
112226
|
+
/* @__PURE__ */ jsxs68("div", { className: "rounded-md border border-primary/35 bg-primary/8 p-4", children: [
|
|
112227
|
+
/* @__PURE__ */ jsxs68("div", { className: "flex items-center gap-3", children: [
|
|
112228
|
+
/* @__PURE__ */ jsx73("span", { className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-primary/15 text-primary", children: bugHuntState === "loading" ? /* @__PURE__ */ jsx73(Loader212, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ jsx73(Crosshair, { className: "h-5 w-5" }) }),
|
|
112229
|
+
/* @__PURE__ */ jsxs68("span", { className: "min-w-0 flex-1", children: [
|
|
112230
|
+
/* @__PURE__ */ jsx73("span", { className: "block text-sm font-semibold", children: t("setup:welcome.bugHunterTitle") }),
|
|
112231
|
+
/* @__PURE__ */ jsx73("span", { className: "mt-0.5 block text-xs leading-relaxed text-muted-foreground", children: t("setup:welcome.bugHunterBody") })
|
|
112232
|
+
] })
|
|
112233
|
+
] }),
|
|
112234
|
+
/* @__PURE__ */ jsxs68("div", { className: "mt-3 grid gap-2 sm:grid-cols-[minmax(0,1fr)_9rem_auto]", children: [
|
|
112235
|
+
/* @__PURE__ */ jsx73("label", { className: "sr-only", htmlFor: "bug-hunt-scope", children: t("setup:welcome.bugHunterScope") }),
|
|
112236
|
+
/* @__PURE__ */ jsxs68(
|
|
112237
|
+
"select",
|
|
112238
|
+
{
|
|
112239
|
+
id: "bug-hunt-scope",
|
|
112240
|
+
value: bugHuntScope,
|
|
112241
|
+
onChange: (event) => setBugHuntScope(event.target.value),
|
|
112242
|
+
disabled: !wsConnected || bugHuntState === "loading",
|
|
112243
|
+
className: "min-w-0 rounded-md border border-border bg-background px-3 py-2 text-sm",
|
|
112244
|
+
children: [
|
|
112245
|
+
/* @__PURE__ */ jsx73("option", { value: "", children: t("setup:welcome.bugHunterWholeProject") }),
|
|
112246
|
+
scopeDirectories.map((path) => /* @__PURE__ */ jsx73("option", { value: path, children: t("setup:welcome.bugHunterDirectoryScope", { path }) }, path))
|
|
112247
|
+
]
|
|
112248
|
+
}
|
|
112249
|
+
),
|
|
112250
|
+
/* @__PURE__ */ jsxs68("label", { className: "flex items-center gap-2 rounded-md border border-border bg-background px-3 py-2 text-sm", children: [
|
|
112251
|
+
/* @__PURE__ */ jsx73("span", { className: "whitespace-nowrap text-muted-foreground", children: t("setup:welcome.bugHunterMaxBugs") }),
|
|
112252
|
+
/* @__PURE__ */ jsx73(
|
|
112253
|
+
"select",
|
|
112254
|
+
{
|
|
112255
|
+
"aria-label": t("setup:welcome.bugHunterMaxBugs"),
|
|
112256
|
+
value: bugHuntMaxBugs,
|
|
112257
|
+
onChange: (event) => setBugHuntMaxBugs(Number(event.target.value)),
|
|
112258
|
+
disabled: !wsConnected || bugHuntState === "loading",
|
|
112259
|
+
className: "min-w-0 bg-transparent font-semibold outline-none",
|
|
112260
|
+
children: [1, 2, 3].map((count) => /* @__PURE__ */ jsx73("option", { value: count, children: count }, count))
|
|
112261
|
+
}
|
|
112262
|
+
)
|
|
112263
|
+
] }),
|
|
112264
|
+
/* @__PURE__ */ jsxs68(
|
|
112265
|
+
"button",
|
|
112266
|
+
{
|
|
112267
|
+
type: "button",
|
|
112268
|
+
onClick: startBugHunt,
|
|
112269
|
+
disabled: !wsConnected || savedCount === 0 || bugHuntState === "loading",
|
|
112270
|
+
className: "group flex items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-semibold text-primary-foreground transition-colors hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-50",
|
|
112271
|
+
children: [
|
|
112272
|
+
t("setup:welcome.bugHunterStart"),
|
|
112273
|
+
/* @__PURE__ */ jsx73(ArrowRight3, { className: "h-4 w-4 transition-transform group-hover:translate-x-0.5" })
|
|
112274
|
+
]
|
|
112275
|
+
}
|
|
112276
|
+
)
|
|
112277
|
+
] })
|
|
112278
|
+
] }),
|
|
112279
|
+
bugHuntState === "error" && /* @__PURE__ */ jsx73("p", { className: "mt-2 text-xs text-destructive", role: "alert", children: t("setup:welcome.bugHunterError") })
|
|
111962
112280
|
] })
|
|
111963
112281
|
] })
|
|
111964
112282
|
] }),
|
|
@@ -111996,7 +112314,7 @@ init_task_brief_preview();
|
|
|
111996
112314
|
init_utils();
|
|
111997
112315
|
init_ws_client();
|
|
111998
112316
|
init_stores();
|
|
111999
|
-
import { Bot as Bot9, CheckCircle2 as CheckCircle28, Crown as Crown5, Loader2 as
|
|
112317
|
+
import { Bot as Bot9, CheckCircle2 as CheckCircle28, Crown as Crown5, Loader2 as Loader213, Square as Square4 } from "lucide-react";
|
|
112000
112318
|
import { useShallow as useShallow8 } from "zustand/react/shallow";
|
|
112001
112319
|
import { jsx as jsx74, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
112002
112320
|
var TAB_LED = {
|
|
@@ -112089,7 +112407,7 @@ function AgentTabs() {
|
|
|
112089
112407
|
/* @__PURE__ */ jsxs69("div", { className: "flex shrink-0 items-center gap-2 pl-2 border-l border-border/30", children: [
|
|
112090
112408
|
isLoading ? /* @__PURE__ */ jsxs69("div", { className: "inline-flex items-center gap-1", children: [
|
|
112091
112409
|
/* @__PURE__ */ jsxs69("span", { className: "inline-flex items-center gap-1 text-[10px] font-medium text-primary bg-primary/10 px-1.5 py-0.5 rounded border border-primary/20", children: [
|
|
112092
|
-
/* @__PURE__ */ jsx74(
|
|
112410
|
+
/* @__PURE__ */ jsx74(Loader213, { className: "h-2.5 w-2.5 animate-spin" }),
|
|
112093
112411
|
/* @__PURE__ */ jsx74("span", { children: "Processing..." })
|
|
112094
112412
|
] }),
|
|
112095
112413
|
/* @__PURE__ */ jsxs69(
|
|
@@ -112429,7 +112747,7 @@ init_i18n();
|
|
|
112429
112747
|
init_stores();
|
|
112430
112748
|
import { expectDefined as expectDefined8 } from "@wrongstack/core/utils/expect-defined";
|
|
112431
112749
|
import { Check as Check11, ChevronDown as ChevronDown7, Gauge as Gauge2, Wrench as Wrench8, Zap as Zap12, FileSearch } from "lucide-react";
|
|
112432
|
-
import { useCallback as
|
|
112750
|
+
import { useCallback as useCallback22, useEffect as useEffect58, useRef as useRef26, useState as useState48 } from "react";
|
|
112433
112751
|
import { jsx as jsx78, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
112434
112752
|
function ContextModePicker() {
|
|
112435
112753
|
const { t } = useTranslation();
|
|
@@ -112466,12 +112784,12 @@ function ContextModePicker() {
|
|
|
112466
112784
|
document.addEventListener("mousedown", onClick);
|
|
112467
112785
|
return () => document.removeEventListener("mousedown", onClick);
|
|
112468
112786
|
}, [opsOpen]);
|
|
112469
|
-
const compact =
|
|
112787
|
+
const compact = useCallback22((aggressive) => {
|
|
112470
112788
|
client2?.compactContext?.(aggressive);
|
|
112471
112789
|
setOpsOpen(false);
|
|
112472
112790
|
setOpen(false);
|
|
112473
112791
|
}, [client2]);
|
|
112474
|
-
const repair =
|
|
112792
|
+
const repair = useCallback22(() => {
|
|
112475
112793
|
client2?.repairContext?.();
|
|
112476
112794
|
setOpsOpen(false);
|
|
112477
112795
|
setOpen(false);
|
|
@@ -113193,6 +113511,7 @@ import { expectDefined as expectDefined10 } from "@wrongstack/core/utils/expect-
|
|
|
113193
113511
|
import {
|
|
113194
113512
|
Bot as Bot10,
|
|
113195
113513
|
Brain as Brain8,
|
|
113514
|
+
Crosshair as Crosshair2,
|
|
113196
113515
|
ChevronDown as ChevronDown14,
|
|
113197
113516
|
ChevronRight as ChevronRight9,
|
|
113198
113517
|
FileCode2 as FileCode22,
|
|
@@ -114224,7 +114543,7 @@ import {
|
|
|
114224
114543
|
ChevronRight as ChevronRight8,
|
|
114225
114544
|
Clock as Clock7,
|
|
114226
114545
|
Download as Download5,
|
|
114227
|
-
Loader2 as
|
|
114546
|
+
Loader2 as Loader214
|
|
114228
114547
|
} from "lucide-react";
|
|
114229
114548
|
import { memo as memo8, useState as useState59 } from "react";
|
|
114230
114549
|
|
|
@@ -114708,7 +115027,7 @@ var ToolLedgerCard = memo8(function ToolLedgerCard2({
|
|
|
114708
115027
|
}
|
|
114709
115028
|
),
|
|
114710
115029
|
typeof message.toolDurationMs === "number" && /* @__PURE__ */ jsx92("span", { className: "text-[10px]", children: formatToolDuration(message.toolDurationMs) }),
|
|
114711
|
-
status === "running" ? /* @__PURE__ */ jsx92(
|
|
115030
|
+
status === "running" ? /* @__PURE__ */ jsx92(Loader214, { className: "h-3 w-3 animate-spin text-warning" }) : hasBody ? expanded ? /* @__PURE__ */ jsx92(ChevronDown13, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx92(ChevronRight8, { className: "h-3.5 w-3.5" }) : null
|
|
114712
115031
|
] })
|
|
114713
115032
|
]
|
|
114714
115033
|
}
|
|
@@ -114789,6 +115108,8 @@ var MessageBubble = memo9(function MessageBubble2({
|
|
|
114789
115108
|
const [editValue, setEditValue] = useState60("");
|
|
114790
115109
|
const [showRaw, setShowRaw] = useState60(false);
|
|
114791
115110
|
const isUser = message.role === "user";
|
|
115111
|
+
const bugHunt = message.bugHunt;
|
|
115112
|
+
const isBugHunt = !!bugHunt;
|
|
114792
115113
|
const isTool = message.role === "tool";
|
|
114793
115114
|
const isThinkingLog = !!message.thinkingLog;
|
|
114794
115115
|
const isSystem = message.role === "system" && !isThinkingLog;
|
|
@@ -115001,7 +115322,28 @@ var MessageBubble = memo9(function MessageBubble2({
|
|
|
115001
115322
|
message.isError && "border-destructive/20",
|
|
115002
115323
|
isUser && message.status === "failed" && "opacity-60 ring-1 ring-destructive/30"
|
|
115003
115324
|
),
|
|
115004
|
-
children:
|
|
115325
|
+
children: isBugHunt ? /* @__PURE__ */ jsxs87("div", { className: "min-w-[15rem]", children: [
|
|
115326
|
+
/* @__PURE__ */ jsxs87("div", { className: "flex items-center gap-2 text-sm font-semibold text-primary", children: [
|
|
115327
|
+
/* @__PURE__ */ jsx93(Crosshair2, { className: "h-4 w-4" }),
|
|
115328
|
+
/* @__PURE__ */ jsx93("span", { children: "Elite Bug Hunter" })
|
|
115329
|
+
] }),
|
|
115330
|
+
/* @__PURE__ */ jsxs87("div", { className: "mt-2 flex flex-wrap gap-2 text-xs", children: [
|
|
115331
|
+
/* @__PURE__ */ jsxs87("span", { className: "rounded-full border border-primary/25 bg-primary/10 px-2 py-1", children: [
|
|
115332
|
+
bugHunt?.maxBugs,
|
|
115333
|
+
" ",
|
|
115334
|
+
bugHunt?.maxBugs === 1 ? "bug" : "bugs",
|
|
115335
|
+
" max"
|
|
115336
|
+
] }),
|
|
115337
|
+
/* @__PURE__ */ jsx93(
|
|
115338
|
+
"span",
|
|
115339
|
+
{
|
|
115340
|
+
className: "max-w-full truncate rounded-full border border-border bg-background/60 px-2 py-1",
|
|
115341
|
+
title: bugHunt?.scope || "Whole project",
|
|
115342
|
+
children: bugHunt?.scope ? `${bugHunt.scope} and below` : "Whole project"
|
|
115343
|
+
}
|
|
115344
|
+
)
|
|
115345
|
+
] })
|
|
115346
|
+
] }) : editing && isUser ? /* @__PURE__ */ jsxs87("div", { className: "flex flex-col gap-2 min-w-[280px]", children: [
|
|
115005
115347
|
/* @__PURE__ */ jsx93(
|
|
115006
115348
|
"textarea",
|
|
115007
115349
|
{
|
|
@@ -115227,7 +115569,7 @@ var MessageBubble = memo9(function MessageBubble2({
|
|
|
115227
115569
|
}
|
|
115228
115570
|
);
|
|
115229
115571
|
})(),
|
|
115230
|
-
!isTool && message.content && !message.streaming && /* @__PURE__ */ jsx93(
|
|
115572
|
+
!isTool && !isBugHunt && message.content && !message.streaming && /* @__PURE__ */ jsx93(
|
|
115231
115573
|
CopyButton,
|
|
115232
115574
|
{
|
|
115233
115575
|
text: message.content,
|
|
@@ -115251,7 +115593,7 @@ var MessageBubble = memo9(function MessageBubble2({
|
|
|
115251
115593
|
]
|
|
115252
115594
|
}
|
|
115253
115595
|
),
|
|
115254
|
-
isUser && !editing && !isLoading && /* @__PURE__ */ jsxs87(Fragment27, { children: [
|
|
115596
|
+
isUser && !isBugHunt && !editing && !isLoading && /* @__PURE__ */ jsxs87(Fragment27, { children: [
|
|
115255
115597
|
message.status === "failed" && /* @__PURE__ */ jsxs87(
|
|
115256
115598
|
"button",
|
|
115257
115599
|
{
|
|
@@ -115323,7 +115665,7 @@ var MessageBubble = memo9(function MessageBubble2({
|
|
|
115323
115665
|
init_utils();
|
|
115324
115666
|
init_i18n();
|
|
115325
115667
|
import { expectDefined as expectDefined11 } from "@wrongstack/core/utils/expect-defined";
|
|
115326
|
-
import { CheckCircle2 as CheckCircle211, ChevronDown as ChevronDown15, ChevronRight as ChevronRight10, Loader2 as
|
|
115668
|
+
import { CheckCircle2 as CheckCircle211, ChevronDown as ChevronDown15, ChevronRight as ChevronRight10, Loader2 as Loader215, Terminal as Terminal6, XCircle as XCircle4 } from "lucide-react";
|
|
115327
115669
|
import { memo as memo10, useState as useState61 } from "react";
|
|
115328
115670
|
import { jsx as jsx94, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
115329
115671
|
function formatDuration(ms) {
|
|
@@ -115366,7 +115708,7 @@ var ToolGroup = memo10(function ToolGroup2({
|
|
|
115366
115708
|
open ? /* @__PURE__ */ jsx94(ChevronDown15, { className: "h-3.5 w-3.5 text-muted-foreground" }) : /* @__PURE__ */ jsx94(ChevronRight10, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
115367
115709
|
/* @__PURE__ */ jsx94(Terminal6, { className: "h-3.5 w-3.5 text-muted-foreground" }),
|
|
115368
115710
|
/* @__PURE__ */ jsx94("span", { className: "font-mono text-xs", children: t("activity:toolGroup.toolCalls", { count: tools.length }) }),
|
|
115369
|
-
running > 0 ? /* @__PURE__ */ jsx94(
|
|
115711
|
+
running > 0 ? /* @__PURE__ */ jsx94(Loader215, { className: "h-3 w-3 animate-spin text-warning" }) : errored > 0 ? /* @__PURE__ */ jsx94(XCircle4, { className: "h-3 w-3 text-destructive" }) : /* @__PURE__ */ jsx94(CheckCircle211, { className: "h-3 w-3 text-success" }),
|
|
115370
115712
|
totalMs > 0 && /* @__PURE__ */ jsx94("span", { className: "text-xs text-muted-foreground tabular-nums font-normal", children: formatDuration(totalMs) }),
|
|
115371
115713
|
preview2 && /* @__PURE__ */ jsxs88("span", { className: "text-xs text-muted-foreground/80 font-mono truncate", children: [
|
|
115372
115714
|
"\xB7 ",
|
|
@@ -115845,7 +116187,7 @@ init_ws_client();
|
|
|
115845
116187
|
init_stores();
|
|
115846
116188
|
init_local_prefs();
|
|
115847
116189
|
init_memory_injector_store();
|
|
115848
|
-
import { useCallback as
|
|
116190
|
+
import { useCallback as useCallback23, useEffect as useEffect64, useMemo as useMemo33, useRef as useRef31, useState as useState63 } from "react";
|
|
115849
116191
|
import { useShallow as useShallow9 } from "zustand/react/shallow";
|
|
115850
116192
|
|
|
115851
116193
|
// src/components/ChatView/auto-collapse.ts
|
|
@@ -115894,7 +116236,7 @@ function useChatViewState() {
|
|
|
115894
116236
|
const historyEntries = useHistoryStore((s) => s.entries);
|
|
115895
116237
|
const switcherOpen = useUIStore((s) => s.chatSwitcherOpen);
|
|
115896
116238
|
const setChatSwitcherOpen = useUIStore((s) => s.setChatSwitcherOpen);
|
|
115897
|
-
const setSwitcherOpen =
|
|
116239
|
+
const setSwitcherOpen = useCallback23(
|
|
115898
116240
|
(next) => {
|
|
115899
116241
|
setChatSwitcherOpen(nextBoolean(next, useUIStore.getState().chatSwitcherOpen));
|
|
115900
116242
|
},
|
|
@@ -115942,7 +116284,7 @@ function useChatViewState() {
|
|
|
115942
116284
|
const autonomy = useLocalPrefs((s) => s.autonomy);
|
|
115943
116285
|
const groupToolCallsPref = useLocalPrefs((s) => s.groupToolCalls);
|
|
115944
116286
|
const autoCollapseInput = useLocalPrefs((s) => s.autoCollapseInput);
|
|
115945
|
-
const handleAutonomyChange =
|
|
116287
|
+
const handleAutonomyChange = useCallback23(
|
|
115946
116288
|
(mode) => {
|
|
115947
116289
|
useLocalPrefs.getState().set({ autonomy: mode });
|
|
115948
116290
|
try {
|
|
@@ -115963,7 +116305,7 @@ function useChatViewState() {
|
|
|
115963
116305
|
const [processOpen, setProcessOpen] = useState63(false);
|
|
115964
116306
|
const checkpointOpen = useUIStore((s) => s.chatCheckpointOpen);
|
|
115965
116307
|
const setChatCheckpointOpen = useUIStore((s) => s.setChatCheckpointOpen);
|
|
115966
|
-
const setCheckpointOpen =
|
|
116308
|
+
const setCheckpointOpen = useCallback23(
|
|
115967
116309
|
(next) => {
|
|
115968
116310
|
setChatCheckpointOpen(nextBoolean(next, useUIStore.getState().chatCheckpointOpen));
|
|
115969
116311
|
},
|
|
@@ -115971,7 +116313,7 @@ function useChatViewState() {
|
|
|
115971
116313
|
);
|
|
115972
116314
|
const memoryPanelOpen = useUIStore((s) => s.chatMemoryPanelOpen);
|
|
115973
116315
|
const setChatMemoryPanelOpen = useUIStore((s) => s.setChatMemoryPanelOpen);
|
|
115974
|
-
const setMemoryPanelOpen =
|
|
116316
|
+
const setMemoryPanelOpen = useCallback23(
|
|
115975
116317
|
(next) => {
|
|
115976
116318
|
setChatMemoryPanelOpen(nextBoolean(next, useUIStore.getState().chatMemoryPanelOpen));
|
|
115977
116319
|
},
|
|
@@ -115979,7 +116321,7 @@ function useChatViewState() {
|
|
|
115979
116321
|
);
|
|
115980
116322
|
const inputCollapsed = useUIStore((s) => s.chatInputCollapsed);
|
|
115981
116323
|
const setChatInputCollapsed = useUIStore((s) => s.setChatInputCollapsed);
|
|
115982
|
-
const setInputCollapsed =
|
|
116324
|
+
const setInputCollapsed = useCallback23(
|
|
115983
116325
|
(next) => {
|
|
115984
116326
|
setChatInputCollapsed(nextBoolean(next, useUIStore.getState().chatInputCollapsed));
|
|
115985
116327
|
},
|
|
@@ -115993,7 +116335,7 @@ function useChatViewState() {
|
|
|
115993
116335
|
const setBreakdownOpen = useUIStore((s) => s.setChatContextBreakdownOpen);
|
|
115994
116336
|
const toolStatsOpen = useUIStore((s) => s.chatToolStatsOpen);
|
|
115995
116337
|
const setChatToolStatsOpen = useUIStore((s) => s.setChatToolStatsOpen);
|
|
115996
|
-
const setToolStatsOpen =
|
|
116338
|
+
const setToolStatsOpen = useCallback23(
|
|
115997
116339
|
(next) => {
|
|
115998
116340
|
setChatToolStatsOpen(nextBoolean(next, useUIStore.getState().chatToolStatsOpen));
|
|
115999
116341
|
},
|
|
@@ -116050,7 +116392,7 @@ function useChatViewState() {
|
|
|
116050
116392
|
prevHadMessages.current = hasMessages;
|
|
116051
116393
|
prevAutoCollapse.current = autoCollapseInput;
|
|
116052
116394
|
}, [messages.length, autoCollapseInput, sessionId, isLoading]);
|
|
116053
|
-
const handleToggleAutoCollapse =
|
|
116395
|
+
const handleToggleAutoCollapse = useCallback23(() => {
|
|
116054
116396
|
const next = !useLocalPrefs.getState().autoCollapseInput;
|
|
116055
116397
|
useLocalPrefs.getState().set({ autoCollapseInput: next });
|
|
116056
116398
|
if (!next) setInputCollapsed(false);
|
|
@@ -116060,7 +116402,7 @@ function useChatViewState() {
|
|
|
116060
116402
|
const [unreadCount, setUnreadCount] = useState63(0);
|
|
116061
116403
|
const [scrolledDeep, setScrolledDeep] = useState63(false);
|
|
116062
116404
|
const lastSeenCount = useRef31(messages.length);
|
|
116063
|
-
const handleScroll =
|
|
116405
|
+
const handleScroll = useCallback23(() => {
|
|
116064
116406
|
const h = vlistRef.current;
|
|
116065
116407
|
if (!h) return;
|
|
116066
116408
|
const dist = h.scrollSize - h.scrollOffset - h.viewportSize;
|
|
@@ -116072,7 +116414,7 @@ function useChatViewState() {
|
|
|
116072
116414
|
}
|
|
116073
116415
|
setScrolledDeep(h.scrollOffset > h.viewportSize && h.scrollSize > h.viewportSize * 2.5);
|
|
116074
116416
|
}, []);
|
|
116075
|
-
const handleHistorySelect =
|
|
116417
|
+
const handleHistorySelect = useCallback23((targetSessionId) => {
|
|
116076
116418
|
const ws = getWSClient();
|
|
116077
116419
|
useSessionTabStore.getState().openTab(targetSessionId, {
|
|
116078
116420
|
resumeSession: (id) => ws.resumeSession?.(id)
|
|
@@ -116106,13 +116448,13 @@ function useChatViewState() {
|
|
|
116106
116448
|
if (idx === void 0) return;
|
|
116107
116449
|
vlistRef.current?.scrollToIndex(idx, { align: "center", smooth: true });
|
|
116108
116450
|
}, [scrollTarget, rowIndexById]);
|
|
116109
|
-
const scrollToBottom =
|
|
116451
|
+
const scrollToBottom = useCallback23(() => {
|
|
116110
116452
|
vlistRef.current?.scrollToIndex(childCountRef.current - 1, { align: "end", smooth: true });
|
|
116111
116453
|
setPinnedToBottom(true);
|
|
116112
116454
|
setUnreadCount(0);
|
|
116113
116455
|
lastSeenCount.current = useChatStore.getState().messages.length;
|
|
116114
116456
|
}, []);
|
|
116115
|
-
const scrollToTop =
|
|
116457
|
+
const scrollToTop = useCallback23(() => {
|
|
116116
116458
|
vlistRef.current?.scrollToIndex(0, { align: "start", smooth: true });
|
|
116117
116459
|
}, []);
|
|
116118
116460
|
const [runStartedAt, setRunStartedAt] = useState63(null);
|
|
@@ -117679,7 +118021,7 @@ import {
|
|
|
117679
118021
|
X as X25,
|
|
117680
118022
|
Zap as Zap20
|
|
117681
118023
|
} from "lucide-react";
|
|
117682
|
-
import { useCallback as
|
|
118024
|
+
import { useCallback as useCallback45, useEffect as useEffect84, useRef as useRef43, useState as useState87 } from "react";
|
|
117683
118025
|
import { useShallow as useShallow12 } from "zustand/react/shallow";
|
|
117684
118026
|
|
|
117685
118027
|
// src/components/SettingsPanel/AgentSettingsTab.tsx
|
|
@@ -118346,7 +118688,7 @@ init_ThemeProvider();
|
|
|
118346
118688
|
init_button();
|
|
118347
118689
|
init_input();
|
|
118348
118690
|
import { Globe as Globe5, Monitor as Monitor2, Moon as Moon2, Sun as Sun2 } from "lucide-react";
|
|
118349
|
-
import { useCallback as
|
|
118691
|
+
import { useCallback as useCallback27 } from "react";
|
|
118350
118692
|
import { useShallow as useShallow11 } from "zustand/react/shallow";
|
|
118351
118693
|
|
|
118352
118694
|
// src/components/SettingsPanel/ConnectionsHealthSection.tsx
|
|
@@ -118371,7 +118713,7 @@ import {
|
|
|
118371
118713
|
TriangleAlert as TriangleAlert4,
|
|
118372
118714
|
Wifi
|
|
118373
118715
|
} from "lucide-react";
|
|
118374
|
-
import { useCallback as
|
|
118716
|
+
import { useCallback as useCallback25, useEffect as useEffect70, useMemo as useMemo35, useRef as useRef36, useState as useState68 } from "react";
|
|
118375
118717
|
import { Fragment as Fragment32, jsx as jsx110, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
118376
118718
|
var REFRESH_INTERVAL_MS = 15e3;
|
|
118377
118719
|
function ConnectionsHealthSection() {
|
|
@@ -118385,7 +118727,7 @@ function ConnectionsHealthSection() {
|
|
|
118385
118727
|
const [actionFeedback, setActionFeedback] = useState68({});
|
|
118386
118728
|
const [autoHealing, setAutoHealing] = useState68(/* @__PURE__ */ new Set());
|
|
118387
118729
|
const feedbackTimersRef = useRef36(/* @__PURE__ */ new Map());
|
|
118388
|
-
const refresh =
|
|
118730
|
+
const refresh = useCallback25(() => {
|
|
118389
118731
|
if (!wsConnected || !client2) {
|
|
118390
118732
|
setLoading(false);
|
|
118391
118733
|
setError(t("settings:connection.healthDisconnected"));
|
|
@@ -118413,7 +118755,7 @@ function ConnectionsHealthSection() {
|
|
|
118413
118755
|
timers2.delete(serviceId);
|
|
118414
118756
|
}
|
|
118415
118757
|
};
|
|
118416
|
-
const handleServiceAction =
|
|
118758
|
+
const handleServiceAction = useCallback25(
|
|
118417
118759
|
(serviceId, action) => {
|
|
118418
118760
|
if (!client2 || !wsConnected) return;
|
|
118419
118761
|
setPendingActions((prev) => new Set(prev).add(serviceId));
|
|
@@ -118804,7 +119146,7 @@ import {
|
|
|
118804
119146
|
Wifi as Wifi2,
|
|
118805
119147
|
Zap as Zap17
|
|
118806
119148
|
} from "lucide-react";
|
|
118807
|
-
import { useCallback as
|
|
119149
|
+
import { useCallback as useCallback26, useEffect as useEffect71, useState as useState69 } from "react";
|
|
118808
119150
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
118809
119151
|
import { Fragment as Fragment33, jsx as jsx112, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
118810
119152
|
function CooldownRemaining({ expiresAtMs }) {
|
|
@@ -119011,21 +119353,21 @@ function ProviderHealthSection() {
|
|
|
119011
119353
|
const blockedEntries = entriesList.filter((e) => e.state === "blocked").sort((a, b) => (a.stateExpiresAt ?? 0) - (b.stateExpiresAt ?? 0));
|
|
119012
119354
|
const degradedEntries = entriesList.filter((e) => e.state === "degraded").sort((a, b) => (b.totalFailures ?? 0) - (a.totalFailures ?? 0));
|
|
119013
119355
|
const healthyEntries = entriesList.filter((e) => e.state === "healthy");
|
|
119014
|
-
const handleRetry =
|
|
119356
|
+
const handleRetry = useCallback26(
|
|
119015
119357
|
(providerId, model) => {
|
|
119016
119358
|
client2?.retryProviderModel(providerId, model);
|
|
119017
119359
|
setTimeout(() => client2?.send({ type: "provider.status.get" }), 100);
|
|
119018
119360
|
},
|
|
119019
119361
|
[client2]
|
|
119020
119362
|
);
|
|
119021
|
-
const handleClear =
|
|
119363
|
+
const handleClear = useCallback26(
|
|
119022
119364
|
(providerId, model) => {
|
|
119023
119365
|
client2?.clearProviderStatus(providerId, model);
|
|
119024
119366
|
setTimeout(() => client2?.send({ type: "provider.status.get" }), 100);
|
|
119025
119367
|
},
|
|
119026
119368
|
[client2]
|
|
119027
119369
|
);
|
|
119028
|
-
const handleRefresh =
|
|
119370
|
+
const handleRefresh = useCallback26(() => {
|
|
119029
119371
|
client2?.send({ type: "provider.status.get" });
|
|
119030
119372
|
}, [client2]);
|
|
119031
119373
|
useEffect71(() => {
|
|
@@ -119205,14 +119547,14 @@ function AppearanceSettingsTab() {
|
|
|
119205
119547
|
const { theme, setTheme, palette, setPalette } = useTheme();
|
|
119206
119548
|
const { updatePrefs } = useWebSocket();
|
|
119207
119549
|
const localPrefs = useLocalPrefs();
|
|
119208
|
-
const syncPref =
|
|
119550
|
+
const syncPref = useCallback27(
|
|
119209
119551
|
(key, value) => {
|
|
119210
119552
|
localPrefs.set({ [key]: value });
|
|
119211
119553
|
updatePrefs({ [key]: value });
|
|
119212
119554
|
},
|
|
119213
119555
|
[localPrefs, updatePrefs]
|
|
119214
119556
|
);
|
|
119215
|
-
const setUiLocale =
|
|
119557
|
+
const setUiLocale = useCallback27(
|
|
119216
119558
|
(code) => {
|
|
119217
119559
|
localPrefs.set({ uiLocale: code });
|
|
119218
119560
|
if (default2.language !== code) void default2.changeLanguage(code);
|
|
@@ -119368,7 +119710,7 @@ function AppearanceSettingsTab() {
|
|
|
119368
119710
|
|
|
119369
119711
|
// src/components/SettingsPanel/ChimeraSettingsPanel.tsx
|
|
119370
119712
|
import { Bug, ListPlus as ListPlus2, Zap as Zap18 } from "lucide-react";
|
|
119371
|
-
import { useCallback as
|
|
119713
|
+
import { useCallback as useCallback28, useState as useState70 } from "react";
|
|
119372
119714
|
init_i18n();
|
|
119373
119715
|
init_utils();
|
|
119374
119716
|
init_local_prefs();
|
|
@@ -119389,10 +119731,10 @@ function ChimeraSettingsPanel({
|
|
|
119389
119731
|
}
|
|
119390
119732
|
return localPrefs.autoReviewFallbackModels ?? [];
|
|
119391
119733
|
})();
|
|
119392
|
-
const openChimeraPicker =
|
|
119393
|
-
const closeChimeraPicker =
|
|
119394
|
-
const openAutoReviewPicker =
|
|
119395
|
-
const closeAutoReviewPicker =
|
|
119734
|
+
const openChimeraPicker = useCallback28(() => setChimeraPickerOpen(true), []);
|
|
119735
|
+
const closeChimeraPicker = useCallback28(() => setChimeraPickerOpen(false), []);
|
|
119736
|
+
const openAutoReviewPicker = useCallback28(() => setAutoReviewPickerOpen(true), []);
|
|
119737
|
+
const closeAutoReviewPicker = useCallback28(() => setAutoReviewPickerOpen(false), []);
|
|
119396
119738
|
return /* @__PURE__ */ jsxs107("div", { className: "space-y-6", children: [
|
|
119397
119739
|
/* @__PURE__ */ jsxs107("div", { children: [
|
|
119398
119740
|
/* @__PURE__ */ jsxs107("h3", { className: "text-sm font-semibold mb-2 flex items-center gap-2", children: [
|
|
@@ -119914,7 +120256,7 @@ init_input();
|
|
|
119914
120256
|
init_i18n();
|
|
119915
120257
|
init_local_prefs();
|
|
119916
120258
|
import { BrainCircuit as BrainCircuit3, Monitor as Monitor3, Palette as Palette3, Sparkles as Sparkles11, Type } from "lucide-react";
|
|
119917
|
-
import { useCallback as
|
|
120259
|
+
import { useCallback as useCallback29 } from "react";
|
|
119918
120260
|
import { jsx as jsx117, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
119919
120261
|
var DEFAULT_SAGE_THRESHOLD = "0.85";
|
|
119920
120262
|
var SAGE_THRESHOLD_OPTIONS = [
|
|
@@ -119929,7 +120271,7 @@ var MULTI_DIFF_PRESETS = [0, 3, 5, 8, 10, 15];
|
|
|
119929
120271
|
function DisplaySection({ syncPref }) {
|
|
119930
120272
|
const { t } = useTranslation();
|
|
119931
120273
|
const localPrefs = useLocalPrefs();
|
|
119932
|
-
const setThinkingWord =
|
|
120274
|
+
const setThinkingWord = useCallback29(
|
|
119933
120275
|
(raw) => {
|
|
119934
120276
|
const next = raw.trim().toLowerCase().slice(0, 32);
|
|
119935
120277
|
if (next.length > 0) syncPref("thinkingWord", next);
|
|
@@ -120482,7 +120824,7 @@ init_i18n();
|
|
|
120482
120824
|
init_fallback_ref();
|
|
120483
120825
|
init_local_prefs();
|
|
120484
120826
|
import { Cpu as Cpu11, Layers as Layers6, ListPlus as ListPlus3 } from "lucide-react";
|
|
120485
|
-
import { useCallback as
|
|
120827
|
+
import { useCallback as useCallback30, useEffect as useEffect74, useMemo as useMemo38, useRef as useRef38, useState as useState73 } from "react";
|
|
120486
120828
|
import { jsx as jsx122, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
120487
120829
|
function FallbacksSection({
|
|
120488
120830
|
syncPref,
|
|
@@ -120502,11 +120844,11 @@ function FallbacksSection({
|
|
|
120502
120844
|
() => buildKnownModelSet(candidates ?? candidatesWithCatalog),
|
|
120503
120845
|
[candidates, candidatesWithCatalog]
|
|
120504
120846
|
);
|
|
120505
|
-
const setFallbackProfiles =
|
|
120847
|
+
const setFallbackProfiles = useCallback30(
|
|
120506
120848
|
(next) => syncPref("fallbackProfiles", next),
|
|
120507
120849
|
[syncPref]
|
|
120508
120850
|
);
|
|
120509
|
-
const addFallbackProfile =
|
|
120851
|
+
const addFallbackProfile = useCallback30(() => {
|
|
120510
120852
|
const name = newFallbackProfileName.trim();
|
|
120511
120853
|
if (!name) return;
|
|
120512
120854
|
if (localPrefs.fallbackProfiles[name]) {
|
|
@@ -120516,20 +120858,20 @@ function FallbacksSection({
|
|
|
120516
120858
|
setFallbackProfiles({ ...localPrefs.fallbackProfiles, [name]: [] });
|
|
120517
120859
|
setNewFallbackProfileName("");
|
|
120518
120860
|
}, [localPrefs.fallbackProfiles, newFallbackProfileName, setFallbackProfiles]);
|
|
120519
|
-
const removeFallbackProfile =
|
|
120861
|
+
const removeFallbackProfile = useCallback30(
|
|
120520
120862
|
(name) => {
|
|
120521
120863
|
const { [name]: _removed, ...rest } = localPrefs.fallbackProfiles;
|
|
120522
120864
|
setFallbackProfiles(rest);
|
|
120523
120865
|
},
|
|
120524
120866
|
[localPrefs.fallbackProfiles, setFallbackProfiles]
|
|
120525
120867
|
);
|
|
120526
|
-
const updateFallbackProfile =
|
|
120868
|
+
const updateFallbackProfile = useCallback30(
|
|
120527
120869
|
(name, chain) => {
|
|
120528
120870
|
setFallbackProfiles({ ...localPrefs.fallbackProfiles, [name]: chain });
|
|
120529
120871
|
},
|
|
120530
120872
|
[localPrefs.fallbackProfiles, setFallbackProfiles]
|
|
120531
120873
|
);
|
|
120532
|
-
const createDefaultFallbackProfile =
|
|
120874
|
+
const createDefaultFallbackProfile = useCallback30(() => {
|
|
120533
120875
|
const primary = activeProvider && activeModel ? `${activeProvider}/${activeModel}` : "";
|
|
120534
120876
|
if (!primary) {
|
|
120535
120877
|
toast.error(default2.t("settings:toast.selectProviderModelFirst"));
|
|
@@ -120565,14 +120907,14 @@ function FallbacksSection({
|
|
|
120565
120907
|
localPrefs.fallbackProfiles,
|
|
120566
120908
|
setFallbackProfiles
|
|
120567
120909
|
]);
|
|
120568
|
-
const useFallbackProfileAsActive =
|
|
120910
|
+
const useFallbackProfileAsActive = useCallback30(
|
|
120569
120911
|
(name) => {
|
|
120570
120912
|
const chain = localPrefs.fallbackProfiles[name] ?? [];
|
|
120571
120913
|
syncPref("fallbackModels", chain);
|
|
120572
120914
|
},
|
|
120573
120915
|
[localPrefs.fallbackProfiles, syncPref]
|
|
120574
120916
|
);
|
|
120575
|
-
const setLeaderFromFallbackProfile =
|
|
120917
|
+
const setLeaderFromFallbackProfile = useCallback30(
|
|
120576
120918
|
async (name) => {
|
|
120577
120919
|
const chain = localPrefs.fallbackProfiles[name] ?? [];
|
|
120578
120920
|
const first = chain[0];
|
|
@@ -120837,7 +121179,7 @@ import {
|
|
|
120837
121179
|
ChevronDown as ChevronDown19,
|
|
120838
121180
|
ChevronRight as ChevronRight12,
|
|
120839
121181
|
Edit3 as Edit32,
|
|
120840
|
-
Loader2 as
|
|
121182
|
+
Loader2 as Loader216,
|
|
120841
121183
|
Moon as Moon3,
|
|
120842
121184
|
Plus as Plus7,
|
|
120843
121185
|
Search as Search9,
|
|
@@ -120846,7 +121188,7 @@ import {
|
|
|
120846
121188
|
Sun as Sun3,
|
|
120847
121189
|
Trash2 as Trash211
|
|
120848
121190
|
} from "lucide-react";
|
|
120849
|
-
import { useCallback as
|
|
121191
|
+
import { useCallback as useCallback31, useEffect as useEffect75, useState as useState74 } from "react";
|
|
120850
121192
|
|
|
120851
121193
|
// src/components/SettingsPanel/official-servers.ts
|
|
120852
121194
|
var OFFICIAL_SERVERS = [
|
|
@@ -121547,17 +121889,17 @@ function MCPSection() {
|
|
|
121547
121889
|
off12?.();
|
|
121548
121890
|
};
|
|
121549
121891
|
}, [ws.client]);
|
|
121550
|
-
const handleAddCustom =
|
|
121892
|
+
const handleAddCustom = useCallback31(
|
|
121551
121893
|
(config) => {
|
|
121552
121894
|
ws.client?.addMcpServer(config);
|
|
121553
121895
|
},
|
|
121554
121896
|
[ws]
|
|
121555
121897
|
);
|
|
121556
|
-
const handleAddOfficial =
|
|
121898
|
+
const handleAddOfficial = useCallback31((official) => {
|
|
121557
121899
|
setPrefillConfig(toServerConfig(official, false));
|
|
121558
121900
|
setShowAddDialog(true);
|
|
121559
121901
|
}, []);
|
|
121560
|
-
const handleRemove =
|
|
121902
|
+
const handleRemove = useCallback31(
|
|
121561
121903
|
(name) => {
|
|
121562
121904
|
void confirmModal({
|
|
121563
121905
|
title: t("settings:mcp.removeConfirmTitle", { name }),
|
|
@@ -121570,39 +121912,39 @@ function MCPSection() {
|
|
|
121570
121912
|
},
|
|
121571
121913
|
[ws]
|
|
121572
121914
|
);
|
|
121573
|
-
const handleEdit =
|
|
121915
|
+
const handleEdit = useCallback31((server) => {
|
|
121574
121916
|
setEditServer(server);
|
|
121575
121917
|
setPrefillConfig(void 0);
|
|
121576
121918
|
setShowEditDialog(true);
|
|
121577
121919
|
}, []);
|
|
121578
|
-
const handleSaveEdit =
|
|
121920
|
+
const handleSaveEdit = useCallback31(
|
|
121579
121921
|
(config) => {
|
|
121580
121922
|
ws.client?.updateMcpServer(config);
|
|
121581
121923
|
},
|
|
121582
121924
|
[ws]
|
|
121583
121925
|
);
|
|
121584
|
-
const handleWake =
|
|
121926
|
+
const handleWake = useCallback31(
|
|
121585
121927
|
(name) => {
|
|
121586
121928
|
setPendingOp(name);
|
|
121587
121929
|
ws.client?.wakeMcpServer(name);
|
|
121588
121930
|
},
|
|
121589
121931
|
[ws]
|
|
121590
121932
|
);
|
|
121591
|
-
const handleSleep =
|
|
121933
|
+
const handleSleep = useCallback31(
|
|
121592
121934
|
(name) => {
|
|
121593
121935
|
setPendingOp(name);
|
|
121594
121936
|
ws.client?.sleepMcpServer(name);
|
|
121595
121937
|
},
|
|
121596
121938
|
[ws]
|
|
121597
121939
|
);
|
|
121598
|
-
const handleDiscover =
|
|
121940
|
+
const handleDiscover = useCallback31(
|
|
121599
121941
|
(name) => {
|
|
121600
121942
|
setPendingOp(name);
|
|
121601
121943
|
ws.client?.discoverMcpServer(name);
|
|
121602
121944
|
},
|
|
121603
121945
|
[ws]
|
|
121604
121946
|
);
|
|
121605
|
-
const handleRefresh =
|
|
121947
|
+
const handleRefresh = useCallback31(() => {
|
|
121606
121948
|
setLoading(true);
|
|
121607
121949
|
ws.client?.listMcpServers();
|
|
121608
121950
|
}, [ws]);
|
|
@@ -121622,7 +121964,7 @@ function MCPSection() {
|
|
|
121622
121964
|
] }),
|
|
121623
121965
|
/* @__PURE__ */ jsxs117("div", { className: "flex items-center gap-2", children: [
|
|
121624
121966
|
/* @__PURE__ */ jsxs117(Button, { variant: "outline", size: "sm", onClick: handleRefresh, disabled: loading, children: [
|
|
121625
|
-
loading ? /* @__PURE__ */ jsx124(
|
|
121967
|
+
loading ? /* @__PURE__ */ jsx124(Loader216, { className: "w-4 h-4 animate-spin" }) : null,
|
|
121626
121968
|
t("common:action.refresh")
|
|
121627
121969
|
] }),
|
|
121628
121970
|
/* @__PURE__ */ jsxs117(
|
|
@@ -121663,7 +122005,7 @@ function MCPSection() {
|
|
|
121663
122005
|
)) })
|
|
121664
122006
|
] }),
|
|
121665
122007
|
/* @__PURE__ */ jsx124(TabsContent, { value: "list", className: "space-y-3", children: loading && servers.length === 0 ? /* @__PURE__ */ jsxs117("div", { className: "flex items-center justify-center py-8 text-muted-foreground", children: [
|
|
121666
|
-
/* @__PURE__ */ jsx124(
|
|
122008
|
+
/* @__PURE__ */ jsx124(Loader216, { className: "w-5 h-5 animate-spin mr-2" }),
|
|
121667
122009
|
t("settings:mcp.loadingServers")
|
|
121668
122010
|
] }) : servers.length === 0 ? /* @__PURE__ */ jsxs117("div", { className: "text-center py-8 text-muted-foreground", children: [
|
|
121669
122011
|
/* @__PURE__ */ jsx124(Server2, { className: "w-10 h-10 mx-auto mb-2 opacity-50" }),
|
|
@@ -121954,7 +122296,7 @@ init_i18n();
|
|
|
121954
122296
|
init_utils();
|
|
121955
122297
|
init_stores();
|
|
121956
122298
|
init_button();
|
|
121957
|
-
import { Cpu as Cpu12, Loader2 as
|
|
122299
|
+
import { Cpu as Cpu12, Loader2 as Loader217, RefreshCw as RefreshCw13 } from "lucide-react";
|
|
121958
122300
|
import { Fragment as Fragment35, jsx as jsx128, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
121959
122301
|
function ModelSection({
|
|
121960
122302
|
provider,
|
|
@@ -121988,7 +122330,7 @@ function ModelSection({
|
|
|
121988
122330
|
)
|
|
121989
122331
|
] }),
|
|
121990
122332
|
isLoadingModels && !catalogModels[provider] ? /* @__PURE__ */ jsxs120("div", { className: "flex items-center justify-center py-8", children: [
|
|
121991
|
-
/* @__PURE__ */ jsx128(
|
|
122333
|
+
/* @__PURE__ */ jsx128(Loader217, { className: "h-6 w-6 animate-spin text-muted-foreground" }),
|
|
121992
122334
|
/* @__PURE__ */ jsx128("span", { className: "ml-2 text-muted-foreground", children: t("settings:model.loading") })
|
|
121993
122335
|
] }) : /* @__PURE__ */ jsxs120(Fragment35, { children: [
|
|
121994
122336
|
/* @__PURE__ */ jsx128(
|
|
@@ -122023,7 +122365,7 @@ function ModelSection({
|
|
|
122023
122365
|
init_local_prefs();
|
|
122024
122366
|
init_button();
|
|
122025
122367
|
import { Coins as Coins2, Plus as Plus8, X as X19 } from "lucide-react";
|
|
122026
|
-
import { useCallback as
|
|
122368
|
+
import { useCallback as useCallback32, useState as useState75 } from "react";
|
|
122027
122369
|
import { jsx as jsx129, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
122028
122370
|
var LEADER_MODES = [
|
|
122029
122371
|
{ value: "off", label: "Off", hint: "The leader never changes its own tier." },
|
|
@@ -122050,18 +122392,18 @@ function ModelTiersSection({ syncPref }) {
|
|
|
122050
122392
|
const [newLevelName, setNewLevelName] = useState75("");
|
|
122051
122393
|
const [newRouteKey, setNewRouteKey] = useState75("");
|
|
122052
122394
|
const [newRouteTier, setNewRouteTier] = useState75("");
|
|
122053
|
-
const patch =
|
|
122395
|
+
const patch = useCallback32(
|
|
122054
122396
|
(next) => syncPref("modelTiers", { ...tiers, ...next }),
|
|
122055
122397
|
[syncPref, tiers]
|
|
122056
122398
|
);
|
|
122057
|
-
const patchLevel =
|
|
122399
|
+
const patchLevel = useCallback32(
|
|
122058
122400
|
(id, next) => syncPref("modelTiers", {
|
|
122059
122401
|
...tiers,
|
|
122060
122402
|
levels: { ...levels, [id]: { ...levels[id] ?? {}, ...next } }
|
|
122061
122403
|
}),
|
|
122062
122404
|
[syncPref, tiers, levels]
|
|
122063
122405
|
);
|
|
122064
|
-
const removeLevel =
|
|
122406
|
+
const removeLevel = useCallback32(
|
|
122065
122407
|
(id) => {
|
|
122066
122408
|
const nextLevels = { ...levels };
|
|
122067
122409
|
delete nextLevels[id];
|
|
@@ -122391,25 +122733,25 @@ import {
|
|
|
122391
122733
|
EyeOff,
|
|
122392
122734
|
Globe as Globe6,
|
|
122393
122735
|
Key,
|
|
122394
|
-
Loader2 as
|
|
122736
|
+
Loader2 as Loader222,
|
|
122395
122737
|
Plus as Plus12,
|
|
122396
122738
|
Server as Server4,
|
|
122397
122739
|
ShieldCheck as ShieldCheck4,
|
|
122398
122740
|
Trash2 as Trash213,
|
|
122399
122741
|
XCircle as XCircle6
|
|
122400
122742
|
} from "lucide-react";
|
|
122401
|
-
import { useCallback as
|
|
122743
|
+
import { useCallback as useCallback41, useEffect as useEffect81, useMemo as useMemo41, useState as useState83 } from "react";
|
|
122402
122744
|
|
|
122403
122745
|
// src/components/ui/api-key-display.tsx
|
|
122404
122746
|
init_utils();
|
|
122405
122747
|
init_i18n();
|
|
122406
122748
|
import { Check as Check20, Copy as Copy6 } from "lucide-react";
|
|
122407
|
-
import { useCallback as
|
|
122749
|
+
import { useCallback as useCallback35, useState as useState77 } from "react";
|
|
122408
122750
|
import { jsx as jsx131, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
122409
122751
|
function ApiKeyDisplay({ maskedKey, className }) {
|
|
122410
122752
|
const { t } = useTranslation();
|
|
122411
122753
|
const [copied, setCopied] = useState77(false);
|
|
122412
|
-
const handleCopy =
|
|
122754
|
+
const handleCopy = useCallback35(() => {
|
|
122413
122755
|
void navigator.clipboard.writeText(maskedKey).then(() => {
|
|
122414
122756
|
setCopied(true);
|
|
122415
122757
|
setTimeout(() => setCopied(false), 1500);
|
|
@@ -122455,14 +122797,14 @@ import {
|
|
|
122455
122797
|
CheckCircle2 as CheckCircle214,
|
|
122456
122798
|
Code2 as Code23,
|
|
122457
122799
|
ExternalLink as ExternalLink2,
|
|
122458
|
-
Loader2 as
|
|
122800
|
+
Loader2 as Loader219,
|
|
122459
122801
|
Plus as Plus10,
|
|
122460
122802
|
RefreshCw as RefreshCw14,
|
|
122461
122803
|
Sparkles as Sparkles12,
|
|
122462
122804
|
User as User2,
|
|
122463
122805
|
XCircle as XCircle5
|
|
122464
122806
|
} from "lucide-react";
|
|
122465
|
-
import { useCallback as
|
|
122807
|
+
import { useCallback as useCallback36, useEffect as useEffect77, useState as useState78 } from "react";
|
|
122466
122808
|
import { jsx as jsx132, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
122467
122809
|
var PROVIDERS = [
|
|
122468
122810
|
{
|
|
@@ -122521,7 +122863,7 @@ function OAuthLoginSection({ ws, savedByKind }) {
|
|
|
122521
122863
|
});
|
|
122522
122864
|
return () => off?.();
|
|
122523
122865
|
}, [ws]);
|
|
122524
|
-
const start =
|
|
122866
|
+
const start = useCallback36(
|
|
122525
122867
|
(kind) => {
|
|
122526
122868
|
setStates((prev) => ({
|
|
122527
122869
|
...prev,
|
|
@@ -122531,7 +122873,7 @@ function OAuthLoginSection({ ws, savedByKind }) {
|
|
|
122531
122873
|
},
|
|
122532
122874
|
[ws]
|
|
122533
122875
|
);
|
|
122534
|
-
const retryLogin =
|
|
122876
|
+
const retryLogin = useCallback36(
|
|
122535
122877
|
(kind, providerId) => {
|
|
122536
122878
|
setStates((prev) => ({
|
|
122537
122879
|
...prev,
|
|
@@ -122541,7 +122883,7 @@ function OAuthLoginSection({ ws, savedByKind }) {
|
|
|
122541
122883
|
},
|
|
122542
122884
|
[ws]
|
|
122543
122885
|
);
|
|
122544
|
-
const startNewAccount =
|
|
122886
|
+
const startNewAccount = useCallback36(
|
|
122545
122887
|
(kind) => {
|
|
122546
122888
|
const alias = newAccountAlias.trim();
|
|
122547
122889
|
if (!alias) return;
|
|
@@ -122555,7 +122897,7 @@ function OAuthLoginSection({ ws, savedByKind }) {
|
|
|
122555
122897
|
},
|
|
122556
122898
|
[ws, newAccountAlias]
|
|
122557
122899
|
);
|
|
122558
|
-
const cancel =
|
|
122900
|
+
const cancel = useCallback36(
|
|
122559
122901
|
(kind) => {
|
|
122560
122902
|
ws.cancelOAuth(kind);
|
|
122561
122903
|
setStates((prev) => ({ ...prev, [kind]: { phase: "idle" } }));
|
|
@@ -122563,7 +122905,7 @@ function OAuthLoginSection({ ws, savedByKind }) {
|
|
|
122563
122905
|
},
|
|
122564
122906
|
[ws]
|
|
122565
122907
|
);
|
|
122566
|
-
const submitPaste =
|
|
122908
|
+
const submitPaste = useCallback36(
|
|
122567
122909
|
(kind) => {
|
|
122568
122910
|
const input = pasteValue.trim();
|
|
122569
122911
|
if (!input) return;
|
|
@@ -122603,7 +122945,7 @@ function OAuthLoginSection({ ws, savedByKind }) {
|
|
|
122603
122945
|
] }),
|
|
122604
122946
|
st.phase === "awaiting_browser" && /* @__PURE__ */ jsxs124("div", { className: "mt-3 space-y-2 border-t pt-3", children: [
|
|
122605
122947
|
/* @__PURE__ */ jsxs124("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
122606
|
-
/* @__PURE__ */ jsx132(
|
|
122948
|
+
/* @__PURE__ */ jsx132(Loader219, { className: "h-4 w-4 animate-spin text-muted-foreground" }),
|
|
122607
122949
|
/* @__PURE__ */ jsx132("span", { children: t("settings:oauth.waitingBrowser") })
|
|
122608
122950
|
] }),
|
|
122609
122951
|
st.authorizeUrl && /* @__PURE__ */ jsxs124(
|
|
@@ -122669,12 +123011,12 @@ function OAuthLoginSection({ ws, savedByKind }) {
|
|
|
122669
123011
|
}
|
|
122670
123012
|
),
|
|
122671
123013
|
/* @__PURE__ */ jsxs124("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
122672
|
-
/* @__PURE__ */ jsx132(
|
|
123014
|
+
/* @__PURE__ */ jsx132(Loader219, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
122673
123015
|
/* @__PURE__ */ jsx132("span", { children: t("settings:oauth.waitingCode") })
|
|
122674
123016
|
] })
|
|
122675
123017
|
] }),
|
|
122676
123018
|
(st.phase === "exchanging" || st.phase === "fetching_models") && /* @__PURE__ */ jsxs124("div", { className: "mt-3 flex items-center gap-2 border-t pt-3 text-sm", children: [
|
|
122677
|
-
/* @__PURE__ */ jsx132(
|
|
123019
|
+
/* @__PURE__ */ jsx132(Loader219, { className: "h-4 w-4 animate-spin text-muted-foreground" }),
|
|
122678
123020
|
/* @__PURE__ */ jsx132("span", { children: st.phase === "exchanging" ? t("settings:oauth.exchanging") : t("settings:oauth.fetchingModels") })
|
|
122679
123021
|
] }),
|
|
122680
123022
|
st.phase === "success" && /* @__PURE__ */ jsxs124("div", { className: "mt-3 flex items-center gap-2 border-t pt-3 text-sm text-success", children: [
|
|
@@ -122843,8 +123185,8 @@ function OAuthLoginSection({ ws, savedByKind }) {
|
|
|
122843
123185
|
init_i18n();
|
|
122844
123186
|
init_Toaster();
|
|
122845
123187
|
init_button();
|
|
122846
|
-
import { ListChecks as ListChecks2, Loader2 as
|
|
122847
|
-
import { useCallback as
|
|
123188
|
+
import { ListChecks as ListChecks2, Loader2 as Loader221, RefreshCw as RefreshCw15 } from "lucide-react";
|
|
123189
|
+
import { useCallback as useCallback40, useEffect as useEffect80, useMemo as useMemo40, useState as useState82 } from "react";
|
|
122848
123190
|
|
|
122849
123191
|
// src/components/SettingsPanel/ClearAllowlistDialog.tsx
|
|
122850
123192
|
init_i18n();
|
|
@@ -122961,12 +123303,12 @@ import {
|
|
|
122961
123303
|
Wrench as Wrench14,
|
|
122962
123304
|
X as X23
|
|
122963
123305
|
} from "lucide-react";
|
|
122964
|
-
import { Fragment as Fragment37, useCallback as
|
|
123306
|
+
import { Fragment as Fragment37, useCallback as useCallback39, useMemo as useMemo39, useState as useState81 } from "react";
|
|
122965
123307
|
|
|
122966
123308
|
// src/components/SettingsPanel/ModelCatalogPicker.tsx
|
|
122967
123309
|
init_i18n();
|
|
122968
|
-
import { Loader2 as
|
|
122969
|
-
import { useCallback as
|
|
123310
|
+
import { Loader2 as Loader220, Search as Search11, X as X21 } from "lucide-react";
|
|
123311
|
+
import { useCallback as useCallback37, useEffect as useEffect79, useRef as useRef42, useState as useState79 } from "react";
|
|
122970
123312
|
import { jsx as jsx134, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
122971
123313
|
function ModelCatalogPicker({ ws, onSelect, onClose }) {
|
|
122972
123314
|
const { t } = useTranslation();
|
|
@@ -122985,7 +123327,7 @@ function ModelCatalogPicker({ ws, onSelect, onClose }) {
|
|
|
122985
123327
|
});
|
|
122986
123328
|
return off;
|
|
122987
123329
|
}, [ws]);
|
|
122988
|
-
const fireSearch =
|
|
123330
|
+
const fireSearch = useCallback37(
|
|
122989
123331
|
(q) => {
|
|
122990
123332
|
if (!q.trim()) {
|
|
122991
123333
|
setResults([]);
|
|
@@ -123005,7 +123347,7 @@ function ModelCatalogPicker({ ws, onSelect, onClose }) {
|
|
|
123005
123347
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
123006
123348
|
};
|
|
123007
123349
|
}, [query, fireSearch]);
|
|
123008
|
-
const handlePick =
|
|
123350
|
+
const handlePick = useCallback37(
|
|
123009
123351
|
(match) => {
|
|
123010
123352
|
const modelsDev = {
|
|
123011
123353
|
name: match.name,
|
|
@@ -123069,7 +123411,7 @@ function ModelCatalogPicker({ ws, onSelect, onClose }) {
|
|
|
123069
123411
|
}
|
|
123070
123412
|
)
|
|
123071
123413
|
] }),
|
|
123072
|
-
loading ? /* @__PURE__ */ jsx134("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ jsx134(
|
|
123414
|
+
loading ? /* @__PURE__ */ jsx134("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ jsx134(Loader220, { className: "h-5 w-5 animate-spin text-muted-foreground" }) }) : results.length > 0 ? /* @__PURE__ */ jsx134("div", { className: "space-y-1.5", children: results.map((match) => /* @__PURE__ */ jsxs126(
|
|
123073
123415
|
"button",
|
|
123074
123416
|
{
|
|
123075
123417
|
type: "button",
|
|
@@ -123109,7 +123451,7 @@ init_utils();
|
|
|
123109
123451
|
init_button();
|
|
123110
123452
|
import { MODELS_DEV_MODALITY_VALUES, modelsDevModelSchema } from "@wrongstack/core/models";
|
|
123111
123453
|
import { Check as Check21, X as X22 } from "lucide-react";
|
|
123112
|
-
import { useCallback as
|
|
123454
|
+
import { useCallback as useCallback38, useState as useState80 } from "react";
|
|
123113
123455
|
import { Fragment as Fragment36, jsx as jsx135, jsxs as jsxs127 } from "react/jsx-runtime";
|
|
123114
123456
|
function toFormState(modelId, md) {
|
|
123115
123457
|
const limit = md["limit"];
|
|
@@ -123223,10 +123565,10 @@ function ModelSchemaEditor({
|
|
|
123223
123565
|
JSON.stringify({ ...initialModelsDev, ...modelId ? { id: modelId } : {} }, null, 2)
|
|
123224
123566
|
);
|
|
123225
123567
|
const [rawError, setRawError] = useState80(null);
|
|
123226
|
-
const update =
|
|
123568
|
+
const update = useCallback38((key, value) => {
|
|
123227
123569
|
setForm((prev) => ({ ...prev, [key]: value }));
|
|
123228
123570
|
}, []);
|
|
123229
|
-
const toggleModality =
|
|
123571
|
+
const toggleModality = useCallback38(
|
|
123230
123572
|
(direction, value) => {
|
|
123231
123573
|
setForm((prev) => {
|
|
123232
123574
|
const current = prev[direction];
|
|
@@ -123238,7 +123580,7 @@ function ModelSchemaEditor({
|
|
|
123238
123580
|
},
|
|
123239
123581
|
[]
|
|
123240
123582
|
);
|
|
123241
|
-
const handleFormSave =
|
|
123583
|
+
const handleFormSave = useCallback38(() => {
|
|
123242
123584
|
const payload = buildPayload(form, initialModelsDev);
|
|
123243
123585
|
const result = modelsDevModelSchema.safeParse({ ...payload, id: form.id || modelId });
|
|
123244
123586
|
if (!result.success) {
|
|
@@ -123248,7 +123590,7 @@ function ModelSchemaEditor({
|
|
|
123248
123590
|
setErrors([]);
|
|
123249
123591
|
onSave(form.id || modelId, payload);
|
|
123250
123592
|
}, [form, initialModelsDev, modelId, onSave]);
|
|
123251
|
-
const handleRawSave =
|
|
123593
|
+
const handleRawSave = useCallback38(() => {
|
|
123252
123594
|
try {
|
|
123253
123595
|
const parsed = JSON.parse(rawText);
|
|
123254
123596
|
const result = modelsDevModelSchema.safeParse({ ...parsed, id: modelId || parsed.id });
|
|
@@ -123627,14 +123969,14 @@ function ModelListEditor({
|
|
|
123627
123969
|
(row) => row.modelId.toLowerCase().includes(q) || (row.name?.toLowerCase().includes(q) ?? false)
|
|
123628
123970
|
);
|
|
123629
123971
|
}, [rows, filter]);
|
|
123630
|
-
const handleRemove =
|
|
123972
|
+
const handleRemove = useCallback39(
|
|
123631
123973
|
(modelId) => {
|
|
123632
123974
|
ws.removeCustomModel(providerId, modelId);
|
|
123633
123975
|
toast.success(t("settings:providerModels.modelRemoved", { model: modelId }));
|
|
123634
123976
|
},
|
|
123635
123977
|
[ws, providerId, t]
|
|
123636
123978
|
);
|
|
123637
|
-
const handleSave =
|
|
123979
|
+
const handleSave = useCallback39(
|
|
123638
123980
|
(modelId, modelsDev) => {
|
|
123639
123981
|
ws.setCustomModel(providerId, modelId, { modelsDev });
|
|
123640
123982
|
setEditingModel(null);
|
|
@@ -123642,7 +123984,7 @@ function ModelListEditor({
|
|
|
123642
123984
|
},
|
|
123643
123985
|
[ws, providerId, t]
|
|
123644
123986
|
);
|
|
123645
|
-
const handleCatalogSelect =
|
|
123987
|
+
const handleCatalogSelect = useCallback39(
|
|
123646
123988
|
(modelId, modelsDev) => {
|
|
123647
123989
|
ws.setCustomModel(providerId, modelId, { modelsDev });
|
|
123648
123990
|
setShowCatalogPicker(false);
|
|
@@ -124034,24 +124376,24 @@ function ProviderModelsPanel({
|
|
|
124034
124376
|
});
|
|
124035
124377
|
return off;
|
|
124036
124378
|
}, [ws, providerId]);
|
|
124037
|
-
const onRefresh =
|
|
124379
|
+
const onRefresh = useCallback40(() => {
|
|
124038
124380
|
setState3((prev) => ({ ...prev, inFlight: true }));
|
|
124039
124381
|
ws.probeProvider(providerId, PROBE_TIMEOUT_MS);
|
|
124040
124382
|
}, [ws, providerId]);
|
|
124041
|
-
const handlePickModel =
|
|
124383
|
+
const handlePickModel = useCallback40(
|
|
124042
124384
|
(providerId2, modelId) => {
|
|
124043
124385
|
setState3((prev) => ({ ...prev, picked: modelId }));
|
|
124044
124386
|
onPickModel?.(providerId2, modelId);
|
|
124045
124387
|
},
|
|
124046
124388
|
[onPickModel]
|
|
124047
124389
|
);
|
|
124048
|
-
const requestClear =
|
|
124390
|
+
const requestClear = useCallback40(() => {
|
|
124049
124391
|
setConfirmOpen(true);
|
|
124050
124392
|
}, []);
|
|
124051
|
-
const cancelClear =
|
|
124393
|
+
const cancelClear = useCallback40(() => {
|
|
124052
124394
|
setConfirmOpen(false);
|
|
124053
124395
|
}, []);
|
|
124054
|
-
const confirmClear =
|
|
124396
|
+
const confirmClear = useCallback40(() => {
|
|
124055
124397
|
setConfirmOpen(false);
|
|
124056
124398
|
const previousModels = savedModels ? [...savedModels] : [];
|
|
124057
124399
|
setState3((prev) => ({ ...prev, picked: null, last: null }));
|
|
@@ -124113,7 +124455,7 @@ function ProviderModelsPanel({
|
|
|
124113
124455
|
"aria-label": t("activity:providerModels.refreshAria", { provider: providerId }),
|
|
124114
124456
|
className: "h-8 px-2 text-xs",
|
|
124115
124457
|
children: [
|
|
124116
|
-
state.inFlight ? /* @__PURE__ */ jsx137(
|
|
124458
|
+
state.inFlight ? /* @__PURE__ */ jsx137(Loader221, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx137(RefreshCw15, { className: "h-3.5 w-3.5" }),
|
|
124117
124459
|
state.inFlight ? t("activity:providerModels.probing") : t("activity:providerModels.refresh")
|
|
124118
124460
|
]
|
|
124119
124461
|
}
|
|
@@ -124211,7 +124553,7 @@ function ProviderSection({
|
|
|
124211
124553
|
const [newProviderModels, setNewProviderModels] = useState83([]);
|
|
124212
124554
|
const addProviderNav = useFieldKeyboardNav();
|
|
124213
124555
|
const addKeyNav = useFieldKeyboardNav();
|
|
124214
|
-
const handleAddKey =
|
|
124556
|
+
const handleAddKey = useCallback41(
|
|
124215
124557
|
(providerId) => {
|
|
124216
124558
|
if (!newKeyLabel.trim() || !newKeyValue.trim()) return;
|
|
124217
124559
|
onAddKey(providerId, newKeyLabel.trim(), newKeyValue.trim());
|
|
@@ -124221,7 +124563,7 @@ function ProviderSection({
|
|
|
124221
124563
|
},
|
|
124222
124564
|
[onAddKey, newKeyLabel, newKeyValue]
|
|
124223
124565
|
);
|
|
124224
|
-
const handleAddProvider =
|
|
124566
|
+
const handleAddProvider = useCallback41(() => {
|
|
124225
124567
|
if (!newProviderId.trim()) return;
|
|
124226
124568
|
onAddProvider(
|
|
124227
124569
|
newProviderId.trim(),
|
|
@@ -124256,7 +124598,7 @@ function ProviderSection({
|
|
|
124256
124598
|
newProviderApiKey,
|
|
124257
124599
|
newProviderModels
|
|
124258
124600
|
]);
|
|
124259
|
-
const handlePickLocalPreset =
|
|
124601
|
+
const handlePickLocalPreset = useCallback41((preset) => {
|
|
124260
124602
|
setNewProviderId(preset.id);
|
|
124261
124603
|
setNewProviderFamily(LOCAL_PRESET_FAMILY);
|
|
124262
124604
|
setNewProviderBaseUrl(preset.defaultBaseUrl);
|
|
@@ -124291,7 +124633,7 @@ function ProviderSection({
|
|
|
124291
124633
|
});
|
|
124292
124634
|
return () => off?.();
|
|
124293
124635
|
}, [ws]);
|
|
124294
|
-
const handleInlineKeySave =
|
|
124636
|
+
const handleInlineKeySave = useCallback41(
|
|
124295
124637
|
(p) => {
|
|
124296
124638
|
const key = inlineKeyValue.trim();
|
|
124297
124639
|
if (!key) return;
|
|
@@ -124384,7 +124726,7 @@ function ProviderSection({
|
|
|
124384
124726
|
}
|
|
124385
124727
|
),
|
|
124386
124728
|
isLoadingCatalog && catalogProviders.length === 0 ? /* @__PURE__ */ jsxs130("div", { className: "flex items-center justify-center py-8", children: [
|
|
124387
|
-
/* @__PURE__ */ jsx138(
|
|
124729
|
+
/* @__PURE__ */ jsx138(Loader222, { className: "h-6 w-6 animate-spin text-muted-foreground" }),
|
|
124388
124730
|
/* @__PURE__ */ jsx138("span", { className: "ml-2 text-muted-foreground", children: t("settings:provider.loadingCatalog") })
|
|
124389
124731
|
] }) : filteredCatalog.length === 0 && catalogQuery ? /* @__PURE__ */ jsx138("div", { className: "text-center py-8 text-muted-foreground text-sm", children: t("settings:provider.noMatch", { query: catalogQuery }) }) : PROVIDER_FAMILIES.map((family) => {
|
|
124390
124732
|
const providers = catalogByFamily[family];
|
|
@@ -124638,7 +124980,7 @@ function ProviderSection({
|
|
|
124638
124980
|
)
|
|
124639
124981
|
] })
|
|
124640
124982
|
] }),
|
|
124641
|
-
isLoadingSaved ? /* @__PURE__ */ jsx138("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ jsx138(
|
|
124983
|
+
isLoadingSaved ? /* @__PURE__ */ jsx138("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ jsx138(Loader222, { className: "h-6 w-6 animate-spin text-muted-foreground" }) }) : savedProviders.length === 0 ? /* @__PURE__ */ jsxs130("div", { className: "text-center py-8 text-muted-foreground", children: [
|
|
124642
124984
|
/* @__PURE__ */ jsx138(Key, { className: "h-8 w-8 mx-auto mb-2 opacity-50" }),
|
|
124643
124985
|
/* @__PURE__ */ jsx138("p", { children: t("settings:provider.noSaved") }),
|
|
124644
124986
|
/* @__PURE__ */ jsx138("p", { className: "text-sm", children: t("settings:provider.noSavedHint") })
|
|
@@ -124836,7 +125178,7 @@ function ProviderSection({
|
|
|
124836
125178
|
// src/components/SettingsPanel/RoutingSection.tsx
|
|
124837
125179
|
init_i18n();
|
|
124838
125180
|
import { Layers as Layers8 } from "lucide-react";
|
|
124839
|
-
import { useCallback as
|
|
125181
|
+
import { useCallback as useCallback42, useState as useState84 } from "react";
|
|
124840
125182
|
|
|
124841
125183
|
// src/lib/model-matrix-routes.ts
|
|
124842
125184
|
var MODEL_MATRIX_DEFAULT_ROUTE = "*";
|
|
@@ -124923,11 +125265,11 @@ function RoutingSection({ syncPref, candidates }) {
|
|
|
124923
125265
|
const [newRouteReasoningMode, setNewRouteReasoningMode] = useState84("");
|
|
124924
125266
|
const [newRouteReasoningEffort, setNewRouteReasoningEffort] = useState84("");
|
|
124925
125267
|
const [newRoutePreserve, setNewRoutePreserve] = useState84("");
|
|
124926
|
-
const setModelMatrix =
|
|
125268
|
+
const setModelMatrix = useCallback42(
|
|
124927
125269
|
(next) => syncPref("modelMatrix", next),
|
|
124928
125270
|
[syncPref]
|
|
124929
125271
|
);
|
|
124930
|
-
const addModelRoute =
|
|
125272
|
+
const addModelRoute = useCallback42(() => {
|
|
124931
125273
|
const key = newRouteKey.trim();
|
|
124932
125274
|
const target = newRouteTarget.trim();
|
|
124933
125275
|
const runtime = buildRouteRuntime(
|
|
@@ -124958,14 +125300,14 @@ function RoutingSection({ syncPref, candidates }) {
|
|
|
124958
125300
|
newRouteTarget,
|
|
124959
125301
|
setModelMatrix
|
|
124960
125302
|
]);
|
|
124961
|
-
const removeModelRoute =
|
|
125303
|
+
const removeModelRoute = useCallback42(
|
|
124962
125304
|
(key) => {
|
|
124963
125305
|
const { [key]: _removed, ...rest } = localPrefs.modelMatrix;
|
|
124964
125306
|
setModelMatrix(rest);
|
|
124965
125307
|
},
|
|
124966
125308
|
[localPrefs.modelMatrix, setModelMatrix]
|
|
124967
125309
|
);
|
|
124968
|
-
const updateModelRouteReasoning =
|
|
125310
|
+
const updateModelRouteReasoning = useCallback42(
|
|
124969
125311
|
(key, field, value) => {
|
|
124970
125312
|
const matrix = { ...localPrefs.modelMatrix };
|
|
124971
125313
|
const entry = { ...matrix[key] ?? {} };
|
|
@@ -125174,8 +125516,8 @@ init_useWebSocket();
|
|
|
125174
125516
|
init_i18n();
|
|
125175
125517
|
init_utils();
|
|
125176
125518
|
init_stores();
|
|
125177
|
-
import { ArrowDown as ArrowDown4, ArrowUp as ArrowUp4, Brain as Brain12, Loader2 as
|
|
125178
|
-
import { useCallback as
|
|
125519
|
+
import { ArrowDown as ArrowDown4, ArrowUp as ArrowUp4, Brain as Brain12, Loader2 as Loader223, Plus as Plus13, X as X24 } from "lucide-react";
|
|
125520
|
+
import { useCallback as useCallback43, useEffect as useEffect82, useMemo as useMemo42, useState as useState85 } from "react";
|
|
125179
125521
|
init_badge();
|
|
125180
125522
|
init_button();
|
|
125181
125523
|
|
|
@@ -125375,14 +125717,14 @@ function BrainSection() {
|
|
|
125375
125717
|
offConfig();
|
|
125376
125718
|
};
|
|
125377
125719
|
}, [client2, t, sessionId]);
|
|
125378
|
-
const sendPatch =
|
|
125720
|
+
const sendPatch = useCallback43(
|
|
125379
125721
|
(patch) => {
|
|
125380
125722
|
setBusy(true);
|
|
125381
125723
|
client2.send({ type: "brain.config.set", payload: client2.withSession({ patch }) });
|
|
125382
125724
|
},
|
|
125383
125725
|
[client2]
|
|
125384
125726
|
);
|
|
125385
|
-
const handleRiskChange =
|
|
125727
|
+
const handleRiskChange = useCallback43(
|
|
125386
125728
|
(level) => {
|
|
125387
125729
|
setConfig((prev) => prev ? { ...prev, maxAutoRisk: level } : prev);
|
|
125388
125730
|
sendPatch({ maxAutoRisk: level });
|
|
@@ -125390,7 +125732,7 @@ function BrainSection() {
|
|
|
125390
125732
|
[sendPatch]
|
|
125391
125733
|
);
|
|
125392
125734
|
const voters = useMemo42(() => config?.council.voters ?? [], [config]);
|
|
125393
|
-
const setVoters =
|
|
125735
|
+
const setVoters = useCallback43(
|
|
125394
125736
|
(next) => {
|
|
125395
125737
|
sendPatch({ council: { voters: next.length > 0 ? next : null } });
|
|
125396
125738
|
},
|
|
@@ -125403,7 +125745,7 @@ function BrainSection() {
|
|
|
125403
125745
|
const riskLevel = RISK_LEVELS.includes(
|
|
125404
125746
|
config?.maxAutoRisk ?? ""
|
|
125405
125747
|
) ? config?.maxAutoRisk ?? "medium" : "medium";
|
|
125406
|
-
const handleModelPicked =
|
|
125748
|
+
const handleModelPicked = useCallback43(
|
|
125407
125749
|
(candidate) => {
|
|
125408
125750
|
if (!config || !pickTarget) return void 0;
|
|
125409
125751
|
const ref = `${candidate.provider}/${candidate.model}`;
|
|
@@ -125448,7 +125790,7 @@ function BrainSection() {
|
|
|
125448
125790
|
/* @__PURE__ */ jsx141("h3", { className: "text-base font-semibold", children: t("settings:brain.heading") }),
|
|
125449
125791
|
/* @__PURE__ */ jsx141("p", { className: "text-xs text-muted-foreground", children: t("settings:brain.headingHint") })
|
|
125450
125792
|
] }),
|
|
125451
|
-
(loading || busy) && /* @__PURE__ */ jsx141(
|
|
125793
|
+
(loading || busy) && /* @__PURE__ */ jsx141(Loader223, { className: "ml-auto h-4 w-4 animate-spin text-muted-foreground" })
|
|
125452
125794
|
] }),
|
|
125453
125795
|
persistError && /* @__PURE__ */ jsx141("div", { className: "rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive", children: persistError }),
|
|
125454
125796
|
/* @__PURE__ */ jsxs132("div", { className: "space-y-2 rounded-md border border-border/70 bg-muted/20 p-3", children: [
|
|
@@ -126265,8 +126607,8 @@ init_i18n();
|
|
|
126265
126607
|
init_badge();
|
|
126266
126608
|
init_button();
|
|
126267
126609
|
init_input();
|
|
126268
|
-
import { ChevronDown as ChevronDown20, Loader2 as
|
|
126269
|
-
import { useCallback as
|
|
126610
|
+
import { ChevronDown as ChevronDown20, Loader2 as Loader224, Power, PowerOff, Search as Search13, Wrench as Wrench15 } from "lucide-react";
|
|
126611
|
+
import { useCallback as useCallback44, useEffect as useEffect83, useState as useState86 } from "react";
|
|
126270
126612
|
import { jsx as jsx143, jsxs as jsxs134 } from "react/jsx-runtime";
|
|
126271
126613
|
function StatusDot2({ disabled, direct }) {
|
|
126272
126614
|
const color = disabled ? "bg-muted-foreground" : direct ? "bg-success" : "bg-info";
|
|
@@ -126304,7 +126646,7 @@ function ToolRow2({
|
|
|
126304
126646
|
onClick: onToggle,
|
|
126305
126647
|
disabled: busy,
|
|
126306
126648
|
children: [
|
|
126307
|
-
busy ? /* @__PURE__ */ jsx143(
|
|
126649
|
+
busy ? /* @__PURE__ */ jsx143(Loader224, { className: "h-3 w-3 animate-spin" }) : tool.disabled ? /* @__PURE__ */ jsx143(PowerOff, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx143(Power, { className: "h-3 w-3" }),
|
|
126308
126650
|
tool.disabled ? "Enable" : "Disable"
|
|
126309
126651
|
]
|
|
126310
126652
|
}
|
|
@@ -126377,7 +126719,7 @@ function ToolsSection() {
|
|
|
126377
126719
|
useEffect83(() => {
|
|
126378
126720
|
client2.send({ type: "tools.list" }, { echoToChat: false });
|
|
126379
126721
|
}, [client2]);
|
|
126380
|
-
const handleToggle =
|
|
126722
|
+
const handleToggle = useCallback44(
|
|
126381
126723
|
(name, currentlyDisabled) => {
|
|
126382
126724
|
setBusyMap((prev) => new Set(prev).add(name));
|
|
126383
126725
|
client2.send({
|
|
@@ -126424,7 +126766,7 @@ function ToolsSection() {
|
|
|
126424
126766
|
)
|
|
126425
126767
|
] }),
|
|
126426
126768
|
loading ? /* @__PURE__ */ jsxs134("div", { className: "flex items-center justify-center py-8 text-muted-foreground gap-2", children: [
|
|
126427
|
-
/* @__PURE__ */ jsx143(
|
|
126769
|
+
/* @__PURE__ */ jsx143(Loader224, { className: "h-4 w-4 animate-spin" }),
|
|
126428
126770
|
t("activity:toolsSec.loadingTools")
|
|
126429
126771
|
] }) : filtered.length === 0 ? /* @__PURE__ */ jsx143("p", { className: "text-sm text-muted-foreground py-4 text-center", children: filter ? `No tools matching "${filter}".` : "No tools registered." }) : /* @__PURE__ */ jsxs134("div", { className: "relative overflow-hidden rounded-lg border border-border/70 bg-background/35 shadow-inner", children: [
|
|
126430
126772
|
/* @__PURE__ */ jsx143(
|
|
@@ -126614,7 +126956,7 @@ function SettingsPanel() {
|
|
|
126614
126956
|
const localPrefs = useLocalPrefs();
|
|
126615
126957
|
const { t } = useTranslation();
|
|
126616
126958
|
const fallbackCandidates = useProviderModels(true);
|
|
126617
|
-
const syncPref =
|
|
126959
|
+
const syncPref = useCallback45(
|
|
126618
126960
|
(key, value) => {
|
|
126619
126961
|
syncSettingsPreference(localPrefs, updatePrefs, switchContextMode, key, value);
|
|
126620
126962
|
},
|
|
@@ -126629,7 +126971,7 @@ function SettingsPanel() {
|
|
|
126629
126971
|
const [providerTab, setProviderTab] = useState87("catalog");
|
|
126630
126972
|
const [catalogQuery, setCatalogQuery] = useState87("");
|
|
126631
126973
|
const [resetOpen, setResetOpen] = useState87(false);
|
|
126632
|
-
const resetConfirm =
|
|
126974
|
+
const resetConfirm = useCallback45(() => {
|
|
126633
126975
|
localPrefs.reset();
|
|
126634
126976
|
setResetOpen(false);
|
|
126635
126977
|
window.location.reload();
|
|
@@ -126674,7 +127016,7 @@ function SettingsPanel() {
|
|
|
126674
127016
|
off3?.();
|
|
126675
127017
|
};
|
|
126676
127018
|
}, [wsConnected, wsClient]);
|
|
126677
|
-
const handleProviderSelect =
|
|
127019
|
+
const handleProviderSelect = useCallback45(
|
|
126678
127020
|
(providerId) => {
|
|
126679
127021
|
setProvider(providerId);
|
|
126680
127022
|
if (!catalogModels[providerId]) {
|
|
@@ -126684,7 +127026,7 @@ function SettingsPanel() {
|
|
|
126684
127026
|
},
|
|
126685
127027
|
[catalogModels, setProvider, ws]
|
|
126686
127028
|
);
|
|
126687
|
-
const handleModelSelect =
|
|
127029
|
+
const handleModelSelect = useCallback45(
|
|
126688
127030
|
async (modelId) => {
|
|
126689
127031
|
if (modelSwitchingRef.current) return;
|
|
126690
127032
|
const prevModel = useConfigStore.getState().model;
|
|
@@ -126716,37 +127058,37 @@ function SettingsPanel() {
|
|
|
126716
127058
|
},
|
|
126717
127059
|
[setModel, ws]
|
|
126718
127060
|
);
|
|
126719
|
-
const handleAddKey =
|
|
127061
|
+
const handleAddKey = useCallback45(
|
|
126720
127062
|
(providerId, label, value) => {
|
|
126721
127063
|
ws.addKey?.(providerId, label, value);
|
|
126722
127064
|
},
|
|
126723
127065
|
[ws]
|
|
126724
127066
|
);
|
|
126725
|
-
const handleDeleteKey =
|
|
127067
|
+
const handleDeleteKey = useCallback45(
|
|
126726
127068
|
(providerId, label) => {
|
|
126727
127069
|
ws.deleteKey?.(providerId, label);
|
|
126728
127070
|
},
|
|
126729
127071
|
[ws]
|
|
126730
127072
|
);
|
|
126731
|
-
const handleSetActiveKey =
|
|
127073
|
+
const handleSetActiveKey = useCallback45(
|
|
126732
127074
|
(providerId, label) => {
|
|
126733
127075
|
ws.setActiveKey?.(providerId, label);
|
|
126734
127076
|
},
|
|
126735
127077
|
[ws]
|
|
126736
127078
|
);
|
|
126737
|
-
const handleAddProvider =
|
|
127079
|
+
const handleAddProvider = useCallback45(
|
|
126738
127080
|
(id, family, baseUrl, apiKey, models, customModels) => {
|
|
126739
127081
|
ws.addProvider?.(id, family, baseUrl, apiKey, models, customModels);
|
|
126740
127082
|
},
|
|
126741
127083
|
[ws]
|
|
126742
127084
|
);
|
|
126743
|
-
const handleRemoveProvider =
|
|
127085
|
+
const handleRemoveProvider = useCallback45(
|
|
126744
127086
|
(providerId) => {
|
|
126745
127087
|
ws.removeProvider?.(providerId);
|
|
126746
127088
|
},
|
|
126747
127089
|
[ws]
|
|
126748
127090
|
);
|
|
126749
|
-
const handlePickProviderModel =
|
|
127091
|
+
const handlePickProviderModel = useCallback45(
|
|
126750
127092
|
(providerId, modelId) => {
|
|
126751
127093
|
ws.client.updateProvider({ id: providerId, models: [modelId] });
|
|
126752
127094
|
if (providerId === useConfigStore.getState().provider) {
|
|
@@ -126910,12 +127252,12 @@ import { useEffect as useEffect92, useMemo as useMemo44, useState as useState95
|
|
|
126910
127252
|
// src/hooks/useGitInfo.ts
|
|
126911
127253
|
init_stores();
|
|
126912
127254
|
init_useWebSocket();
|
|
126913
|
-
import { useCallback as
|
|
127255
|
+
import { useCallback as useCallback46, useEffect as useEffect85, useRef as useRef44 } from "react";
|
|
126914
127256
|
function useGitInfo() {
|
|
126915
127257
|
const info = useGitInfoStore((s) => s.info);
|
|
126916
127258
|
const { client: client2 } = useWebSocket();
|
|
126917
127259
|
const intervalRef = useRef44(null);
|
|
126918
|
-
const fetch2 =
|
|
127260
|
+
const fetch2 = useCallback46(() => {
|
|
126919
127261
|
client2?.getGitInfo?.();
|
|
126920
127262
|
}, [client2]);
|
|
126921
127263
|
useEffect85(() => {
|
|
@@ -127421,7 +127763,7 @@ init_agent_status();
|
|
|
127421
127763
|
init_utils();
|
|
127422
127764
|
init_stores();
|
|
127423
127765
|
import { Bot as Bot15, Check as Check23, Clock as Clock10, Copy as Copy7, Cpu as Cpu15, MessageSquare as MessageSquare8, Wrench as Wrench16, XCircle as XCircle7 } from "lucide-react";
|
|
127424
|
-
import { useCallback as
|
|
127766
|
+
import { useCallback as useCallback47, useMemo as useMemo43, useState as useState89 } from "react";
|
|
127425
127767
|
import { jsx as jsx147, jsxs as jsxs138 } from "react/jsx-runtime";
|
|
127426
127768
|
var STATUS_CONFIG = {
|
|
127427
127769
|
running: {
|
|
@@ -127462,7 +127804,7 @@ function FleetPanel({ className }) {
|
|
|
127462
127804
|
arr.sort(compareAgentsByActivity);
|
|
127463
127805
|
return arr;
|
|
127464
127806
|
}, [agents, currentSessionId]);
|
|
127465
|
-
const handleCopy =
|
|
127807
|
+
const handleCopy = useCallback47(async (id, text4) => {
|
|
127466
127808
|
try {
|
|
127467
127809
|
await navigator.clipboard.writeText(text4);
|
|
127468
127810
|
setCopiedId(id);
|
|
@@ -127470,7 +127812,7 @@ function FleetPanel({ className }) {
|
|
|
127470
127812
|
} catch {
|
|
127471
127813
|
}
|
|
127472
127814
|
}, []);
|
|
127473
|
-
const openAgentTab =
|
|
127815
|
+
const openAgentTab = useCallback47(
|
|
127474
127816
|
(agentId) => {
|
|
127475
127817
|
useUIStore.getState().setSubagentChatFocus(agentId, currentSessionId ?? void 0);
|
|
127476
127818
|
useUIStore.getState().setDockSection(null);
|
|
@@ -127796,7 +128138,7 @@ init_ws_client();
|
|
|
127796
128138
|
init_stores();
|
|
127797
128139
|
init_chat_lanes();
|
|
127798
128140
|
import { CheckCircle2 as CheckCircle217, Circle as Circle5, Clock as Clock12, Trash2 as Trash214 } from "lucide-react";
|
|
127799
|
-
import { useCallback as
|
|
128141
|
+
import { useCallback as useCallback48, useEffect as useEffect88, useLayoutEffect as useLayoutEffect5, useRef as useRef46, useState as useState91 } from "react";
|
|
127800
128142
|
import { jsx as jsx149, jsxs as jsxs140 } from "react/jsx-runtime";
|
|
127801
128143
|
var STATUS_ORDER = {
|
|
127802
128144
|
in_progress: 0,
|
|
@@ -127829,13 +128171,13 @@ function TodosPanel() {
|
|
|
127829
128171
|
useEffect88(() => {
|
|
127830
128172
|
if (sessionId) ws.send({ type: "todos.get", payload: { sessionId } });
|
|
127831
128173
|
}, [sessionId, ws]);
|
|
127832
|
-
const handleRemove =
|
|
128174
|
+
const handleRemove = useCallback48(
|
|
127833
128175
|
(id) => {
|
|
127834
128176
|
ws.removeTodo(id);
|
|
127835
128177
|
},
|
|
127836
128178
|
[ws]
|
|
127837
128179
|
);
|
|
127838
|
-
const handleToggle =
|
|
128180
|
+
const handleToggle = useCallback48(
|
|
127839
128181
|
(t2) => {
|
|
127840
128182
|
if (t2.status === "in_progress") return;
|
|
127841
128183
|
const next = t2.status === "completed" ? "pending" : "completed";
|
|
@@ -127960,7 +128302,7 @@ init_ws_client();
|
|
|
127960
128302
|
init_stores();
|
|
127961
128303
|
init_chat_lanes();
|
|
127962
128304
|
import { CheckCircle2 as CheckCircle218, Circle as Circle6, Clock as Clock13, Pause as Pause4, RotateCcw as RotateCcw9, XCircle as XCircle8 } from "lucide-react";
|
|
127963
|
-
import { useCallback as
|
|
128305
|
+
import { useCallback as useCallback49, useEffect as useEffect89, useLayoutEffect as useLayoutEffect6, useRef as useRef47, useState as useState92 } from "react";
|
|
127964
128306
|
import { jsx as jsx150, jsxs as jsxs141 } from "react/jsx-runtime";
|
|
127965
128307
|
var STATUS_CONFIG2 = {
|
|
127966
128308
|
pending: {
|
|
@@ -128043,7 +128385,7 @@ function TasksPanel() {
|
|
|
128043
128385
|
off();
|
|
128044
128386
|
};
|
|
128045
128387
|
}, [sessionId, ws]);
|
|
128046
|
-
const toggle =
|
|
128388
|
+
const toggle = useCallback49((key) => {
|
|
128047
128389
|
setCollapsed((prev) => {
|
|
128048
128390
|
const next = new Set(prev);
|
|
128049
128391
|
if (next.has(key)) next.delete(key);
|
|
@@ -128051,7 +128393,7 @@ function TasksPanel() {
|
|
|
128051
128393
|
return next;
|
|
128052
128394
|
});
|
|
128053
128395
|
}, []);
|
|
128054
|
-
const handleStatusChange =
|
|
128396
|
+
const handleStatusChange = useCallback49(
|
|
128055
128397
|
(taskId, status) => {
|
|
128056
128398
|
ws.updateTaskStatus(taskId, status);
|
|
128057
128399
|
},
|
|
@@ -128196,7 +128538,7 @@ init_ws_client();
|
|
|
128196
128538
|
init_stores();
|
|
128197
128539
|
init_chat_lanes();
|
|
128198
128540
|
import { CheckCircle2 as CheckCircle219, Circle as Circle7, Clock as Clock14 } from "lucide-react";
|
|
128199
|
-
import { useCallback as
|
|
128541
|
+
import { useCallback as useCallback50, useEffect as useEffect90, useLayoutEffect as useLayoutEffect7, useRef as useRef48, useState as useState93 } from "react";
|
|
128200
128542
|
import { jsx as jsx151, jsxs as jsxs142 } from "react/jsx-runtime";
|
|
128201
128543
|
var STATUS_CONFIG3 = {
|
|
128202
128544
|
open: {
|
|
@@ -128250,7 +128592,7 @@ function PlanPanel() {
|
|
|
128250
128592
|
off();
|
|
128251
128593
|
};
|
|
128252
128594
|
}, [sessionId, ws]);
|
|
128253
|
-
const toggle =
|
|
128595
|
+
const toggle = useCallback50((key) => {
|
|
128254
128596
|
setCollapsed((prev) => {
|
|
128255
128597
|
const next = new Set(prev);
|
|
128256
128598
|
if (next.has(key)) next.delete(key);
|
|
@@ -128258,7 +128600,7 @@ function PlanPanel() {
|
|
|
128258
128600
|
return next;
|
|
128259
128601
|
});
|
|
128260
128602
|
}, []);
|
|
128261
|
-
const handleStatusChange =
|
|
128603
|
+
const handleStatusChange = useCallback50(
|
|
128262
128604
|
(item, status) => {
|
|
128263
128605
|
ws.updatePlanItem(item.id, status);
|
|
128264
128606
|
},
|
|
@@ -129055,7 +129397,7 @@ import {
|
|
|
129055
129397
|
Wifi as Wifi6,
|
|
129056
129398
|
WifiOff as WifiOff4
|
|
129057
129399
|
} from "lucide-react";
|
|
129058
|
-
import { useCallback as
|
|
129400
|
+
import { useCallback as useCallback88, useEffect as useEffect144, useState as useState164 } from "react";
|
|
129059
129401
|
|
|
129060
129402
|
// src/hooks/useIntegrationStatus.ts
|
|
129061
129403
|
init_local_prefs();
|
|
@@ -129244,7 +129586,7 @@ import {
|
|
|
129244
129586
|
X as X62,
|
|
129245
129587
|
XCircle as XCircle16
|
|
129246
129588
|
} from "lucide-react";
|
|
129247
|
-
import { useCallback as
|
|
129589
|
+
import { useCallback as useCallback87, useMemo as useMemo86, useState as useState163 } from "react";
|
|
129248
129590
|
import { jsx as jsx286, jsxs as jsxs275 } from "react/jsx-runtime";
|
|
129249
129591
|
function formatRelativeTime(timestamp2, t) {
|
|
129250
129592
|
const diff = Math.max(0, Date.now() - timestamp2);
|
|
@@ -129398,10 +129740,10 @@ function NotificationMenu({
|
|
|
129398
129740
|
}
|
|
129399
129741
|
return notifications;
|
|
129400
129742
|
}, [notifications, tab]);
|
|
129401
|
-
const handleMarkAllRead =
|
|
129743
|
+
const handleMarkAllRead = useCallback87(() => {
|
|
129402
129744
|
markAllAsRead();
|
|
129403
129745
|
}, [markAllAsRead]);
|
|
129404
|
-
const handleClearAll =
|
|
129746
|
+
const handleClearAll = useCallback87(() => {
|
|
129405
129747
|
clearAll();
|
|
129406
129748
|
}, [clearAll]);
|
|
129407
129749
|
return /* @__PURE__ */ jsxs275(DropdownMenu, { defaultOpen, open, onOpenChange, children: [
|
|
@@ -129593,7 +129935,7 @@ function WorkbenchTopbar({
|
|
|
129593
129935
|
const updateAvailable = useSessionStore((s) => s.updateAvailable);
|
|
129594
129936
|
const droppedTools = useSessionStore((s) => s.droppedTools);
|
|
129595
129937
|
const effectiveTheme = theme === "system" ? typeof window !== "undefined" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : theme;
|
|
129596
|
-
const toggleTheme =
|
|
129938
|
+
const toggleTheme = useCallback88(() => {
|
|
129597
129939
|
setTheme(effectiveTheme === "dark" ? "light" : "dark");
|
|
129598
129940
|
}, [effectiveTheme, setTheme]);
|
|
129599
129941
|
const toggleSidebar = useUIStore((s) => s.toggleSidebar);
|