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