antri_cli 1.57.28 → 1.57.31
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/cli/banner.d.ts.map +1 -1
- package/dist/cli/banner.js +9 -2
- package/dist/cli/banner.js.map +1 -1
- package/dist/cli/prompt.d.ts.map +1 -1
- package/dist/cli/prompt.js +4 -0
- package/dist/cli/prompt.js.map +1 -1
- package/dist/cli/promptToolkit.d.ts.map +1 -1
- package/dist/cli/promptToolkit.js +1 -1
- package/dist/cli/promptToolkit.js.map +1 -1
- package/dist/cli/renderer.d.ts +8 -0
- package/dist/cli/renderer.d.ts.map +1 -1
- package/dist/cli/renderer.js +77 -0
- package/dist/cli/renderer.js.map +1 -1
- package/dist/core/agent.d.ts +5 -0
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js +1122 -32
- package/dist/core/agent.js.map +1 -1
- package/dist/core/artifactManager.d.ts.map +1 -1
- package/dist/core/artifactManager.js +105 -21
- package/dist/core/artifactManager.js.map +1 -1
- package/dist/core/codebaseBreather.d.ts +46 -0
- package/dist/core/codebaseBreather.d.ts.map +1 -0
- package/dist/core/codebaseBreather.js +310 -0
- package/dist/core/codebaseBreather.js.map +1 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +6 -2
- package/dist/core/config.js.map +1 -1
- package/dist/core/dialectic.d.ts.map +1 -1
- package/dist/core/dialectic.js +67 -45
- package/dist/core/dialectic.js.map +1 -1
- package/dist/core/tools.d.ts +5 -0
- package/dist/core/tools.d.ts.map +1 -1
- package/dist/core/tools.js +147 -46
- package/dist/core/tools.js.map +1 -1
- package/dist/core/updater.d.ts +1 -1
- package/dist/core/updater.js +1 -1
- package/dist/desktop/public/app.js +276 -6
- package/dist/desktop/public/index.html +149 -1
- package/dist/desktop/public/style.css +356 -0
- package/dist/desktop/server.d.ts.map +1 -1
- package/dist/desktop/server.js +75 -0
- package/dist/desktop/server.js.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/mobile/public/app.js +1 -1
- package/dist/providers/index.js +1 -1
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/models.d.ts.map +1 -1
- package/dist/providers/models.js +2 -4
- package/dist/providers/models.js.map +1 -1
- package/dist/providers/openai.d.ts.map +1 -1
- package/dist/providers/openai.js +19 -3
- package/dist/providers/openai.js.map +1 -1
- package/dist/skills/skillManager.d.ts.map +1 -1
- package/dist/skills/skillManager.js +216 -226
- package/dist/skills/skillManager.js.map +1 -1
- package/package.json +4 -1
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<header class="app-header">
|
|
16
16
|
<div class="brand-zone">
|
|
17
17
|
<span class="logo-mark">ANTRI</span>
|
|
18
|
-
<span class="version-tag">v1.57.
|
|
18
|
+
<span class="version-tag">v1.57.31</span>
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
21
|
<!-- Mode Toggle -->
|
|
@@ -79,6 +79,15 @@
|
|
|
79
79
|
<button class="nav-item active" onclick="showTab('chat')">
|
|
80
80
|
<span class="nav-label">Agent Studio</span>
|
|
81
81
|
</button>
|
|
82
|
+
<button class="nav-item" onclick="showTab('codebase')">
|
|
83
|
+
<span class="nav-label">🫁 Codebase Radar</span>
|
|
84
|
+
</button>
|
|
85
|
+
<button class="nav-item" onclick="showTab('workspace')">
|
|
86
|
+
<span class="nav-label">💻 Code Workspace</span>
|
|
87
|
+
</button>
|
|
88
|
+
<button class="nav-item" onclick="showTab('timeline')">
|
|
89
|
+
<span class="nav-label">🧠 Thinking Timeline</span>
|
|
90
|
+
</button>
|
|
82
91
|
<button class="nav-item" onclick="showTab('dialectic')">
|
|
83
92
|
<span class="nav-label">Dialectic Arena</span>
|
|
84
93
|
</button>
|
|
@@ -497,6 +506,145 @@
|
|
|
497
506
|
</div>
|
|
498
507
|
</section>
|
|
499
508
|
|
|
509
|
+
<!-- TAB 9: Codebase Intelligence Radar (Desktop Exclusive) -->
|
|
510
|
+
<section id="tab-codebase" class="tab-panel">
|
|
511
|
+
<div class="panel-header">
|
|
512
|
+
<div class="panel-title-group">
|
|
513
|
+
<h2 class="panel-title">🫁 Codebase Intelligence Radar</h2>
|
|
514
|
+
<p class="panel-subtitle">Pre-analyzed codebase cache, technology stack matrix, subsystem modules, and Git workspace status.</p>
|
|
515
|
+
</div>
|
|
516
|
+
<button class="action-btn" id="btn-codebase-breathe" onclick="triggerCodebaseBreathe()">🫁 Breathe & Re-Index Codebase</button>
|
|
517
|
+
</div>
|
|
518
|
+
|
|
519
|
+
<div id="codebase-breathing-bar" class="breathing-progress-bar hidden">
|
|
520
|
+
<div class="breathing-pulse-indicator">✨ ANTRI is breathing... Analyzing codebase architecture & indexing context...</div>
|
|
521
|
+
</div>
|
|
522
|
+
|
|
523
|
+
<div id="codebase-dashboard-content" class="codebase-dashboard-layout">
|
|
524
|
+
<!-- Populated dynamically via loadCodebaseTab() -->
|
|
525
|
+
</div>
|
|
526
|
+
</section>
|
|
527
|
+
|
|
528
|
+
<!-- TAB 10: Code Workspace & Live File Editor (Desktop Exclusive) -->
|
|
529
|
+
<section id="tab-workspace" class="tab-panel">
|
|
530
|
+
<div class="panel-header">
|
|
531
|
+
<div class="panel-title-group">
|
|
532
|
+
<h2 class="panel-title">💻 Live Code Workspace & Playground</h2>
|
|
533
|
+
<p class="panel-subtitle">Browse workspace files, edit source code directly, and preview live HTML artifacts in real-time sandbox.</p>
|
|
534
|
+
</div>
|
|
535
|
+
<div style="display:flex;gap:8px;">
|
|
536
|
+
<button class="action-btn-secondary" onclick="loadWorkspaceTree()">⟳ Refresh Tree</button>
|
|
537
|
+
<button class="action-btn" id="btn-save-workspace-file" onclick="saveWorkspaceFile()">💾 Save File</button>
|
|
538
|
+
</div>
|
|
539
|
+
</div>
|
|
540
|
+
|
|
541
|
+
<div class="workspace-editor-layout">
|
|
542
|
+
<!-- Left: File Tree Browser -->
|
|
543
|
+
<div class="workspace-tree-sidebar">
|
|
544
|
+
<div class="tree-header">
|
|
545
|
+
<span>Workspace Files</span>
|
|
546
|
+
</div>
|
|
547
|
+
<div id="workspace-tree-list" class="workspace-tree-list">
|
|
548
|
+
<!-- Populated dynamically via JS -->
|
|
549
|
+
</div>
|
|
550
|
+
</div>
|
|
551
|
+
|
|
552
|
+
<!-- Center/Right: Code Editor & Live Preview -->
|
|
553
|
+
<div class="workspace-code-pane">
|
|
554
|
+
<div class="editor-header">
|
|
555
|
+
<span id="active-workspace-filename" class="active-file-tag">Select a file to inspect or edit</span>
|
|
556
|
+
<div class="device-toggles" id="workspace-device-toggles" style="display:none;">
|
|
557
|
+
<button class="device-btn active" onclick="setSandboxDevice('desktop')">🖥️ Desktop</button>
|
|
558
|
+
<button class="device-btn" onclick="setSandboxDevice('tablet')">📱 Tablet</button>
|
|
559
|
+
<button class="device-btn" onclick="setSandboxDevice('mobile')">📲 Mobile</button>
|
|
560
|
+
</div>
|
|
561
|
+
</div>
|
|
562
|
+
<textarea id="workspace-file-editor" class="profile-textarea code-font" placeholder="// Select a file from the left sidebar to edit..." spellcheck="false"></textarea>
|
|
563
|
+
<div id="workspace-sandbox-container" class="workspace-sandbox-container hidden">
|
|
564
|
+
<iframe id="workspace-sandbox-iframe" sandbox="allow-scripts allow-same-origin allow-popups allow-forms" class="sandbox-iframe"></iframe>
|
|
565
|
+
</div>
|
|
566
|
+
</div>
|
|
567
|
+
</div>
|
|
568
|
+
</section>
|
|
569
|
+
|
|
570
|
+
<!-- TAB 11: Autonomous Thinking Timeline (Desktop Exclusive) -->
|
|
571
|
+
<section id="tab-timeline" class="tab-panel">
|
|
572
|
+
<div class="panel-header">
|
|
573
|
+
<div class="panel-title-group">
|
|
574
|
+
<h2 class="panel-title">🧠 Autonomous Engineering Mission Control</h2>
|
|
575
|
+
<p class="panel-subtitle">Deep multi-stage thinking pipeline, architectural planning protocols, and anti-shallow code verification.</p>
|
|
576
|
+
</div>
|
|
577
|
+
<button class="action-btn" onclick="showTab('chat')">🚀 Start Coding in Studio</button>
|
|
578
|
+
</div>
|
|
579
|
+
|
|
580
|
+
<div class="thinking-timeline-layout">
|
|
581
|
+
<div class="timeline-stage-card">
|
|
582
|
+
<div class="stage-number">01</div>
|
|
583
|
+
<div class="stage-content">
|
|
584
|
+
<h3>🫁 Codebase Breathing & Intelligence Cache Retrieval</h3>
|
|
585
|
+
<p>On boot, ANTRI takes 1-2 seconds to index manifests, technology stack, directory layout, and entrypoints into active memory cache without blocking.</p>
|
|
586
|
+
<div class="stage-tags">
|
|
587
|
+
<span class="badge">1.2s Warmup</span>
|
|
588
|
+
<span class="badge">Project Radar</span>
|
|
589
|
+
<span class="badge">Git Context</span>
|
|
590
|
+
</div>
|
|
591
|
+
</div>
|
|
592
|
+
</div>
|
|
593
|
+
|
|
594
|
+
<div class="timeline-stage-card">
|
|
595
|
+
<div class="stage-number">02</div>
|
|
596
|
+
<div class="stage-content">
|
|
597
|
+
<h3>🏛️ Deep Architectural Blueprint & Type Schema Design</h3>
|
|
598
|
+
<p>Before coding, ANTRI models domain entities, DTOs, data flow, responsive breakpoints, state management, and edge cases to eliminate 4-5 line shallow codebases.</p>
|
|
599
|
+
<div class="stage-tags">
|
|
600
|
+
<span class="badge">Anti-Trivial Mandate</span>
|
|
601
|
+
<span class="badge">TypeScript Strict</span>
|
|
602
|
+
<span class="badge">State Modeling</span>
|
|
603
|
+
</div>
|
|
604
|
+
</div>
|
|
605
|
+
</div>
|
|
606
|
+
|
|
607
|
+
<div class="timeline-stage-card">
|
|
608
|
+
<div class="stage-number">03</div>
|
|
609
|
+
<div class="stage-content">
|
|
610
|
+
<h3>🧱 Modular File Scaffolding & Multi-File Generation</h3>
|
|
611
|
+
<p>Writes real physical source files directly to the project directory (<code>index.html</code>, <code>style.css</code>, <code>app.js</code>, <code>package.json</code>, components) with zero fake placeholders.</p>
|
|
612
|
+
<div class="stage-tags">
|
|
613
|
+
<span class="badge">write_file</span>
|
|
614
|
+
<span class="badge">Multi-File Architecture</span>
|
|
615
|
+
<span class="badge">Zero Placeholders</span>
|
|
616
|
+
</div>
|
|
617
|
+
</div>
|
|
618
|
+
</div>
|
|
619
|
+
|
|
620
|
+
<div class="timeline-stage-card">
|
|
621
|
+
<div class="stage-number">04</div>
|
|
622
|
+
<div class="stage-content">
|
|
623
|
+
<h3>🛡️ Defensive Engineering & High-Craft Polish</h3>
|
|
624
|
+
<p>Integrates Web Audio API sound synthesizers, keyframe animations, Chart.js visualizations, Canvas-Confetti celebrations, and comprehensive error handling.</p>
|
|
625
|
+
<div class="stage-tags">
|
|
626
|
+
<span class="badge">Web Audio API</span>
|
|
627
|
+
<span class="badge">Glassmorphism</span>
|
|
628
|
+
<span class="badge">Tactile UX</span>
|
|
629
|
+
</div>
|
|
630
|
+
</div>
|
|
631
|
+
</div>
|
|
632
|
+
|
|
633
|
+
<div class="timeline-stage-card">
|
|
634
|
+
<div class="stage-number">05</div>
|
|
635
|
+
<div class="stage-content">
|
|
636
|
+
<h3>🌐 Dual-Delivery Synergy</h3>
|
|
637
|
+
<p>Real production files safely persisted on disk for deployment & Git, plus instant interactive single-page application artifact for in-chat desktop preview.</p>
|
|
638
|
+
<div class="stage-tags">
|
|
639
|
+
<span class="badge">Disk Source Files</span>
|
|
640
|
+
<span class="badge">Live Artifact Sandbox</span>
|
|
641
|
+
<span class="badge">Instant Testing</span>
|
|
642
|
+
</div>
|
|
643
|
+
</div>
|
|
644
|
+
</div>
|
|
645
|
+
</div>
|
|
646
|
+
</section>
|
|
647
|
+
|
|
500
648
|
</main>
|
|
501
649
|
</div>
|
|
502
650
|
|
|
@@ -1804,5 +1804,361 @@ body.antri-app {
|
|
|
1804
1804
|
margin-top: 12px;
|
|
1805
1805
|
}
|
|
1806
1806
|
|
|
1807
|
+
/* 🫁 CODEBASE INTELLIGENCE RADAR STYLES */
|
|
1808
|
+
.breathing-progress-bar {
|
|
1809
|
+
background: linear-gradient(90deg, rgba(168, 85, 247, 0.15), rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.15));
|
|
1810
|
+
border: 1px solid rgba(168, 85, 247, 0.4);
|
|
1811
|
+
border-radius: var(--radius-sm);
|
|
1812
|
+
padding: 12px 16px;
|
|
1813
|
+
margin-bottom: 1.5rem;
|
|
1814
|
+
animation: breathingGlow 2s infinite ease-in-out;
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
@keyframes breathingGlow {
|
|
1818
|
+
0%, 100% { box-shadow: 0 0 10px rgba(168, 85, 247, 0.2); }
|
|
1819
|
+
50% { box-shadow: 0 0 25px rgba(168, 85, 247, 0.5); }
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
.breathing-pulse-indicator {
|
|
1823
|
+
font-weight: 600;
|
|
1824
|
+
font-size: 0.9rem;
|
|
1825
|
+
color: #c084fc;
|
|
1826
|
+
text-align: center;
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
.codebase-dashboard-layout {
|
|
1830
|
+
display: flex;
|
|
1831
|
+
flex-direction: column;
|
|
1832
|
+
gap: 1.5rem;
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
.codebase-hero-card {
|
|
1836
|
+
background: var(--bg-card);
|
|
1837
|
+
border: 1px solid var(--border-main);
|
|
1838
|
+
border-radius: var(--radius-md);
|
|
1839
|
+
padding: 1.5rem;
|
|
1840
|
+
display: flex;
|
|
1841
|
+
justify-content: space-between;
|
|
1842
|
+
align-items: center;
|
|
1843
|
+
flex-wrap: wrap;
|
|
1844
|
+
gap: 1.5rem;
|
|
1845
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
.project-identity {
|
|
1849
|
+
display: flex;
|
|
1850
|
+
align-items: center;
|
|
1851
|
+
gap: 10px;
|
|
1852
|
+
margin-bottom: 10px;
|
|
1853
|
+
flex-wrap: wrap;
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
.project-title {
|
|
1857
|
+
font-size: 1.4rem;
|
|
1858
|
+
font-weight: 800;
|
|
1859
|
+
color: var(--text-primary);
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
.project-version {
|
|
1863
|
+
font-size: 0.85rem;
|
|
1864
|
+
color: var(--text-muted);
|
|
1865
|
+
font-family: var(--font-mono);
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
.tech-stack-row {
|
|
1869
|
+
display: flex;
|
|
1870
|
+
gap: 6px;
|
|
1871
|
+
flex-wrap: wrap;
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
.tech-pill {
|
|
1875
|
+
background: var(--bg-subtle);
|
|
1876
|
+
border: 1px solid var(--border-main);
|
|
1877
|
+
color: var(--text-primary);
|
|
1878
|
+
font-size: 0.76rem;
|
|
1879
|
+
font-weight: 600;
|
|
1880
|
+
padding: 3px 8px;
|
|
1881
|
+
border-radius: var(--radius-xs);
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
.hero-stats-grid {
|
|
1885
|
+
display: flex;
|
|
1886
|
+
gap: 1.5rem;
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
.stat-box {
|
|
1890
|
+
background: var(--bg-subtle);
|
|
1891
|
+
border: 1px solid var(--border-main);
|
|
1892
|
+
border-radius: var(--radius-sm);
|
|
1893
|
+
padding: 10px 18px;
|
|
1894
|
+
text-align: center;
|
|
1895
|
+
min-width: 100px;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
.stat-number {
|
|
1899
|
+
display: block;
|
|
1900
|
+
font-size: 1.4rem;
|
|
1901
|
+
font-weight: 800;
|
|
1902
|
+
color: var(--accent-primary);
|
|
1903
|
+
}
|
|
1904
|
+
|
|
1905
|
+
.stat-label {
|
|
1906
|
+
font-size: 0.72rem;
|
|
1907
|
+
color: var(--text-muted);
|
|
1908
|
+
text-transform: uppercase;
|
|
1909
|
+
letter-spacing: 0.05em;
|
|
1910
|
+
font-weight: 600;
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
.git-status-badge {
|
|
1914
|
+
background: var(--bg-card);
|
|
1915
|
+
border: 1px solid var(--border-main);
|
|
1916
|
+
border-radius: var(--radius-sm);
|
|
1917
|
+
padding: 10px 16px;
|
|
1918
|
+
display: flex;
|
|
1919
|
+
gap: 20px;
|
|
1920
|
+
flex-wrap: wrap;
|
|
1921
|
+
font-size: 0.82rem;
|
|
1922
|
+
color: var(--text-secondary);
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
.codebase-columns-grid {
|
|
1926
|
+
display: grid;
|
|
1927
|
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
|
1928
|
+
gap: 1.5rem;
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
.codebase-col-card {
|
|
1932
|
+
background: var(--bg-card);
|
|
1933
|
+
border: 1px solid var(--border-main);
|
|
1934
|
+
border-radius: var(--radius-md);
|
|
1935
|
+
padding: 1.25rem;
|
|
1936
|
+
}
|
|
1937
|
+
|
|
1938
|
+
.codebase-col-card h3 {
|
|
1939
|
+
font-size: 0.95rem;
|
|
1940
|
+
font-weight: 700;
|
|
1941
|
+
color: var(--text-primary);
|
|
1942
|
+
margin-bottom: 1rem;
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
.subsystems-list, .key-files-list {
|
|
1946
|
+
display: flex;
|
|
1947
|
+
flex-direction: column;
|
|
1948
|
+
gap: 8px;
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
.subsystem-item {
|
|
1952
|
+
display: flex;
|
|
1953
|
+
justify-content: space-between;
|
|
1954
|
+
align-items: center;
|
|
1955
|
+
background: var(--bg-subtle);
|
|
1956
|
+
padding: 8px 12px;
|
|
1957
|
+
border-radius: var(--radius-xs);
|
|
1958
|
+
font-size: 0.84rem;
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
.subsystem-name {
|
|
1962
|
+
font-weight: 600;
|
|
1963
|
+
color: var(--text-primary);
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
.subsystem-count {
|
|
1967
|
+
color: var(--text-muted);
|
|
1968
|
+
font-size: 0.76rem;
|
|
1969
|
+
}
|
|
1970
|
+
|
|
1971
|
+
.key-file-tag {
|
|
1972
|
+
background: var(--bg-subtle);
|
|
1973
|
+
padding: 6px 10px;
|
|
1974
|
+
border-radius: var(--radius-xs);
|
|
1975
|
+
font-size: 0.8rem;
|
|
1976
|
+
font-family: var(--font-mono);
|
|
1977
|
+
color: var(--text-primary);
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
.deps-cloud {
|
|
1981
|
+
display: flex;
|
|
1982
|
+
flex-wrap: wrap;
|
|
1983
|
+
gap: 6px;
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
.dep-pill {
|
|
1987
|
+
background: rgba(99, 102, 241, 0.1);
|
|
1988
|
+
border: 1px solid rgba(99, 102, 241, 0.25);
|
|
1989
|
+
color: #818cf8;
|
|
1990
|
+
font-size: 0.76rem;
|
|
1991
|
+
padding: 4px 8px;
|
|
1992
|
+
border-radius: var(--radius-xs);
|
|
1993
|
+
font-family: var(--font-mono);
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
/* 💻 LIVE WORKSPACE & PLAYGROUND STYLES */
|
|
1997
|
+
.workspace-editor-layout {
|
|
1998
|
+
display: grid;
|
|
1999
|
+
grid-template-columns: 260px 1fr;
|
|
2000
|
+
gap: 1.25rem;
|
|
2001
|
+
height: calc(100vh - 200px);
|
|
2002
|
+
}
|
|
2003
|
+
|
|
2004
|
+
.workspace-tree-sidebar {
|
|
2005
|
+
background: var(--bg-card);
|
|
2006
|
+
border: 1px solid var(--border-main);
|
|
2007
|
+
border-radius: var(--radius-md);
|
|
2008
|
+
display: flex;
|
|
2009
|
+
flex-direction: column;
|
|
2010
|
+
overflow: hidden;
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
.tree-header {
|
|
2014
|
+
padding: 10px 14px;
|
|
2015
|
+
border-bottom: 1px solid var(--border-main);
|
|
2016
|
+
font-weight: 700;
|
|
2017
|
+
font-size: 0.84rem;
|
|
2018
|
+
color: var(--text-primary);
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
.workspace-tree-list {
|
|
2022
|
+
padding: 8px;
|
|
2023
|
+
overflow-y: auto;
|
|
2024
|
+
flex: 1;
|
|
2025
|
+
display: flex;
|
|
2026
|
+
flex-direction: column;
|
|
2027
|
+
gap: 4px;
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
.tree-item {
|
|
2031
|
+
display: flex;
|
|
2032
|
+
align-items: center;
|
|
2033
|
+
gap: 8px;
|
|
2034
|
+
padding: 6px 10px;
|
|
2035
|
+
border-radius: var(--radius-xs);
|
|
2036
|
+
font-size: 0.82rem;
|
|
2037
|
+
color: var(--text-secondary);
|
|
2038
|
+
cursor: pointer;
|
|
2039
|
+
transition: all 0.15s;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
.tree-item:hover {
|
|
2043
|
+
background: var(--bg-hover);
|
|
2044
|
+
color: var(--text-primary);
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
.tree-item.active {
|
|
2048
|
+
background: var(--primary-subtle);
|
|
2049
|
+
color: var(--accent-primary);
|
|
2050
|
+
font-weight: 600;
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
.workspace-code-pane {
|
|
2054
|
+
background: var(--bg-card);
|
|
2055
|
+
border: 1px solid var(--border-main);
|
|
2056
|
+
border-radius: var(--radius-md);
|
|
2057
|
+
display: flex;
|
|
2058
|
+
flex-direction: column;
|
|
2059
|
+
overflow: hidden;
|
|
2060
|
+
}
|
|
2061
|
+
|
|
2062
|
+
.active-file-tag {
|
|
2063
|
+
font-size: 0.86rem;
|
|
2064
|
+
font-weight: 600;
|
|
2065
|
+
font-family: var(--font-mono);
|
|
2066
|
+
color: var(--text-primary);
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
.device-toggles {
|
|
2070
|
+
display: flex;
|
|
2071
|
+
gap: 4px;
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
.device-btn {
|
|
2075
|
+
background: var(--bg-subtle);
|
|
2076
|
+
border: 1px solid var(--border-main);
|
|
2077
|
+
color: var(--text-secondary);
|
|
2078
|
+
padding: 4px 8px;
|
|
2079
|
+
border-radius: var(--radius-xs);
|
|
2080
|
+
font-size: 0.76rem;
|
|
2081
|
+
cursor: pointer;
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
.device-btn.active {
|
|
2085
|
+
background: var(--accent-primary);
|
|
2086
|
+
color: var(--text-inverted);
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
.code-font {
|
|
2090
|
+
font-family: var(--font-mono) !important;
|
|
2091
|
+
font-size: 0.85rem !important;
|
|
2092
|
+
line-height: 1.5 !important;
|
|
2093
|
+
flex: 1;
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
.workspace-sandbox-container {
|
|
2097
|
+
height: 45%;
|
|
2098
|
+
border-top: 1px solid var(--border-main);
|
|
2099
|
+
background: #ffffff;
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
.sandbox-iframe {
|
|
2103
|
+
width: 100%;
|
|
2104
|
+
height: 100%;
|
|
2105
|
+
border: none;
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
/* 🧠 THINKING TIMELINE STYLES */
|
|
2109
|
+
.thinking-timeline-layout {
|
|
2110
|
+
display: flex;
|
|
2111
|
+
flex-direction: column;
|
|
2112
|
+
gap: 1.25rem;
|
|
2113
|
+
max-width: 900px;
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
.timeline-stage-card {
|
|
2117
|
+
background: var(--bg-card);
|
|
2118
|
+
border: 1px solid var(--border-main);
|
|
2119
|
+
border-radius: var(--radius-md);
|
|
2120
|
+
padding: 1.5rem;
|
|
2121
|
+
display: flex;
|
|
2122
|
+
gap: 1.5rem;
|
|
2123
|
+
align-items: flex-start;
|
|
2124
|
+
transition: all 0.2s ease;
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
.timeline-stage-card:hover {
|
|
2128
|
+
border-color: var(--accent-primary);
|
|
2129
|
+
transform: translateY(-2px);
|
|
2130
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
.stage-number {
|
|
2134
|
+
font-size: 1.8rem;
|
|
2135
|
+
font-weight: 900;
|
|
2136
|
+
color: var(--accent-primary);
|
|
2137
|
+
opacity: 0.8;
|
|
2138
|
+
font-family: var(--font-mono);
|
|
2139
|
+
min-width: 45px;
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
.stage-content h3 {
|
|
2143
|
+
font-size: 1.1rem;
|
|
2144
|
+
font-weight: 700;
|
|
2145
|
+
color: var(--text-primary);
|
|
2146
|
+
margin-bottom: 0.4rem;
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
.stage-content p {
|
|
2150
|
+
font-size: 0.88rem;
|
|
2151
|
+
color: var(--text-secondary);
|
|
2152
|
+
line-height: 1.5;
|
|
2153
|
+
margin-bottom: 0.8rem;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
.stage-tags {
|
|
2157
|
+
display: flex;
|
|
2158
|
+
gap: 6px;
|
|
2159
|
+
flex-wrap: wrap;
|
|
2160
|
+
}
|
|
2161
|
+
|
|
2162
|
+
|
|
1807
2163
|
|
|
1808
2164
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/desktop/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/desktop/server.ts"],"names":[],"mappings":"AAsCA,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,IAAI,CAAQ;IACpB,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,kBAAkB,CAAiD;IAC3E,OAAO,CAAC,gBAAgB,CAAqD;;IAO7E,OAAO,CAAC,sBAAsB;IA2BjB,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC;IAqExB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YAUpB,SAAS;WAwrBH,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;CAyBnD"}
|
package/dist/desktop/server.js
CHANGED
|
@@ -16,6 +16,7 @@ import { getAllActiveTools, ToolExecutor } from '../core/tools.js';
|
|
|
16
16
|
import { getAvailableModels } from '../providers/models.js';
|
|
17
17
|
import { PROMPT_TOOLKIT_COMMANDS } from '../cli/promptToolkit.js';
|
|
18
18
|
import { FilePickerService } from '../cli/dialogs/filePicker.js';
|
|
19
|
+
import { CodebaseBreather, ProjectContextCache } from '../core/codebaseBreather.js';
|
|
19
20
|
import chalk from 'chalk';
|
|
20
21
|
const __filename = fileURLToPath(import.meta.url);
|
|
21
22
|
const __dirname = path.dirname(__filename);
|
|
@@ -246,6 +247,51 @@ export class DesktopServer {
|
|
|
246
247
|
res.end(JSON.stringify({ artifacts, grouped }));
|
|
247
248
|
return;
|
|
248
249
|
}
|
|
250
|
+
// GET /api/codebase/cache (Codebase Intelligence Radar)
|
|
251
|
+
if (pathname === '/api/codebase/cache' && req.method === 'GET') {
|
|
252
|
+
let cache = ProjectContextCache.get(config.workingDir);
|
|
253
|
+
if (!cache) {
|
|
254
|
+
cache = CodebaseBreather.analyzeCodebase(config.workingDir);
|
|
255
|
+
ProjectContextCache.set(config.workingDir, cache);
|
|
256
|
+
}
|
|
257
|
+
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
258
|
+
res.end(JSON.stringify({ cache }));
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
// GET /api/workspace/tree (Interactive File Explorer Tree)
|
|
262
|
+
if (pathname === '/api/workspace/tree' && req.method === 'GET') {
|
|
263
|
+
const query = url.searchParams.get('query') || '';
|
|
264
|
+
const tree = FilePickerService.listDirectory(config.workingDir, query);
|
|
265
|
+
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
266
|
+
res.end(JSON.stringify(tree));
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
// GET /api/workspace/file (Inspect & View file content)
|
|
270
|
+
if (pathname === '/api/workspace/file' && req.method === 'GET') {
|
|
271
|
+
const relPath = url.searchParams.get('path') || '';
|
|
272
|
+
const fullPath = path.resolve(config.workingDir, relPath);
|
|
273
|
+
if (!fullPath.startsWith(path.resolve(config.workingDir))) {
|
|
274
|
+
res.writeHead(403, { 'Content-Type': 'application/json' });
|
|
275
|
+
res.end(JSON.stringify({ error: 'Access denied' }));
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
try {
|
|
279
|
+
if (fs.existsSync(fullPath) && fs.statSync(fullPath).isFile()) {
|
|
280
|
+
const content = fs.readFileSync(fullPath, 'utf-8');
|
|
281
|
+
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
282
|
+
res.end(JSON.stringify({ success: true, path: relPath, content }));
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
res.writeHead(404, { 'Content-Type': 'application/json' });
|
|
286
|
+
res.end(JSON.stringify({ error: 'File not found' }));
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
catch (err) {
|
|
290
|
+
res.writeHead(500, { 'Content-Type': 'application/json' });
|
|
291
|
+
res.end(JSON.stringify({ error: err.message }));
|
|
292
|
+
}
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
249
295
|
// GET /api/artifacts/:id/view (Render standalone HTML / visual graph artifact)
|
|
250
296
|
if (pathname?.startsWith('/api/artifacts/') && pathname.endsWith('/view') && req.method === 'GET') {
|
|
251
297
|
const { artifactManager } = await import('../core/artifactManager.js');
|
|
@@ -312,6 +358,35 @@ export class DesktopServer {
|
|
|
312
358
|
}));
|
|
313
359
|
return;
|
|
314
360
|
}
|
|
361
|
+
// POST /api/codebase/breathe (Trigger 1-2s Codebase Analysis & Cache Re-indexing)
|
|
362
|
+
if (pathname === '/api/codebase/breathe' && req.method === 'POST') {
|
|
363
|
+
const freshCache = await CodebaseBreather.breathe(config.workingDir, { minDurationMs: 1200, silent: true });
|
|
364
|
+
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
365
|
+
res.end(JSON.stringify({ success: true, cache: freshCache }));
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
// POST /api/workspace/file (Edit / Save workspace file directly)
|
|
369
|
+
if (pathname === '/api/workspace/file' && req.method === 'POST') {
|
|
370
|
+
const relPath = payload.path || '';
|
|
371
|
+
const content = payload.content || '';
|
|
372
|
+
const fullPath = path.resolve(config.workingDir, relPath);
|
|
373
|
+
if (!fullPath.startsWith(path.resolve(config.workingDir))) {
|
|
374
|
+
res.writeHead(403, { 'Content-Type': 'application/json' });
|
|
375
|
+
res.end(JSON.stringify({ error: 'Access denied' }));
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
try {
|
|
379
|
+
fs.mkdirSync(path.dirname(fullPath), { recursive: true });
|
|
380
|
+
fs.writeFileSync(fullPath, content, 'utf-8');
|
|
381
|
+
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
382
|
+
res.end(JSON.stringify({ success: true, path: relPath }));
|
|
383
|
+
}
|
|
384
|
+
catch (err) {
|
|
385
|
+
res.writeHead(500, { 'Content-Type': 'application/json' });
|
|
386
|
+
res.end(JSON.stringify({ error: err.message }));
|
|
387
|
+
}
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
315
390
|
// POST /api/permission/response (Desktop tool confirmation response)
|
|
316
391
|
if (pathname === '/api/permission/response' && req.method === 'POST') {
|
|
317
392
|
const { requestId, allowed, alwaysAllow } = payload;
|