@hanzo/browser-extension 1.9.69 → 1.9.71

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/chrome/popup.html CHANGED
@@ -8,404 +8,573 @@
8
8
  </head>
9
9
  <body>
10
10
  <div class="container">
11
- <header>
12
- <svg class="logo" viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
13
- <path d="M22.21 67V44.6369H0V67H22.21Z" fill="currentColor"/>
14
- <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="currentColor"/>
15
- <path d="M22.21 0H0V22.3184H22.21V0Z" fill="currentColor"/>
16
- <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="currentColor"/>
17
- <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="currentColor"/>
18
- </svg>
19
- <h1>Hanzo AI</h1>
20
- </header>
21
-
22
- <!-- Login Section -->
23
- <div id="login-section" class="section login-section">
24
- <div class="login-card">
25
- <svg class="login-logo" viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
11
+ <!-- Modern Header -->
12
+ <header class="header">
13
+ <div class="brand-group">
14
+ <svg class="logo" viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
26
15
  <path d="M22.21 67V44.6369H0V67H22.21Z" fill="currentColor"/>
27
16
  <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="currentColor"/>
28
17
  <path d="M22.21 0H0V22.3184H22.21V0Z" fill="currentColor"/>
29
18
  <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="currentColor"/>
30
19
  <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="currentColor"/>
31
20
  </svg>
32
- <h2 class="login-headline">Sign in to Hanzo AI</h2>
33
- <p class="login-sub">Chat with AI, use browser tools, and build with agents.</p>
34
- <button id="login-btn" class="login-signin-btn">Sign in</button>
35
- <button id="signup-btn-popup" class="login-create-btn">Create account</button>
36
- <p class="login-note">
37
- Browser tools work without sign-in. <a href="https://docs.hanzo.ai" target="_blank">Learn more</a>
38
- </p>
39
- </div>
40
- </div>
41
-
42
- <!-- Main Section (shown after login) -->
43
- <div id="main-section" class="section hidden">
44
- <div id="user-info-section" class="hidden">
45
- <div class="user-info">
46
- <img id="user-avatar" class="avatar" src="" alt="">
47
- <div>
48
- <div id="user-name" class="user-name"></div>
49
- <div id="user-email" class="user-email"></div>
21
+ <div class="brand-meta">
22
+ <span class="brand-title">Hanzo AI</span>
23
+ <!-- Dynamic Model Badge Button with Dropdown -->
24
+ <div class="model-picker-wrapper">
25
+ <button id="model-select-btn" class="brand-badge-btn" type="button" title="Select AI Model">
26
+ <span id="model-badge">Auto</span>
27
+ <svg class="chevron" viewBox="0 0 16 16" width="10" height="10" fill="none" stroke="currentColor" stroke-width="2">
28
+ <path d="M4 6l4 4 4-4" stroke-linecap="round" stroke-linejoin="round"/>
29
+ </svg>
30
+ </button>
31
+ <div id="model-dropdown" class="model-dropdown hidden">
32
+ <div class="model-dropdown-group">
33
+ <span class="model-group-title">Hanzo Cloud</span>
34
+ <button type="button" class="model-item" data-model="auto">
35
+ <div class="model-item-text">
36
+ <span class="model-name">Auto</span>
37
+ <span class="model-desc">Routes to best model</span>
38
+ </div>
39
+ </button>
40
+ <button type="button" class="model-item" data-model="zen5">
41
+ <div class="model-item-text">
42
+ <span class="model-name">Zen5</span>
43
+ <span class="model-desc">Flagship reasoning</span>
44
+ </div>
45
+ </button>
46
+ <button type="button" class="model-item" data-model="zen5-flash">
47
+ <div class="model-item-text">
48
+ <span class="model-name">Zen5 Flash</span>
49
+ <span class="model-desc">Ultra-fast responses</span>
50
+ </div>
51
+ </button>
52
+ <button type="button" class="model-item" data-model="zen5-coder">
53
+ <div class="model-item-text">
54
+ <span class="model-name">Zen5 Coder</span>
55
+ <span class="model-desc">Code generation & reasoning</span>
56
+ </div>
57
+ </button>
58
+ <button type="button" class="model-item" data-model="enso">
59
+ <div class="model-item-text">
60
+ <span class="model-name">Enso</span>
61
+ <span class="model-desc">Agentic planner</span>
62
+ </div>
63
+ </button>
64
+ </div>
65
+
66
+ <div class="model-dropdown-group">
67
+ <span class="model-group-title">Connected Subscriptions</span>
68
+ <button type="button" class="model-item" data-model="chatgpt-web">
69
+ <div class="model-item-text">
70
+ <span class="model-name">ChatGPT Web (Plus)</span>
71
+ <span class="model-desc">Zero-footprint temporary chats</span>
72
+ </div>
73
+ <span class="model-tag plus">Plus</span>
74
+ </button>
75
+ <button type="button" class="model-item" data-model="claude-web">
76
+ <div class="model-item-text">
77
+ <span class="model-name">Claude Web</span>
78
+ <span class="model-desc">Active Claude session</span>
79
+ </div>
80
+ </button>
81
+ </div>
82
+
83
+ <div class="model-dropdown-group">
84
+ <span class="model-group-title">Local &amp; Private AI</span>
85
+ <button type="button" class="model-item" data-model="hanzo-spark">
86
+ <div class="model-item-text">
87
+ <span class="model-name">Hanzo Spark</span>
88
+ <span class="model-desc">GB10 CUDA (10.0.0.19:1235)</span>
89
+ </div>
90
+ </button>
91
+ <button type="button" class="model-item" data-model="hanzo-evo">
92
+ <div class="model-item-text">
93
+ <span class="model-name">Hanzo Evo</span>
94
+ <span class="model-desc">Strix Halo ROCm (10.0.0.21:1234)</span>
95
+ </div>
96
+ </button>
97
+ <button type="button" class="model-item" data-model="hanzo-desktop">
98
+ <div class="model-item-text">
99
+ <span class="model-name">Hanzo Desktop</span>
100
+ <span class="model-desc">Local instance (:11435)</span>
101
+ </div>
102
+ </button>
103
+ <button type="button" class="model-item" data-model="webgpu">
104
+ <div class="model-item-text">
105
+ <span class="model-name">WebGPU AI</span>
106
+ <span class="model-desc">On-device in-browser</span>
107
+ </div>
108
+ </button>
109
+ </div>
110
+ </div>
50
111
  </div>
51
- <button id="logout-btn" class="btn-icon" title="Sign out">
52
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor">
53
- <path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9"/>
54
- </svg>
55
- </button>
56
112
  </div>
57
- <div class="divider"></div>
58
113
  </div>
59
114
 
60
- <!-- Embedded search: run a query through the Hanzo answer engine. -->
61
- <form id="search-form" style="display:flex;gap:6px;margin-bottom:10px;">
62
- <input id="search-input" type="text" placeholder="Search Hanzo AI…" autocomplete="off"
63
- style="flex:1;min-width:0;padding:9px 12px;background:var(--surface-light,#171717);border:1px solid var(--border,rgba(255,255,255,0.12));border-radius:8px;color:var(--text,#fafafa);font-size:13px;font-family:inherit;outline:none;">
64
- <button id="search-btn" type="submit" title="Search" aria-label="Search"
65
- style="width:36px;height:36px;flex-shrink:0;display:flex;align-items:center;justify-content:center;background:var(--primary,#fafafa);border:none;border-radius:8px;color:#000;cursor:pointer;">
66
- <svg viewBox="0 0 16 16" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.8">
67
- <circle cx="7" cy="7" r="4.5"/><path d="M11 11l3.5 3.5" stroke-linecap="round"/>
115
+ <div class="header-actions">
116
+ <!-- Open Side Panel -->
117
+ <button id="open-panel" class="icon-btn" title="Open Side Panel">
118
+ <svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.8">
119
+ <rect x="3" y="3" width="18" height="18" rx="3"/>
120
+ <line x1="15" y1="3" x2="15" y2="21"/>
68
121
  </svg>
69
122
  </button>
70
- </form>
71
-
72
- <!-- Actions: single Open Chat button + on-page surface settings. -->
73
- <button id="open-panel" class="btn btn-secondary" style="margin-bottom: 8px;">
74
- <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor">
75
- <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>
76
- </svg>
77
- Open Chat
78
- </button>
79
-
80
- <!-- On-page chat config -->
81
- <div class="onpage-config" style="display:flex;flex-direction:column;gap:6px;margin-bottom:12px;font-size:11px;">
82
- <div class="feature-toggle" style="display:flex;justify-content:space-between;align-items:center;">
83
- <label style="display:flex;align-items:center;gap:6px;cursor:pointer;">
84
- <input type="checkbox" id="overlay-enabled" checked>
85
- <span>On-page chat panel</span>
86
- </label>
87
- <span style="color:var(--text-muted,#888);font-size:10px;">overlay vs new tab</span>
88
- </div>
89
-
90
- <div id="overlay-side-row" class="side-picker" style="display:flex;gap:6px;align-items:center;">
91
- <span style="color:var(--text-muted,#888);">Pin:</span>
92
- <button id="pin-left" class="btn btn-ghost" style="flex:1;padding:4px 8px;font-size:11px;">Left</button>
93
- <button id="pin-right" class="btn btn-ghost" style="flex:1;padding:4px 8px;font-size:11px;" data-active="true">Right</button>
94
- </div>
95
-
96
- <div id="overlay-width-row" style="display:flex;gap:6px;align-items:center;">
97
- <span style="color:var(--text-muted,#888);">Width:</span>
98
- <button class="btn btn-ghost width-btn" data-width="compact" style="flex:1;padding:4px 8px;font-size:11px;">Compact</button>
99
- <button class="btn btn-ghost width-btn" data-width="default" style="flex:1;padding:4px 8px;font-size:11px;" data-active="true">Default</button>
100
- <button class="btn btn-ghost width-btn" data-width="wide" style="flex:1;padding:4px 8px;font-size:11px;">Wide</button>
101
- </div>
102
-
103
- <span style="color:var(--text-muted,#888);font-size:10px;line-height:1.4;">
104
- FF native sidebar: View → Sidebar → Hanzo AI.<br>
105
- Disable to fall back to a standalone tab — useful on sites with strict CSP.
106
- </span>
107
- </div>
108
-
109
- <div class="divider"></div>
110
-
111
- <!-- AI Usage (Claude + Codex, from the current browser session) -->
112
- <div class="usage-header" style="display:flex;align-items:center;justify-content:space-between;">
113
- <h3>AI Usage</h3>
114
- <button id="usage-refresh" class="btn-icon" title="Refresh usage">
115
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
116
- <path d="M23 4v6h-6M1 20v-6h6"/>
117
- <path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/>
123
+ <!-- Open New Tab -->
124
+ <button id="open-newtab-btn" class="icon-btn" title="Open in New Tab">
125
+ <svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.8">
126
+ <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>
127
+ <polyline points="15 3 21 3 21 9"/>
128
+ <line x1="10" y1="14" x2="21" y2="3"/>
118
129
  </svg>
119
130
  </button>
120
- </div>
121
- <div id="usage-list" class="usage-list" style="display:flex;flex-direction:column;gap:8px;"></div>
122
- <a href="https://console.hanzo.ai/ai-accounts" target="_blank"
123
- style="display:inline-block;margin-top:8px;font-size:11px;color:var(--text-muted,#888);">Manage AI accounts →</a>
124
-
125
- <div class="divider"></div>
126
-
127
- <!-- Tools -->
128
- <h3>Tools</h3>
129
- <div class="tools-grid">
130
- <button id="tool-picker" class="tool-btn" title="Pick an element on the page">
131
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
132
- <path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"/>
133
- <path d="M13 13l6 6"/>
134
- </svg>
135
- <span>Selector</span>
136
- </button>
137
- <button id="tool-screenshot" class="tool-btn" title="Capture visible page">
138
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
139
- <path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/>
140
- <circle cx="12" cy="13" r="4"/>
131
+ <!-- Toggle Settings -->
132
+ <button id="open-settings" class="icon-btn" title="Settings">
133
+ <svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.8">
134
+ <circle cx="12" cy="12" r="3"/>
135
+ <path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/>
141
136
  </svg>
142
- <span>Screenshot</span>
143
- </button>
144
- <button id="tool-pageinfo" class="tool-btn" title="Copy page info to clipboard">
145
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
146
- <circle cx="12" cy="12" r="10"/>
147
- <path d="M12 16v-4M12 8h.01"/>
148
- </svg>
149
- <span>Page Info</span>
150
- </button>
151
- <button id="tool-accessibility" class="tool-btn" title="Run accessibility audit">
152
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
153
- <circle cx="12" cy="4" r="2"/>
154
- <path d="M12 6v6M8 8l4 2 4-2M8 22l2-6h4l2 6"/>
155
- </svg>
156
- <span>A11y Audit</span>
157
- </button>
158
- <button id="tool-performance" class="tool-btn" title="Run performance audit">
159
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
160
- <path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"/>
161
- </svg>
162
- <span>Perf Audit</span>
163
- </button>
164
- <button id="tool-console" class="tool-btn" title="Evaluate JS in page context">
165
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
166
- <polyline points="4 17 10 11 4 5"/>
167
- <line x1="12" y1="19" x2="20" y2="19"/>
168
- </svg>
169
- <span>Console</span>
170
137
  </button>
171
138
  </div>
139
+ </header>
172
140
 
173
- <div class="divider"></div>
174
-
175
- <!-- Features -->
176
- <h3>Features</h3>
177
- <div class="features">
178
- <div class="feature-toggle">
179
- <label>
180
- <input type="checkbox" id="source-maps" checked>
181
- <span class="toggle"></span>
182
- <div class="feature-info">
183
- <strong>Source Maps</strong>
184
- <small>Click-to-code navigation</small>
185
- </div>
186
- </label>
141
+ <!-- Navigation Tabs -->
142
+ <nav class="popup-nav-tabs">
143
+ <button type="button" class="nav-tab-btn active" data-tab="tab-chat">Chat &amp; Search</button>
144
+ <button type="button" class="nav-tab-btn" data-tab="tab-accounts">Accounts &amp; Usage</button>
145
+ <button type="button" class="nav-tab-btn" data-tab="tab-bridges">Bridges &amp; Tools</button>
146
+ </nav>
147
+
148
+ <!-- Main Container Body -->
149
+ <div id="main-section" class="section main-view">
150
+
151
+ <!-- Tab 1: Chat & Search View -->
152
+ <div id="tab-chat" class="tab-pane active">
153
+ <!-- Active Tab Context Chip -->
154
+ <div id="tab-context-chip" class="context-chip" title="Active page context included">
155
+ <span class="context-dot"></span>
156
+ <span class="context-tag">Page</span>
157
+ <span id="tab-context-title" class="context-title">Detecting active page…</span>
158
+ <button id="toggle-context-btn" class="context-toggle" title="Toggle page context" type="button">Active</button>
187
159
  </div>
188
160
 
189
- <div class="feature-toggle">
190
- <label>
191
- <input type="checkbox" id="webgpu-ai" checked>
192
- <span class="toggle"></span>
193
- <div class="feature-info">
194
- <strong>WebGPU AI</strong>
195
- <small>Local AI inference</small>
161
+ <!-- Omnibox Form (Chat & Search) -->
162
+ <form id="search-form" class="composer-box">
163
+ <textarea
164
+ id="search-input"
165
+ class="composer-input"
166
+ placeholder="Ask Hanzo anything, or search…"
167
+ rows="3"
168
+ autocomplete="off"
169
+ spellcheck="false"
170
+ ></textarea>
171
+
172
+ <div class="composer-bottom">
173
+ <div class="composer-actions">
174
+ <button type="submit" id="ask-btn" class="action-submit primary" title="Ask Hanzo AI">
175
+ <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2">
176
+ <path d="M8 12V4M4 8l4-4 4 4" stroke-linecap="round" stroke-linejoin="round"/>
177
+ </svg>
178
+ <span>Ask AI</span>
179
+ </button>
180
+ <button type="button" id="search-web-btn" class="action-submit secondary" title="Search Answer Engine">
181
+ <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2">
182
+ <circle cx="7" cy="7" r="4.5"/><path d="M11 11l3.5 3.5" stroke-linecap="round"/>
183
+ </svg>
184
+ <span>Search</span>
185
+ </button>
196
186
  </div>
197
- </label>
187
+ <div class="composer-shortcut">
188
+ <kbd>Enter</kbd> ask · <kbd>Shift+↵</kbd> line
189
+ </div>
190
+ </div>
191
+ </form>
192
+
193
+ <!-- Quick Action Pills -->
194
+ <div class="quick-pills">
195
+ <button type="button" class="quick-pill" data-prompt="Summarize this page in 3 clear bullets">
196
+ ⚡ Summarize page
197
+ </button>
198
+ <button type="button" class="quick-pill" data-prompt="Extract the key takeaways and conclusions">
199
+ 💡 Key takeaways
200
+ </button>
201
+ <button type="button" class="quick-pill" data-prompt="Explain this simply with examples">
202
+ 📖 Explain simply
203
+ </button>
198
204
  </div>
199
205
 
200
- <div class="feature-toggle">
201
- <label>
202
- <input type="checkbox" id="browser-control">
203
- <span class="toggle"></span>
204
- <div class="feature-info">
205
- <strong>Browser Control</strong>
206
- <small>AI browser automation</small>
206
+ <!-- Inline Answer Area (renders fast answers inside popup) -->
207
+ <div id="inline-answer" class="inline-answer hidden">
208
+ <div class="answer-card-header">
209
+ <div class="answer-model">
210
+ <span class="live-dot-pulse"></span>
211
+ <span id="answer-header-text">Hanzo AI Response</span>
207
212
  </div>
208
- </label>
213
+ <div class="answer-btn-group">
214
+ <button id="copy-inline-btn" class="pill-btn" type="button" title="Copy answer">
215
+ <svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.8">
216
+ <rect x="5" y="5" width="8" height="8" rx="1.5"/>
217
+ <path d="M11 5V3a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h2"/>
218
+ </svg>
219
+ <span>Copy</span>
220
+ </button>
221
+ <button id="continue-chat-btn" class="pill-btn highlight" type="button" title="Open full chat">
222
+ <span>Full Chat →</span>
223
+ </button>
224
+ </div>
225
+ </div>
226
+ <div id="inline-answer-content" class="answer-card-body"></div>
209
227
  </div>
210
228
 
211
- <div class="feature-toggle">
212
- <label>
213
- <input type="checkbox" id="tab-filesystem">
214
- <span class="toggle"></span>
215
- <div class="feature-info">
216
- <strong>Tab Filesystem</strong>
217
- <small>Mount tabs as files</small>
218
- </div>
219
- </label>
229
+ <!-- User Info (compact) -->
230
+ <div id="user-info-section" class="user-strip hidden">
231
+ <div class="user-strip-inner">
232
+ <img id="user-avatar" class="avatar-sm" src="" alt="">
233
+ <span id="user-name" class="user-label"></span>
234
+ <span id="user-email" class="user-sub"></span>
235
+ </div>
236
+ <button id="logout-btn" class="signout-link" type="button">Sign out</button>
220
237
  </div>
221
238
  </div>
222
239
 
223
- <div class="divider"></div>
240
+ <!-- Tab 2: Connected Accounts & Usage -->
241
+ <div id="tab-accounts" class="tab-pane hidden">
242
+ <div class="pane-header">
243
+ <span class="pane-title">Connected Accounts &amp; Usage</span>
244
+ <button id="usage-refresh" class="pane-action-btn" type="button" title="Refresh Usage">
245
+ <svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.8">
246
+ <path d="M13.5 8A5.5 5.5 0 1 1 8 2.5c2 0 3.7.9 4.8 2.4M13.5 2v3h-3" stroke-linecap="round" stroke-linejoin="round"/>
247
+ </svg>
248
+ <span>Refresh</span>
249
+ </button>
250
+ </div>
224
251
 
225
- <!-- Privacy & data -->
226
- <h3>Privacy &amp; data</h3>
227
- <div class="features">
228
- <div class="feature-toggle">
229
- <label>
230
- <input type="checkbox" id="insights-enabled" checked>
231
- <span class="toggle"></span>
232
- <div class="feature-info">
233
- <strong>Usage insights</strong>
234
- <small>Anonymous, helps improve Hanzo. Never your search text.</small>
252
+ <!-- ChatGPT Plus Web Account Card -->
253
+ <div class="account-card" id="chatgpt-account-card">
254
+ <div class="account-card-header">
255
+ <div class="account-icon chatgpt-icon">
256
+ <svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor">
257
+ <path d="M22.28 9.87c-.14-.99-.57-1.92-1.24-2.67-.67-.74-1.54-1.26-2.5-1.5-.2-.79-.6-1.51-1.16-2.11-.56-.6-1.26-1.03-2.04-1.26-.78-.23-1.61-.23-2.39 0-.78.23-1.48.66-2.04 1.26-.56.6-.96 1.32-1.16 2.11-.96.24-1.83.76-2.5 1.5-.67.75-1.1 1.68-1.24 2.67-.8.36-1.46.94-1.91 1.67-.45.73-.67 1.58-.64 2.44.03.86.32 1.69.83 2.39.51.7 1.22 1.21 2.04 1.48.14.99.57 1.92 1.24 2.67.67.75 1.54 1.26 2.5 1.5.2.79.6 1.51 1.16 2.11.56.6 1.26 1.03 2.04 1.26.78.23 1.61.23 2.39 0 .78-.23 1.48-.66 2.04-1.26.56-.6.96-1.32 1.16-2.11.96-.24 1.83-.76 2.5-1.5.67-.75 1.1-1.68 1.24-2.67.8-.36 1.46-.94 1.91-1.67.45-.73.67-1.58.64-2.44-.03-.86-.32-1.69-.83-2.39-.51-.7-1.22-1.21-2.04-1.48z"/>
258
+ </svg>
235
259
  </div>
236
- </label>
260
+ <div class="account-info">
261
+ <div class="account-name-row">
262
+ <span class="account-name">ChatGPT Web</span>
263
+ <span class="badge-pill plus" id="chatgpt-plan-badge">Plus</span>
264
+ <span class="badge-pill bridge">Exposed to Dev &amp; ZAP</span>
265
+ </div>
266
+ <span class="account-sub" id="chatgpt-user-label">Checking session…</span>
267
+ </div>
268
+ </div>
269
+ <div class="account-details" id="chatgpt-details">
270
+ <div class="detail-row">
271
+ <span class="detail-label">Mode</span>
272
+ <span class="detail-val">Temporary Chats (Zero Trace)</span>
273
+ </div>
274
+ <div class="detail-row">
275
+ <span class="detail-label">Inference Relay</span>
276
+ <span class="detail-val live">Ready for hanzo/dev &amp; bots</span>
277
+ </div>
278
+ </div>
237
279
  </div>
238
280
 
239
- <div class="feature-toggle">
240
- <label>
241
- <input type="checkbox" id="share-training">
242
- <span class="toggle"></span>
243
- <div class="feature-info">
244
- <strong>Contribute to training</strong>
245
- <small>Opt in to share your searches &amp; answers to train Hanzo's open models. Off by default.</small>
281
+ <!-- Usage List (Claude & Codex via @hanzo/usage) -->
282
+ <div id="usage-list" class="usage-container">
283
+ <div class="loading-state">Loading usage data…</div>
284
+ </div>
285
+
286
+ <!-- Local Compute Nodes Card -->
287
+ <div class="account-card">
288
+ <div class="account-card-header">
289
+ <div class="account-icon local-icon">
290
+ <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
291
+ <rect x="2" y="2" width="20" height="8" rx="2"/><rect x="2" y="14" width="20" height="8" rx="2"/>
292
+ <line x1="6" y1="6" x2="6.01" y2="6"/><line x1="6" y1="18" x2="6.01" y2="18"/>
293
+ </svg>
246
294
  </div>
247
- </label>
295
+ <div class="account-info">
296
+ <span class="account-name">Private &amp; Local Hardware</span>
297
+ <span class="account-sub">Zero cloud egress · Local private models</span>
298
+ </div>
299
+ </div>
300
+ <div class="node-grid">
301
+ <div class="node-item" id="node-spark">
302
+ <span class="node-dot live"></span>
303
+ <div class="node-meta">
304
+ <span class="node-title">Hanzo Spark (GB10 CUDA)</span>
305
+ <span class="node-addr">10.0.0.19:1235</span>
306
+ </div>
307
+ </div>
308
+ <div class="node-item" id="node-evo">
309
+ <span class="node-dot live"></span>
310
+ <div class="node-meta">
311
+ <span class="node-title">Hanzo Evo (Strix Halo ROCm)</span>
312
+ <span class="node-addr">10.0.0.21:1234</span>
313
+ </div>
314
+ </div>
315
+ <div class="node-item" id="node-desktop">
316
+ <span class="node-dot"></span>
317
+ <div class="node-meta">
318
+ <span class="node-title">Hanzo Desktop</span>
319
+ <span class="node-addr">localhost:11435</span>
320
+ </div>
321
+ </div>
322
+ </div>
248
323
  </div>
249
324
  </div>
250
325
 
251
- <div class="divider"></div>
252
-
253
- <!-- Browser Backend -->
254
- <div class="setting-group backend-picker">
255
- <h3>Backend</h3>
256
- <div class="backend-select-wrapper">
257
- <select id="browser-backend">
258
- <option value="auto">Auto (default)</option>
259
- <option value="this">This Browser</option>
260
- <option value="firefox">Firefox</option>
261
- <option value="chrome">Chrome</option>
262
- <option value="playwright">Playwright Only</option>
263
- </select>
264
- </div>
265
- <div class="backend-status">
266
- <span class="status-dot" id="bridge-status"></span>
267
- <span id="bridge-detail" class="status-detail">Checking bridge...</span>
326
+ <!-- Tab 3: Bridges & Tools View -->
327
+ <div id="tab-bridges" class="tab-pane hidden">
328
+ <div class="pane-header">
329
+ <span class="pane-title">Bridge Runtime Status</span>
330
+ <button id="test-connection" class="pane-action-btn" type="button">Test</button>
268
331
  </div>
269
- </div>
270
332
 
271
- <div class="divider"></div>
333
+ <!-- Bridges Status Grid -->
334
+ <div class="bridge-grid">
335
+ <div class="bridge-card">
336
+ <div class="bridge-card-top">
337
+ <span class="status-dot disconnected" id="zap-status"></span>
338
+ <strong class="bridge-title">ZAP Router</strong>
339
+ </div>
340
+ <span class="bridge-detail" id="zap-detail">Checking…</span>
341
+ </div>
272
342
 
273
- <!-- Connection Status -->
274
- <h3>Status</h3>
275
- <div class="status">
276
- <div class="status-item">
277
- <span class="status-dot" id="zap-status"></span>
278
- <span>ZAP Bridge</span>
279
- <span id="zap-detail" class="status-detail">Discovering...</span>
280
- </div>
281
- <div class="status-item">
282
- <span class="status-dot" id="cdp-status"></span>
283
- <span>CDP Bridge</span>
284
- <span id="cdp-detail" class="status-detail">Checking...</span>
285
- </div>
286
- <div class="status-item">
287
- <span class="status-dot" id="mcp-status"></span>
288
- <span>MCP Bridge</span>
289
- <span id="mcp-port" class="status-detail">:9224</span>
343
+ <div class="bridge-card">
344
+ <div class="bridge-card-top">
345
+ <span class="status-dot disconnected" id="cdp-status"></span>
346
+ <strong class="bridge-title">CDP Bridge</strong>
347
+ </div>
348
+ <span class="bridge-detail" id="cdp-detail">Checking…</span>
349
+ </div>
350
+
351
+ <div class="bridge-card">
352
+ <div class="bridge-card-top">
353
+ <span class="status-dot disconnected" id="mcp-status"></span>
354
+ <strong class="bridge-title">MCP Bridge</strong>
355
+ </div>
356
+ <span class="bridge-detail" id="mcp-port">:9224</span>
357
+ </div>
358
+
359
+ <div class="bridge-card">
360
+ <div class="bridge-card-top">
361
+ <span class="status-dot disconnected" id="gpu-status"></span>
362
+ <strong class="bridge-title">WebGPU AI</strong>
363
+ </div>
364
+ <span class="bridge-detail" id="gpu-detail">Checking…</span>
365
+ </div>
290
366
  </div>
291
- <div class="status-item">
292
- <span class="status-dot" id="gpu-status"></span>
293
- <span>WebGPU</span>
294
- <span id="gpu-detail" class="status-detail">Checking...</span>
367
+
368
+ <!-- ZAP Pairing Box -->
369
+ <div id="zap-pair" class="pair-card" hidden>
370
+ <label for="zap-code" class="pair-label">Pair with computer: run <code>hanzo-mcp pair</code></label>
371
+ <div class="pair-input-group">
372
+ <input type="text" id="zap-code" placeholder="ws://127.0.0.1:…/#…" autocomplete="off" spellcheck="false">
373
+ <button id="zap-pair-btn" class="action-submit primary" type="button">Pair</button>
374
+ </div>
375
+ <span id="zap-pair-error" class="status-detail error-text"></span>
295
376
  </div>
296
- </div>
297
377
 
298
- <!-- Pairing: once per browser, with this computer's ZAP router -->
299
- <div class="setting-group" id="zap-pair" hidden>
300
- <label for="zap-code">Pair with this computer: run <code>hanzo-mcp pair</code> and paste the code it prints.</label>
301
- <input type="text" id="zap-code" placeholder="ws://127.0.0.1:…/#…" autocomplete="off" spellcheck="false">
302
- <button id="zap-pair-btn" class="btn btn-secondary" style="margin-top: 6px;">Pair</button>
303
- <span id="zap-pair-error" class="status-detail"></span>
304
- </div>
378
+ <!-- Developer Quick Tools -->
379
+ <div class="tools-section">
380
+ <span class="setting-title">Developer Quick Tools</span>
381
+ <div class="tools-btn-grid">
382
+ <button type="button" class="tool-btn" id="tool-picker" title="Inspect element on page">
383
+ <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
384
+ <path d="M3 3l4 10 2-4 4-2L3 3z"/>
385
+ </svg>
386
+ <span>Pick Element</span>
387
+ </button>
388
+ <button type="button" class="tool-btn" id="tool-screenshot" title="Capture active tab">
389
+ <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
390
+ <rect x="2" y="3" width="12" height="10" rx="1.5"/><circle cx="8" cy="8" r="2.5"/>
391
+ </svg>
392
+ <span>Screenshot</span>
393
+ </button>
394
+ <button type="button" class="tool-btn" id="tool-pageinfo" title="Copy page metadata">
395
+ <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
396
+ <circle cx="8" cy="8" r="6"/><line x1="8" y1="7" x2="8" y2="11"/><line x1="8" y1="5" x2="8.01" y2="5"/>
397
+ </svg>
398
+ <span>Page Info</span>
399
+ </button>
400
+ <button type="button" class="tool-btn" id="tool-accessibility" title="Run accessibility audit">
401
+ <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
402
+ <circle cx="8" cy="4" r="2"/><path d="M4 7h8M8 7v7M5 14l3-3 3 3"/>
403
+ </svg>
404
+ <span>A11y Audit</span>
405
+ </button>
406
+ <button type="button" class="tool-btn" id="tool-performance" title="Run performance audit">
407
+ <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
408
+ <path d="M8 2v4l3 2"/><circle cx="8" cy="8" r="6"/>
409
+ </svg>
410
+ <span>Performance</span>
411
+ </button>
412
+ <button type="button" class="tool-btn" id="tool-console" title="Open JS eval prompt">
413
+ <svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.8">
414
+ <polyline points="4 6 8 10 4 14"/><line x1="10" y1="14" x2="14" y2="14"/>
415
+ </svg>
416
+ <span>Console</span>
417
+ </button>
418
+ </div>
419
+ </div>
305
420
 
306
- <div class="divider"></div>
421
+ <!-- Feature Capabilities -->
422
+ <div class="features-section">
423
+ <span class="setting-title">Agentic Capabilities</span>
424
+ <label class="toggle-row">
425
+ <span>Browser Control (agent action loop)</span>
426
+ <input type="checkbox" id="browser-control" checked>
427
+ </label>
428
+ <label class="toggle-row">
429
+ <span>Tab Filesystem (exposes DOM &amp; resources)</span>
430
+ <input type="checkbox" id="tab-filesystem" checked>
431
+ </label>
432
+ <label class="toggle-row">
433
+ <span>WebGPU AI Acceleration</span>
434
+ <input type="checkbox" id="webgpu-ai" checked>
435
+ </label>
436
+ <label class="toggle-row">
437
+ <span>Source Maps Inspection</span>
438
+ <input type="checkbox" id="source-maps" checked>
439
+ </label>
440
+ </div>
307
441
 
308
- <!-- Actions -->
309
- <div class="actions">
310
- <button id="test-connection" class="btn btn-ghost">Test Connection</button>
311
- <button id="open-settings" class="btn btn-ghost">Settings</button>
442
+ <!-- Shortcut Recorder -->
443
+ <div class="setting-group">
444
+ <span class="setting-title">Inspect Modifier</span>
445
+ <div class="shortcut-recorder-row">
446
+ <span class="shortcut-label">Click element to jump to code:</span>
447
+ <kbd id="inspect-shortcut-display" class="kbd">Ctrl</kbd>
448
+ <button type="button" id="record-inspect-shortcut" class="pill-btn">Record</button>
449
+ </div>
450
+ </div>
312
451
  </div>
452
+ </div>
313
453
 
314
- <!-- Quick Guide -->
315
- <div class="guide" style="margin-top: 12px;">
316
- <h3 style="text-transform: none; letter-spacing: 0; color: var(--text);">Shortcuts</h3>
317
- <p>
318
- <kbd id="inspect-shortcut-display">Ctrl</kbd> + <kbd>Click</kbd>
319
- any element to jump to source
320
- <button id="record-inspect-shortcut" class="btn-link" style="margin-left:6px;font-size:11px;">edit</button>
321
- </p>
322
- <p><kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>H</kbd> open Hanzo panel</p>
454
+ <!-- Sign In Drawer / Section -->
455
+ <div id="login-section" class="section login-view hidden">
456
+ <div class="login-card">
457
+ <div class="login-icon-box">
458
+ <svg class="logo-lg" viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
459
+ <path d="M22.21 67V44.6369H0V67H22.21Z" fill="currentColor"/>
460
+ <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="currentColor"/>
461
+ <path d="M22.21 0H0V22.3184H22.21V0Z" fill="currentColor"/>
462
+ <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="currentColor"/>
463
+ <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="currentColor"/>
464
+ </svg>
465
+ </div>
466
+ <h2 class="login-heading">Sign in to Hanzo AI</h2>
467
+ <p class="login-subtext">Access unified reasoning models, history, memory, and coding agents.</p>
468
+ <button id="login-btn" class="btn-solid-full" type="button">Sign in</button>
469
+ <button id="signup-btn-popup" class="btn-ghost-full" type="button">Create account</button>
323
470
  </div>
324
471
  </div>
325
472
 
326
- <!-- Settings Section -->
327
- <div id="settings-section" class="section hidden">
328
- <div class="settings-header">
329
- <button id="back-btn" class="btn-icon">
330
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor">
331
- <path d="M19 12H5M12 19l-7-7 7-7"/>
473
+ <!-- Settings Drawer -->
474
+ <div id="settings-section" class="section settings-view hidden">
475
+ <div class="settings-top">
476
+ <h2>Extension Settings</h2>
477
+ <button id="back-btn" class="icon-btn" title="Back to Chat">
478
+ <svg viewBox="0 0 16 16" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2">
479
+ <path d="M12 8H4M8 4l-4 4 4 4" stroke-linecap="round" stroke-linejoin="round"/>
332
480
  </svg>
333
481
  </button>
334
- <h2>Settings</h2>
335
482
  </div>
336
483
 
337
- <div class="settings-content">
484
+ <div class="settings-body">
338
485
  <div class="setting-group">
339
- <h3>Connection</h3>
340
- <label>
341
- MCP Port
342
- <input type="number" id="mcp-port-setting" value="3001" min="1024" max="65535">
343
- </label>
344
- <label>
345
- CDP Bridge Port
346
- <input type="number" id="cdp-port-setting" value="9223" min="1024" max="65535">
486
+ <span class="setting-title">On-Page Assistant</span>
487
+ <label class="toggle-row">
488
+ <span>Enable on-page chat panel</span>
489
+ <input type="checkbox" id="overlay-enabled" checked>
347
490
  </label>
348
491
  </div>
349
492
 
493
+ <div id="overlay-side-row" class="setting-group">
494
+ <span class="setting-title">Dock Position</span>
495
+ <div class="segmented">
496
+ <button type="button" id="pin-left" class="segmented-btn">Left</button>
497
+ <button type="button" id="pin-right" class="segmented-btn" data-active="true">Right</button>
498
+ </div>
499
+ </div>
500
+
501
+ <div id="overlay-width-row" class="setting-group">
502
+ <span class="setting-title">Panel Width</span>
503
+ <div class="segmented">
504
+ <button type="button" class="segmented-btn width-btn" data-width="compact">Compact</button>
505
+ <button type="button" class="segmented-btn width-btn" data-width="default" data-active="true">Default</button>
506
+ <button type="button" class="segmented-btn width-btn" data-width="wide">Wide</button>
507
+ </div>
508
+ </div>
509
+
350
510
  <div class="setting-group">
351
- <h3>AI Models</h3>
352
- <label>
353
- Local Model Path
354
- <input type="text" id="model-path" placeholder="/models/browser-control-4bit.bin">
355
- </label>
356
- <label>
357
- Model Quantization
358
- <select id="model-quant">
359
- <option value="4bit">4-bit (Fastest)</option>
360
- <option value="8bit">8-bit (Balanced)</option>
361
- <option value="fp16">FP16 (Best Quality)</option>
362
- </select>
363
- </label>
511
+ <span class="setting-title">Browser Backend</span>
512
+ <select id="browser-backend" class="form-select">
513
+ <option value="auto">Auto (ZAP Native / CDP)</option>
514
+ <option value="zap">ZAP Native Router</option>
515
+ <option value="cdp">CDP Direct</option>
516
+ <option value="mcp">MCP Port</option>
517
+ </select>
518
+ <div class="backend-status-line">
519
+ <span class="status-dot disconnected" id="bridge-status"></span>
520
+ <span class="status-detail" id="bridge-detail">Not connected</span>
521
+ </div>
364
522
  </div>
365
523
 
366
524
  <div class="setting-group">
367
- <h3>Browser Control</h3>
368
- <label>
369
- <input type="checkbox" id="safe-mode" checked>
370
- Safe Mode (require confirmation for actions)
371
- </label>
372
- <label>
373
- Max Workers
374
- <input type="number" id="max-workers" value="3" min="1" max="10">
375
- </label>
525
+ <span class="setting-title">Ports &amp; Endpoints</span>
526
+ <div class="port-input-row">
527
+ <label for="mcp-port-setting">MCP Port</label>
528
+ <input type="number" id="mcp-port-setting" value="9224" min="1024" max="65535">
529
+ </div>
530
+ <div class="port-input-row">
531
+ <label for="cdp-port-setting">CDP Port</label>
532
+ <input type="number" id="cdp-port-setting" value="9223" min="1024" max="65535">
533
+ </div>
534
+ <button id="save-settings" class="action-submit primary" type="button" style="margin-top:6px;">Save Settings</button>
376
535
  </div>
377
536
 
378
537
  <div class="setting-group">
379
- <h3>Keyboard</h3>
380
- <label>
381
- Inspect modifier
382
- <div style="display:flex;gap:8px;align-items:center;margin-top:4px;">
383
- <kbd id="inspect-shortcut-current" style="flex:1;font-family:monospace;padding:4px 8px;background:var(--surface-2,#222);border-radius:4px;font-size:12px;">Ctrl</kbd>
384
- <button id="inspect-shortcut-record" type="button" class="btn btn-ghost" style="padding:4px 10px;">Record</button>
385
- <button id="inspect-shortcut-reset" type="button" class="btn btn-ghost" style="padding:4px 10px;">Reset</button>
538
+ <span class="setting-title">Inspect Shortcut</span>
539
+ <div class="shortcut-recorder-row">
540
+ <kbd id="inspect-shortcut-current" class="kbd">Ctrl</kbd>
541
+ <button id="inspect-shortcut-record" type="button" class="pill-btn">Record</button>
542
+ <button id="inspect-shortcut-reset" type="button" class="pill-btn">Reset</button>
543
+ </div>
544
+ </div>
545
+
546
+ <div class="setting-group">
547
+ <span class="setting-title">Privacy &amp; Data</span>
548
+ <label class="toggle-row">
549
+ <div>
550
+ <span>Usage insights</span>
551
+ <small style="display:block;color:var(--text-muted);font-size:10px;">Anonymous, never query text</small>
386
552
  </div>
387
- <small style="color:var(--text-muted,#888);font-size:11px;">
388
- Hold + click any element on a page to jump to its source. Default
389
- is Ctrl (or ⌘ on Mac). Click "Record" then press the chord you
390
- want — modifiers alone or modifier+letter both work.
391
- </small>
553
+ <input type="checkbox" id="insights-enabled" checked>
554
+ </label>
555
+ <label class="toggle-row">
556
+ <div>
557
+ <span>Contribute to training</span>
558
+ <small style="display:block;color:var(--text-muted);font-size:10px;">Opt-in to share searches &amp; answers</small>
559
+ </div>
560
+ <input type="checkbox" id="share-training">
392
561
  </label>
393
562
  </div>
394
-
395
- <button id="save-settings" class="btn btn-primary">Save Settings</button>
396
563
  </div>
397
564
  </div>
398
565
 
399
- <!-- Footer: version + nav links -->
400
- <div class="footer-version" style="text-align:center;font-size:10px;color:var(--text-muted,#888);margin-top:14px;letter-spacing:0.04em;">
401
- Hanzo AI <span id="footer-version">…</span>
402
- </div>
403
- <div class="footer-links">
404
- <a href="https://docs.hanzo.ai" target="_blank">Docs</a>
405
- <a href="https://console.hanzo.ai" target="_blank">Console</a>
406
- <a href="https://github.com/hanzoai/extension" target="_blank">GitHub</a>
407
- <a href="https://hanzo.ai" target="_blank">hanzo.ai</a>
408
- </div>
566
+ <!-- Sleek Minimal Footer -->
567
+ <footer class="footer">
568
+ <div class="footer-status">
569
+ <span class="green-indicator"></span>
570
+ <span>api.hanzo.ai</span>
571
+ </div>
572
+ <div class="footer-links">
573
+ <a href="https://hanzo.ai" target="_blank" rel="noreferrer">hanzo.ai</a>
574
+ <a href="https://docs.hanzo.ai" target="_blank" rel="noreferrer">Docs</a>
575
+ <span id="footer-version" class="version-label">v1.9.71</span>
576
+ </div>
577
+ </footer>
409
578
  </div>
410
579
 
411
580
  <script src="popup.js"></script>