antri_cli 1.57.20 → 1.57.22
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/promptToolkit.d.ts.map +1 -1
- package/dist/cli/promptToolkit.js +1 -0
- package/dist/cli/promptToolkit.js.map +1 -1
- package/dist/cli/shortcuts.d.ts.map +1 -1
- package/dist/cli/shortcuts.js +22 -0
- package/dist/cli/shortcuts.js.map +1 -1
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js +12 -5
- package/dist/core/agent.js.map +1 -1
- package/dist/core/architectureAnalyzer.d.ts +16 -0
- package/dist/core/architectureAnalyzer.d.ts.map +1 -0
- package/dist/core/architectureAnalyzer.js +182 -0
- package/dist/core/architectureAnalyzer.js.map +1 -0
- package/dist/core/tools.d.ts.map +1 -1
- package/dist/core/tools.js +14 -2
- 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 +185 -1
- package/dist/desktop/public/index.html +46 -1
- package/dist/desktop/public/style.css +199 -0
- package/dist/mobile/public/app.js +40 -1
- package/dist/mobile/public/index.html +14 -0
- package/dist/mobile/public/style.css +42 -0
- package/dist/mobile/server.d.ts.map +1 -1
- package/dist/mobile/server.js +31 -1
- package/dist/mobile/server.js.map +1 -1
- package/dist/skills/skillManager.d.ts.map +1 -1
- package/dist/skills/skillManager.js +6 -3
- package/dist/skills/skillManager.js.map +1 -1
- package/package.json +64 -64
|
@@ -169,7 +169,7 @@ async function showTab(tabName) {
|
|
|
169
169
|
const targetPanel = document.getElementById(`tab-${tabName}`);
|
|
170
170
|
if (targetPanel) targetPanel.classList.add('active');
|
|
171
171
|
|
|
172
|
-
const navIndex = ['chat', 'dialectic', 'goal', 'profiles', 'skills', 'memory', 'artifacts'].indexOf(tabName);
|
|
172
|
+
const navIndex = ['chat', 'dialectic', 'goal', 'profiles', 'skills', 'memory', 'artifacts', 'suggestions'].indexOf(tabName);
|
|
173
173
|
const navButtons = document.querySelectorAll('.nav-item');
|
|
174
174
|
if (navButtons[navIndex]) navButtons[navIndex].classList.add('active');
|
|
175
175
|
|
|
@@ -181,6 +181,8 @@ async function showTab(tabName) {
|
|
|
181
181
|
await loadMemory();
|
|
182
182
|
} else if (tabName === 'artifacts') {
|
|
183
183
|
await loadArtifactsTab();
|
|
184
|
+
} else if (tabName === 'suggestions') {
|
|
185
|
+
loadSuggestionsTab();
|
|
184
186
|
}
|
|
185
187
|
}
|
|
186
188
|
|
|
@@ -1660,3 +1662,185 @@ async function submitDesktopLogout() {
|
|
|
1660
1662
|
console.error('Logout error:', err);
|
|
1661
1663
|
}
|
|
1662
1664
|
}
|
|
1665
|
+
|
|
1666
|
+
// Suggestions & Creative Ideation Studio Engine
|
|
1667
|
+
const SUGGESTION_PRESETS = [
|
|
1668
|
+
{
|
|
1669
|
+
id: 'sug_1',
|
|
1670
|
+
category: 'portfolio',
|
|
1671
|
+
categoryName: 'Next.js Portfolio',
|
|
1672
|
+
badge: 'Option 1 · Dark Cyberpunk / Aurora',
|
|
1673
|
+
title: 'Aurora Glow Engineering Portfolio',
|
|
1674
|
+
description: 'High-impact personal developer portfolio featuring glowing aurora glassmorphism cards, interactive skills matrix, and smooth navigation.',
|
|
1675
|
+
features: [
|
|
1676
|
+
'Next.js 14 App Router with TypeScript & Tailwind CSS',
|
|
1677
|
+
'Glowing ambient aura gradients and smooth responsive layout',
|
|
1678
|
+
'Featured Projects grid with live demo and GitHub source links',
|
|
1679
|
+
'Interactive Contact Me section with instant feedback'
|
|
1680
|
+
],
|
|
1681
|
+
prompt: 'Code me a complete Next.js 14 Developer Portfolio with an Aurora Glow Dark Theme, animated project cards, skills section, and contact form.'
|
|
1682
|
+
},
|
|
1683
|
+
{
|
|
1684
|
+
id: 'sug_2',
|
|
1685
|
+
category: 'portfolio',
|
|
1686
|
+
categoryName: 'Next.js Portfolio',
|
|
1687
|
+
badge: 'Option 2 · Bento Grid Minimalist',
|
|
1688
|
+
title: 'Bento-Grid Silicon Valley Portfolio',
|
|
1689
|
+
description: 'Ultra-clean, modern Linear/Apple style bento grid layout showcasing engineering milestones, telemetry metrics, and systems projects.',
|
|
1690
|
+
features: [
|
|
1691
|
+
'Modular Bento Grid architecture (Hero, Stat counters, Project tiles)',
|
|
1692
|
+
'Clean typography stack with Tailwind CSS and Lucide React icons',
|
|
1693
|
+
'Experience timeline with expandable achievement breakdowns',
|
|
1694
|
+
'Instant responsive mobile menu and dark theme styling'
|
|
1695
|
+
],
|
|
1696
|
+
prompt: 'Code me a complete Next.js Developer Portfolio using a modern Bento-Grid layout, Lucide React icons, experience timeline, and project showcase.'
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
id: 'sug_3',
|
|
1700
|
+
category: 'saas',
|
|
1701
|
+
categoryName: 'SaaS Web App',
|
|
1702
|
+
badge: 'Option 3 · Modern SaaS Platform',
|
|
1703
|
+
title: 'AI Analytics & Metric Intelligence Platform',
|
|
1704
|
+
description: 'Full-featured SaaS web application featuring KPI metric counters, real-time activity feeds, data charts, and modular views.',
|
|
1705
|
+
features: [
|
|
1706
|
+
'Next.js 14 with React Server Components & client interactivity',
|
|
1707
|
+
'Sidebar navigation with Overview, Analytics, and Settings',
|
|
1708
|
+
'Live metric KPI stat cards with trend percentage indicators (+18.4%)',
|
|
1709
|
+
'Responsive data table with filtering and pagination'
|
|
1710
|
+
],
|
|
1711
|
+
prompt: 'Code me a full-stack Next.js SaaS Analytics Dashboard with KPI stat cards, sidebar navigation, activity feed, and responsive data tables.'
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
id: 'sug_4',
|
|
1715
|
+
category: 'cli',
|
|
1716
|
+
categoryName: 'CLI Utility',
|
|
1717
|
+
badge: 'Option 4 · Autonomous CLI Tool',
|
|
1718
|
+
title: 'Autonomous Code Review & Git Diff Inspector',
|
|
1719
|
+
description: 'Production-grade Node.js/TypeScript CLI tool that inspects git diffs, analyzes code complexity, and generates audit reports.',
|
|
1720
|
+
features: [
|
|
1721
|
+
'Commander.js CLI argument parsing with colored Chalk output',
|
|
1722
|
+
'Interactive Ora spinners and step-by-step progress logging',
|
|
1723
|
+
'Modular architecture: src/index.ts, src/core/analyzer.ts, src/cli/ui.ts',
|
|
1724
|
+
'Package.json with bin executable definition and build scripts'
|
|
1725
|
+
],
|
|
1726
|
+
prompt: 'Build a production-grade TypeScript CLI tool for automated Git code review with Commander, Chalk, Ora, and modular architecture.'
|
|
1727
|
+
},
|
|
1728
|
+
{
|
|
1729
|
+
id: 'sug_5',
|
|
1730
|
+
category: 'backend',
|
|
1731
|
+
categoryName: 'Microservices & APIs',
|
|
1732
|
+
badge: 'Option 5 · Distributed Express API',
|
|
1733
|
+
title: 'High-Throughput Authentication & Event Microservice',
|
|
1734
|
+
description: 'Robust Node.js Express REST & SSE API with rate limiting, JWT token rotation, structured error envelopes, and middleware.',
|
|
1735
|
+
features: [
|
|
1736
|
+
'Express.js + TypeScript with clean Controller-Service-Repository pattern',
|
|
1737
|
+
'Token Bucket rate limiting and constant-time cryptographic validation',
|
|
1738
|
+
'Standard JSON response envelopes ({ success: true, data: {...} })',
|
|
1739
|
+
'Health check endpoint and comprehensive error handling middleware'
|
|
1740
|
+
],
|
|
1741
|
+
prompt: 'Code a modular Express.js TypeScript REST API microservice with JWT auth, rate limiting, and structured response envelopes.'
|
|
1742
|
+
}
|
|
1743
|
+
];
|
|
1744
|
+
|
|
1745
|
+
let activeSuggestionsFilter = 'all';
|
|
1746
|
+
|
|
1747
|
+
function loadSuggestionsTab() {
|
|
1748
|
+
renderSuggestionsGrid();
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
function filterSuggestions(cat) {
|
|
1752
|
+
activeSuggestionsFilter = cat;
|
|
1753
|
+
document.querySelectorAll('.cat-chip').forEach(el => el.classList.remove('active'));
|
|
1754
|
+
const target = Array.from(document.querySelectorAll('.cat-chip')).find(el => {
|
|
1755
|
+
if (cat === 'all') return el.textContent.includes('All');
|
|
1756
|
+
if (cat === 'portfolio') return el.textContent.includes('Portfolio');
|
|
1757
|
+
if (cat === 'saas') return el.textContent.includes('SaaS');
|
|
1758
|
+
if (cat === 'cli') return el.textContent.includes('CLI');
|
|
1759
|
+
if (cat === 'backend') return el.textContent.includes('Microservices');
|
|
1760
|
+
return false;
|
|
1761
|
+
});
|
|
1762
|
+
if (target) target.classList.add('active');
|
|
1763
|
+
renderSuggestionsGrid();
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
function renderSuggestionsGrid() {
|
|
1767
|
+
const container = document.getElementById('suggestions-cards-grid');
|
|
1768
|
+
if (!container) return;
|
|
1769
|
+
|
|
1770
|
+
const filtered = activeSuggestionsFilter === 'all'
|
|
1771
|
+
? SUGGESTION_PRESETS
|
|
1772
|
+
: SUGGESTION_PRESETS.filter(s => s.category === activeSuggestionsFilter);
|
|
1773
|
+
|
|
1774
|
+
container.innerHTML = filtered.map((s, idx) => `
|
|
1775
|
+
<div class="suggestion-card">
|
|
1776
|
+
<div>
|
|
1777
|
+
<div class="suggestion-card-header">
|
|
1778
|
+
<span class="suggestion-badge">${s.badge}</span>
|
|
1779
|
+
<span style="font-size:11px;color:var(--text-tertiary);">${s.categoryName}</span>
|
|
1780
|
+
</div>
|
|
1781
|
+
<h3 class="suggestion-title">${s.title}</h3>
|
|
1782
|
+
<p class="suggestion-desc">${s.description}</p>
|
|
1783
|
+
<div class="suggestion-features">
|
|
1784
|
+
${s.features.map(f => `<div class="suggestion-feature-item">${f}</div>`).join('')}
|
|
1785
|
+
</div>
|
|
1786
|
+
</div>
|
|
1787
|
+
<div class="suggestion-card-actions">
|
|
1788
|
+
<button class="btn-adopt-idea" onclick="adoptSuggestion(${idx})">🚀 Build This Idea</button>
|
|
1789
|
+
<button class="btn-tweak-idea" onclick="tweakSuggestion(${idx})">✏️ Customize</button>
|
|
1790
|
+
</div>
|
|
1791
|
+
</div>
|
|
1792
|
+
`).join('');
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
function adoptSuggestion(index) {
|
|
1796
|
+
const filtered = activeSuggestionsFilter === 'all'
|
|
1797
|
+
? SUGGESTION_PRESETS
|
|
1798
|
+
: SUGGESTION_PRESETS.filter(s => s.category === activeSuggestionsFilter);
|
|
1799
|
+
const sug = filtered[index];
|
|
1800
|
+
if (!sug) return;
|
|
1801
|
+
|
|
1802
|
+
showTab('chat');
|
|
1803
|
+
const chatInput = document.getElementById('chat-input');
|
|
1804
|
+
if (chatInput) {
|
|
1805
|
+
chatInput.value = sug.prompt;
|
|
1806
|
+
chatInput.focus();
|
|
1807
|
+
}
|
|
1808
|
+
showToast(`Loaded "${sug.title}" into Agent Studio.`);
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
function tweakSuggestion(index) {
|
|
1812
|
+
const filtered = activeSuggestionsFilter === 'all'
|
|
1813
|
+
? SUGGESTION_PRESETS
|
|
1814
|
+
: SUGGESTION_PRESETS.filter(s => s.category === activeSuggestionsFilter);
|
|
1815
|
+
const sug = filtered[index];
|
|
1816
|
+
if (!sug) return;
|
|
1817
|
+
|
|
1818
|
+
const customInput = document.getElementById('custom-idea-input');
|
|
1819
|
+
if (customInput) {
|
|
1820
|
+
customInput.value = `I want to build "${sug.title}".\nAdjustments / Custom Requirements:\n- `;
|
|
1821
|
+
customInput.focus();
|
|
1822
|
+
customInput.scrollIntoView({ behavior: 'smooth' });
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
function generateNewSuggestions() {
|
|
1827
|
+
showToast('Brainstormed fresh creative blueprints!');
|
|
1828
|
+
renderSuggestionsGrid();
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
function buildFromCustomIdea() {
|
|
1832
|
+
const customInput = document.getElementById('custom-idea-input');
|
|
1833
|
+
const val = (customInput?.value || '').trim();
|
|
1834
|
+
if (!val) {
|
|
1835
|
+
alert('Please enter your custom requirements or ideas first.');
|
|
1836
|
+
return;
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
showTab('chat');
|
|
1840
|
+
const chatInput = document.getElementById('chat-input');
|
|
1841
|
+
if (chatInput) {
|
|
1842
|
+
chatInput.value = val;
|
|
1843
|
+
chatInput.focus();
|
|
1844
|
+
}
|
|
1845
|
+
showToast('Sent custom vision to Agent Studio.');
|
|
1846
|
+
}
|
|
@@ -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.22</span>
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
21
|
<!-- Mode Toggle -->
|
|
@@ -97,6 +97,9 @@
|
|
|
97
97
|
<button class="nav-item" onclick="showTab('artifacts')">
|
|
98
98
|
<span class="nav-label">Artifacts Hub</span>
|
|
99
99
|
</button>
|
|
100
|
+
<button class="nav-item" onclick="showTab('suggestions')">
|
|
101
|
+
<span class="nav-label">💡 Suggestions & Ideas</span>
|
|
102
|
+
</button>
|
|
100
103
|
|
|
101
104
|
<div class="sidebar-footer">
|
|
102
105
|
<div class="sync-status">
|
|
@@ -452,6 +455,48 @@
|
|
|
452
455
|
</div>
|
|
453
456
|
</section>
|
|
454
457
|
|
|
458
|
+
<!-- TAB 8: Suggestions & Ideation Studio -->
|
|
459
|
+
<section id="tab-suggestions" class="tab-panel">
|
|
460
|
+
<div class="panel-header">
|
|
461
|
+
<div class="panel-title-group">
|
|
462
|
+
<h2 class="panel-title">💡 Suggestions & Creative Ideation Studio</h2>
|
|
463
|
+
<p class="panel-subtitle">Explore 2-3 tailored architectural blueprints, design themes, and feature ideas. Select any idea or provide your own customized requirements!</p>
|
|
464
|
+
</div>
|
|
465
|
+
<div style="display:flex;gap:8px;">
|
|
466
|
+
<button class="action-btn" onclick="generateNewSuggestions()">✨ Brainstorm Ideas</button>
|
|
467
|
+
</div>
|
|
468
|
+
</div>
|
|
469
|
+
|
|
470
|
+
<div class="suggestions-layout">
|
|
471
|
+
<!-- Category Chips -->
|
|
472
|
+
<div class="suggestions-categories">
|
|
473
|
+
<button class="cat-chip active" onclick="filterSuggestions('all')">🌟 All Ideas</button>
|
|
474
|
+
<button class="cat-chip" onclick="filterSuggestions('portfolio')">💼 Next.js Portfolio</button>
|
|
475
|
+
<button class="cat-chip" onclick="filterSuggestions('saas')">⚡ Modern SaaS Web App</button>
|
|
476
|
+
<button class="cat-chip" onclick="filterSuggestions('cli')">🛠️ CLI Agent & Utilities</button>
|
|
477
|
+
<button class="cat-chip" onclick="filterSuggestions('backend')">🌐 Microservices & APIs</button>
|
|
478
|
+
</div>
|
|
479
|
+
|
|
480
|
+
<!-- Active Suggestion Cards Grid -->
|
|
481
|
+
<div id="suggestions-cards-grid" class="suggestions-grid">
|
|
482
|
+
<!-- Populated dynamically via JS -->
|
|
483
|
+
</div>
|
|
484
|
+
|
|
485
|
+
<!-- Custom Idea Builder Input Card -->
|
|
486
|
+
<div class="custom-idea-card">
|
|
487
|
+
<div class="custom-idea-header">
|
|
488
|
+
<h3>🎨 Custom Architecture & Personal Vision</h3>
|
|
489
|
+
<span class="badge" style="background:var(--primary-subtle);color:var(--primary);">Adaptive Customizer</span>
|
|
490
|
+
</div>
|
|
491
|
+
<p style="font-size:13px;color:var(--text-muted);margin:8px 0 12px 0;">Have your own idea or want to modify one of the suggestions above? Type your thoughts below and the agent will build it with maximum craftsmanship.</p>
|
|
492
|
+
<textarea id="custom-idea-input" class="custom-idea-textarea" placeholder="e.g., Build Option 1, but add an interactive GitHub commit heatmap, dark obsidian theme with glowing cyan accents, and an interactive project filter tabs..."></textarea>
|
|
493
|
+
<div class="custom-idea-actions">
|
|
494
|
+
<button class="action-btn" onclick="buildFromCustomIdea()">🚀 Build Custom Project in Studio</button>
|
|
495
|
+
</div>
|
|
496
|
+
</div>
|
|
497
|
+
</div>
|
|
498
|
+
</section>
|
|
499
|
+
|
|
455
500
|
</main>
|
|
456
501
|
</div>
|
|
457
502
|
|
|
@@ -1605,5 +1605,204 @@ body.antri-app {
|
|
|
1605
1605
|
width: 92%;
|
|
1606
1606
|
}
|
|
1607
1607
|
|
|
1608
|
+
/* Suggestions & Ideation Tab */
|
|
1609
|
+
.suggestions-layout {
|
|
1610
|
+
display: flex;
|
|
1611
|
+
flex-direction: column;
|
|
1612
|
+
gap: 1.5rem;
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
.suggestions-categories {
|
|
1616
|
+
display: flex;
|
|
1617
|
+
flex-wrap: wrap;
|
|
1618
|
+
gap: 0.5rem;
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
.cat-chip {
|
|
1622
|
+
background: var(--bg-surface);
|
|
1623
|
+
border: 1px solid var(--border-main);
|
|
1624
|
+
border-radius: var(--radius-sm);
|
|
1625
|
+
color: var(--text-secondary);
|
|
1626
|
+
padding: 6px 14px;
|
|
1627
|
+
font-size: 0.8rem;
|
|
1628
|
+
font-weight: 600;
|
|
1629
|
+
cursor: pointer;
|
|
1630
|
+
transition: all 0.15s ease;
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
.cat-chip:hover {
|
|
1634
|
+
background: var(--bg-hover);
|
|
1635
|
+
color: var(--text-primary);
|
|
1636
|
+
border-color: var(--accent-primary);
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
.cat-chip.active {
|
|
1640
|
+
background: var(--accent-primary);
|
|
1641
|
+
color: #ffffff;
|
|
1642
|
+
border-color: var(--accent-primary);
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
.suggestions-grid {
|
|
1646
|
+
display: grid;
|
|
1647
|
+
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
|
1648
|
+
gap: 1.25rem;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
.suggestion-card {
|
|
1652
|
+
background: var(--bg-card);
|
|
1653
|
+
border: 1px solid var(--border-main);
|
|
1654
|
+
border-radius: var(--radius-md);
|
|
1655
|
+
padding: 1.35rem;
|
|
1656
|
+
display: flex;
|
|
1657
|
+
flex-direction: column;
|
|
1658
|
+
justify-content: space-between;
|
|
1659
|
+
gap: 1rem;
|
|
1660
|
+
transition: all 0.2s ease;
|
|
1661
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
.suggestion-card:hover {
|
|
1665
|
+
transform: translateY(-3px);
|
|
1666
|
+
border-color: var(--accent-primary);
|
|
1667
|
+
box-shadow: 0 8px 24px rgba(99, 102, 241, 0.08);
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
.suggestion-card-header {
|
|
1671
|
+
display: flex;
|
|
1672
|
+
justify-content: space-between;
|
|
1673
|
+
align-items: flex-start;
|
|
1674
|
+
gap: 8px;
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
.suggestion-badge {
|
|
1678
|
+
font-size: 0.72rem;
|
|
1679
|
+
font-weight: 700;
|
|
1680
|
+
padding: 3px 8px;
|
|
1681
|
+
border-radius: 999px;
|
|
1682
|
+
background: rgba(99, 102, 241, 0.12);
|
|
1683
|
+
color: #6366f1;
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
.suggestion-title {
|
|
1687
|
+
font-size: 1.05rem;
|
|
1688
|
+
font-weight: 700;
|
|
1689
|
+
color: var(--text-primary);
|
|
1690
|
+
margin-top: 0.35rem;
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
.suggestion-desc {
|
|
1694
|
+
font-size: 0.84rem;
|
|
1695
|
+
color: var(--text-secondary);
|
|
1696
|
+
line-height: 1.5;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
.suggestion-features {
|
|
1700
|
+
display: flex;
|
|
1701
|
+
flex-direction: column;
|
|
1702
|
+
gap: 0.35rem;
|
|
1703
|
+
margin: 0.5rem 0;
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
.suggestion-feature-item {
|
|
1707
|
+
font-size: 0.78rem;
|
|
1708
|
+
color: var(--text-tertiary);
|
|
1709
|
+
display: flex;
|
|
1710
|
+
align-items: center;
|
|
1711
|
+
gap: 6px;
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
.suggestion-feature-item::before {
|
|
1715
|
+
content: '✓';
|
|
1716
|
+
color: #10b981;
|
|
1717
|
+
font-weight: bold;
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
.suggestion-card-actions {
|
|
1721
|
+
display: flex;
|
|
1722
|
+
gap: 8px;
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
.btn-adopt-idea {
|
|
1726
|
+
flex: 1;
|
|
1727
|
+
background: var(--accent-primary);
|
|
1728
|
+
color: #ffffff;
|
|
1729
|
+
border: none;
|
|
1730
|
+
border-radius: var(--radius-sm);
|
|
1731
|
+
padding: 8px 14px;
|
|
1732
|
+
font-size: 0.82rem;
|
|
1733
|
+
font-weight: 700;
|
|
1734
|
+
cursor: pointer;
|
|
1735
|
+
transition: opacity 0.15s;
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
.btn-adopt-idea:hover {
|
|
1739
|
+
opacity: 0.9;
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
.btn-tweak-idea {
|
|
1743
|
+
background: var(--bg-surface);
|
|
1744
|
+
border: 1px solid var(--border-main);
|
|
1745
|
+
color: var(--text-secondary);
|
|
1746
|
+
border-radius: var(--radius-sm);
|
|
1747
|
+
padding: 8px 12px;
|
|
1748
|
+
font-size: 0.82rem;
|
|
1749
|
+
font-weight: 600;
|
|
1750
|
+
cursor: pointer;
|
|
1751
|
+
transition: all 0.15s;
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
.btn-tweak-idea:hover {
|
|
1755
|
+
background: var(--bg-hover);
|
|
1756
|
+
color: var(--text-primary);
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
.custom-idea-card {
|
|
1760
|
+
background: var(--bg-card);
|
|
1761
|
+
border: 1px solid var(--border-main);
|
|
1762
|
+
border-radius: var(--radius-md);
|
|
1763
|
+
padding: 1.5rem;
|
|
1764
|
+
display: flex;
|
|
1765
|
+
flex-direction: column;
|
|
1766
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
.custom-idea-header {
|
|
1770
|
+
display: flex;
|
|
1771
|
+
justify-content: space-between;
|
|
1772
|
+
align-items: center;
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1775
|
+
.custom-idea-header h3 {
|
|
1776
|
+
font-size: 1.1rem;
|
|
1777
|
+
font-weight: 700;
|
|
1778
|
+
color: var(--text-primary);
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
.custom-idea-textarea {
|
|
1782
|
+
width: 100%;
|
|
1783
|
+
min-height: 100px;
|
|
1784
|
+
background: var(--bg-subtle);
|
|
1785
|
+
border: 1px solid var(--border-main);
|
|
1786
|
+
border-radius: var(--radius-sm);
|
|
1787
|
+
padding: 12px 14px;
|
|
1788
|
+
color: var(--text-primary);
|
|
1789
|
+
font-family: inherit;
|
|
1790
|
+
font-size: 0.88rem;
|
|
1791
|
+
line-height: 1.5;
|
|
1792
|
+
resize: vertical;
|
|
1793
|
+
outline: none;
|
|
1794
|
+
transition: border-color 0.15s;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
.custom-idea-textarea:focus {
|
|
1798
|
+
border-color: var(--accent-primary);
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
.custom-idea-actions {
|
|
1802
|
+
display: flex;
|
|
1803
|
+
justify-content: flex-end;
|
|
1804
|
+
margin-top: 12px;
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1608
1807
|
|
|
1609
1808
|
|
|
@@ -236,13 +236,22 @@ async function submitMobilePrompt() {
|
|
|
236
236
|
contentEl.textContent = accumulated;
|
|
237
237
|
scrollMobileChat();
|
|
238
238
|
}
|
|
239
|
+
if (data.cleanText) {
|
|
240
|
+
contentEl.textContent = data.cleanText;
|
|
241
|
+
}
|
|
242
|
+
if (data.artifacts && data.artifacts.length > 0) {
|
|
243
|
+
renderMobileArtifactCards(assistantMsgEl, data.artifacts);
|
|
244
|
+
}
|
|
239
245
|
} catch (e) {}
|
|
240
246
|
}
|
|
241
247
|
}
|
|
242
248
|
}
|
|
243
249
|
} else {
|
|
244
250
|
const data = await res.json();
|
|
245
|
-
contentEl.textContent = data.response || data.error || 'Response received.';
|
|
251
|
+
contentEl.textContent = data.cleanText || data.response || data.error || 'Response received.';
|
|
252
|
+
if (data.artifacts && data.artifacts.length > 0) {
|
|
253
|
+
renderMobileArtifactCards(assistantMsgEl, data.artifacts);
|
|
254
|
+
}
|
|
246
255
|
}
|
|
247
256
|
|
|
248
257
|
// Save interaction to local episodic memory
|
|
@@ -256,6 +265,36 @@ async function submitMobilePrompt() {
|
|
|
256
265
|
}
|
|
257
266
|
}
|
|
258
267
|
|
|
268
|
+
function renderMobileArtifactCards(msgEl, artifacts) {
|
|
269
|
+
artifacts.forEach((art) => {
|
|
270
|
+
const card = document.createElement('div');
|
|
271
|
+
card.className = 'mobile-artifact-embed';
|
|
272
|
+
card.style.cssText = 'margin-top:8px;background:var(--bg-card,#18181b);border:1px solid var(--border-color,#27272a);border-radius:8px;padding:8px 12px;display:flex;justify-content:space-between;align-items:center;';
|
|
273
|
+
card.innerHTML = `
|
|
274
|
+
<div style="font-size:13px;font-weight:600;color:var(--text-primary,#fff);">🌐 ${art.title}</div>
|
|
275
|
+
<button style="background:var(--primary,#6366f1);color:#fff;border:none;border-radius:4px;padding:4px 10px;font-size:11px;font-weight:700;cursor:pointer;" onclick="openMobileArtifactViewer('${art.id}', '${art.title}')">View Diagram</button>
|
|
276
|
+
`;
|
|
277
|
+
msgEl.appendChild(card);
|
|
278
|
+
});
|
|
279
|
+
scrollMobileChat();
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
function openMobileArtifactViewer(id, title) {
|
|
283
|
+
const modal = document.getElementById('mobile-artifact-modal');
|
|
284
|
+
const iframe = document.getElementById('mobile-artifact-iframe');
|
|
285
|
+
const titleEl = document.getElementById('mobile-modal-artifact-title');
|
|
286
|
+
if (titleEl) titleEl.textContent = title || 'Architecture Diagram';
|
|
287
|
+
if (iframe) iframe.src = `/api/artifact-file/${id}`;
|
|
288
|
+
if (modal) modal.style.display = 'flex';
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
function closeMobileArtifactViewer() {
|
|
292
|
+
const modal = document.getElementById('mobile-artifact-modal');
|
|
293
|
+
const iframe = document.getElementById('mobile-artifact-iframe');
|
|
294
|
+
if (iframe) iframe.src = '';
|
|
295
|
+
if (modal) modal.style.display = 'none';
|
|
296
|
+
}
|
|
297
|
+
|
|
259
298
|
function appendMobileMessage(role, text) {
|
|
260
299
|
const container = document.getElementById('chat-messages');
|
|
261
300
|
const row = document.createElement('div');
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
<h2>ANTRI Mobile</h2>
|
|
44
44
|
<p>Standalone mobile coding intelligence with local thinking profiles, dialectic reasoning, and multimodal image inspection.</p>
|
|
45
45
|
<div class="quick-pills">
|
|
46
|
+
<button onclick="setPrompt('/arch')">🏗️ /arch Diagram</button>
|
|
46
47
|
<button onclick="setPrompt('Analyze software architecture trade-offs')">Architecture</button>
|
|
47
48
|
<button onclick="setPrompt('/debate What are the limits of LLM context windows?')">Debate</button>
|
|
48
49
|
<button onclick="setPrompt('/goal Build a zero-dependency LRU cache')">Goal Loop</button>
|
|
@@ -282,6 +283,19 @@
|
|
|
282
283
|
</button>
|
|
283
284
|
</nav>
|
|
284
285
|
|
|
286
|
+
<!-- Mobile Artifact Viewer Modal -->
|
|
287
|
+
<div id="mobile-artifact-modal" class="mobile-modal-backdrop" style="display:none;" onclick="if(event.target===this)closeMobileArtifactViewer()">
|
|
288
|
+
<div class="mobile-modal-box">
|
|
289
|
+
<div class="mobile-modal-header">
|
|
290
|
+
<h3 id="mobile-modal-artifact-title" style="margin:0;font-size:15px;color:var(--text-primary);">Artifact Diagram</h3>
|
|
291
|
+
<button class="mobile-modal-close" onclick="closeMobileArtifactViewer()">✕</button>
|
|
292
|
+
</div>
|
|
293
|
+
<div class="mobile-modal-body" style="padding:0;height:70vh;">
|
|
294
|
+
<iframe id="mobile-artifact-iframe" style="width:100%;height:100%;border:none;border-radius:0 0 12px 12px;background:#ffffff;"></iframe>
|
|
295
|
+
</div>
|
|
296
|
+
</div>
|
|
297
|
+
</div>
|
|
298
|
+
|
|
285
299
|
<script src="app.js"></script>
|
|
286
300
|
</body>
|
|
287
301
|
</html>
|
|
@@ -587,3 +587,45 @@ body.mobile-app {
|
|
|
587
587
|
.hidden {
|
|
588
588
|
display: none !important;
|
|
589
589
|
}
|
|
590
|
+
|
|
591
|
+
/* Mobile Modal Viewer */
|
|
592
|
+
.mobile-modal-backdrop {
|
|
593
|
+
position: fixed;
|
|
594
|
+
inset: 0;
|
|
595
|
+
background: rgba(0, 0, 0, 0.7);
|
|
596
|
+
backdrop-filter: blur(4px);
|
|
597
|
+
display: flex;
|
|
598
|
+
align-items: center;
|
|
599
|
+
justify-content: center;
|
|
600
|
+
z-index: 1000;
|
|
601
|
+
padding: 12px;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.mobile-modal-box {
|
|
605
|
+
background: var(--bg-card, #18181b);
|
|
606
|
+
border: 1px solid var(--border-main, #27272a);
|
|
607
|
+
border-radius: 12px;
|
|
608
|
+
width: 100%;
|
|
609
|
+
max-width: 480px;
|
|
610
|
+
display: flex;
|
|
611
|
+
flex-direction: column;
|
|
612
|
+
overflow: hidden;
|
|
613
|
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.mobile-modal-header {
|
|
617
|
+
padding: 10px 14px;
|
|
618
|
+
background: var(--bg-header, #121214);
|
|
619
|
+
border-bottom: 1px solid var(--border-main, #27272a);
|
|
620
|
+
display: flex;
|
|
621
|
+
justify-content: space-between;
|
|
622
|
+
align-items: center;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
.mobile-modal-close {
|
|
626
|
+
background: transparent;
|
|
627
|
+
border: none;
|
|
628
|
+
color: var(--text-tertiary);
|
|
629
|
+
font-size: 16px;
|
|
630
|
+
cursor: pointer;
|
|
631
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mobile/server.ts"],"names":[],"mappings":"AAyCA,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,IAAI,CAAQ;IACpB,OAAO,CAAC,WAAW,CAAa;;IAMnB,KAAK,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAoEnD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YAUpB,SAAS;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mobile/server.ts"],"names":[],"mappings":"AAyCA,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,IAAI,CAAQ;IACpB,OAAO,CAAC,WAAW,CAAa;;IAMnB,KAAK,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAoEnD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YAUpB,SAAS;WAkJH,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;CAyBlD"}
|
package/dist/mobile/server.js
CHANGED
|
@@ -141,7 +141,13 @@ export class MobileServer {
|
|
|
141
141
|
arguments: toolCall.function.arguments,
|
|
142
142
|
});
|
|
143
143
|
});
|
|
144
|
-
|
|
144
|
+
const { artifactManager } = await import('../core/artifactManager.js');
|
|
145
|
+
const parsed = artifactManager.parseAndStoreArtifacts(fullText, 'mobile_session', 'Mobile Session');
|
|
146
|
+
sendEvent('complete', {
|
|
147
|
+
fullText,
|
|
148
|
+
cleanText: parsed.cleanText,
|
|
149
|
+
artifacts: parsed.artifacts,
|
|
150
|
+
});
|
|
145
151
|
res.end();
|
|
146
152
|
}
|
|
147
153
|
catch (err) {
|
|
@@ -150,6 +156,30 @@ export class MobileServer {
|
|
|
150
156
|
}
|
|
151
157
|
return;
|
|
152
158
|
}
|
|
159
|
+
// GET /api/artifacts
|
|
160
|
+
if (pathname === '/api/artifacts' && req.method === 'GET') {
|
|
161
|
+
const { artifactManager } = await import('../core/artifactManager.js');
|
|
162
|
+
const artifacts = artifactManager.getAllArtifacts();
|
|
163
|
+
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
164
|
+
res.end(JSON.stringify({ artifacts }));
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
// GET /api/artifact-file/:id
|
|
168
|
+
if (pathname.startsWith('/api/artifact-file/') && req.method === 'GET') {
|
|
169
|
+
const id = pathname.replace('/api/artifact-file/', '').trim();
|
|
170
|
+
const { artifactManager } = await import('../core/artifactManager.js');
|
|
171
|
+
const art = artifactManager.getArtifact(id);
|
|
172
|
+
const htmlContent = art ? artifactManager.getArtifactHtml(art) : null;
|
|
173
|
+
if (htmlContent) {
|
|
174
|
+
res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
|
|
175
|
+
res.end(htmlContent);
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
res.writeHead(404, { 'Content-Type': 'text/plain' });
|
|
179
|
+
res.end('Artifact Not Found');
|
|
180
|
+
}
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
153
183
|
// POST /api/debate (SSE Streaming)
|
|
154
184
|
if (pathname === '/api/debate' && req.method === 'POST') {
|
|
155
185
|
res.writeHead(200, {
|