@hanzo/browser-extension 1.9.35 → 1.9.46
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/safari/Hanzo AI/Hanzo AI.xcodeproj/project.pbxproj +1059 -0
- package/dist/safari/Hanzo AI/Hanzo AI.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AccentColor.colorset/Contents.json +11 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json +98 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-128@1x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-128@2x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-16@1x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-16@2x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-256@1x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-256@2x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-32@1x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-32@2x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-512@1x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/mac-icon-512@2x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/AppIcon.appiconset/universal-icon-1024@1x.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/Contents.json +6 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/LargeIcon.imageset/Contents.json +21 -0
- package/dist/safari/Hanzo AI/Shared (App)/Assets.xcassets/LargeIcon.imageset/icon128.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Resources/Base.lproj/Main.html +20 -0
- package/dist/safari/Hanzo AI/Shared (App)/Resources/Icon.png +0 -0
- package/dist/safari/Hanzo AI/Shared (App)/Resources/Script.js +24 -0
- package/dist/safari/Hanzo AI/Shared (App)/Resources/Style.css +61 -0
- package/dist/safari/Hanzo AI/Shared (App)/ViewController.swift +81 -0
- package/dist/safari/Hanzo AI/Shared (Extension)/SafariWebExtensionHandler.swift +42 -0
- package/dist/safari/Hanzo AI/iOS (App)/AppDelegate.swift +24 -0
- package/dist/safari/Hanzo AI/iOS (App)/Base.lproj/LaunchScreen.storyboard +36 -0
- package/dist/safari/Hanzo AI/iOS (App)/Base.lproj/Main.storyboard +38 -0
- package/dist/safari/Hanzo AI/iOS (App)/Info.plist +27 -0
- package/dist/safari/Hanzo AI/iOS (App)/SceneDelegate.swift +18 -0
- package/dist/safari/Hanzo AI/iOS (Extension)/Info.plist +13 -0
- package/dist/safari/Hanzo AI/macOS (App)/AppDelegate.swift +21 -0
- package/dist/safari/Hanzo AI/macOS (App)/Base.lproj/Main.storyboard +124 -0
- package/dist/safari/Hanzo AI/macOS (App)/Info.plist +8 -0
- package/dist/safari/Hanzo AI/macOS (Extension)/Info.plist +13 -0
- package/package.json +20 -14
- package/src/answer/AnswerEngine.tsx +180 -348
- package/src/answer/Composer.tsx +147 -0
- package/src/answer/Mark.tsx +14 -0
- package/src/answer/Models.tsx +118 -0
- package/src/answer/Rail.tsx +69 -0
- package/src/answer/Source.tsx +26 -0
- package/src/answer/Stories.tsx +27 -0
- package/src/answer/WidgetView.tsx +136 -0
- package/src/manifest.json +4 -1
- package/src/newtab.css +187 -35
- package/src/onboarding.css +78 -0
- package/src/onboarding.html +45 -0
- package/src/popup.html +29 -1
- package/src/sidebar.css +0 -40
- package/src/sidebar.html +5 -11
- package/LICENSE +0 -12
- package/src/chat-widget.tsx +0 -96
- package/src/gui-primitives.tsx +0 -116
package/src/newtab.css
CHANGED
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
/* Hanzo Answer Engine — strict monochrome (brand primaryColor #FFFFFF).
|
|
2
2
|
Shared tokens mirror popup.css / sidebar.css. */
|
|
3
3
|
:root {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
--
|
|
7
|
-
--surface
|
|
8
|
-
--
|
|
9
|
-
--
|
|
10
|
-
--
|
|
11
|
-
--
|
|
12
|
-
--
|
|
13
|
-
--
|
|
14
|
-
--
|
|
4
|
+
/* hanzo.chat dark palette — the exact gray scale from chat/client/src/style.css
|
|
5
|
+
(.dark). One brand, one set of tokens; the extension is no longer its own look. */
|
|
6
|
+
--bg: #000000; /* surface-primary / gray-975 */
|
|
7
|
+
--surface: #050505; /* surface-secondary / gray-950 — source & hero cards */
|
|
8
|
+
--surface-2: #0d0d0d; /* surface-primary-contrast / gray-900 — hover fills */
|
|
9
|
+
--surface-3: #171717; /* surface-tertiary / gray-850 — number pills, selected mode */
|
|
10
|
+
--surface-active: #2f2f2f;/* surface-active / gray-700 — selected chip (NOT a white lozenge) */
|
|
11
|
+
--text: #ececec; /* text-primary / gray-100 */
|
|
12
|
+
--text-2: #cdcdcd; /* text-secondary / gray-300 */
|
|
13
|
+
--text-3: #999696; /* text-secondary-alt / gray-400 */
|
|
14
|
+
--border: #171717; /* border-light / gray-850 */
|
|
15
|
+
--border-2: #212121; /* border-medium / gray-800 */
|
|
16
|
+
--glass: rgba(255, 255, 255, 0.03);
|
|
17
|
+
--glass-2: rgba(255, 255, 255, 0.06);
|
|
15
18
|
--radius: 12px;
|
|
16
19
|
--radius-sm: 8px;
|
|
17
20
|
--radius-xs: 6px;
|
|
18
21
|
--sidebar-w: 232px;
|
|
22
|
+
/* The icon-rail width is @hanzo/ui primitives/sidebar's SIDEBAR_WIDTH_ICON
|
|
23
|
+
(3rem). Kept as that value, not a local guess, so the rail here and the
|
|
24
|
+
shared primitive collapse to the same size on every surface. */
|
|
25
|
+
--rail-w: 3rem;
|
|
19
26
|
}
|
|
20
27
|
|
|
21
28
|
* { box-sizing: border-box; }
|
|
@@ -37,7 +44,31 @@ a { color: inherit; text-decoration: none; }
|
|
|
37
44
|
height: 100vh;
|
|
38
45
|
transition: grid-template-columns 0.18s ease;
|
|
39
46
|
}
|
|
40
|
-
|
|
47
|
+
/* COLLAPSED IS AN ICON RAIL, NEVER NOTHING.
|
|
48
|
+
`grid-template-columns: 0` + `display:none` erased the sidebar outright, so the
|
|
49
|
+
surface had no brand, no way back, and read as a blank page. This is the
|
|
50
|
+
`collapsible="icon"` behaviour of @hanzo/ui primitives/sidebar, and the width is
|
|
51
|
+
ITS token (SIDEBAR_WIDTH_ICON = 3rem) rather than a number picked here — so
|
|
52
|
+
swapping this rail for the shared primitive is a substitution, not a redesign. */
|
|
53
|
+
.ae-root.collapsed { grid-template-columns: var(--rail-w) 1fr; }
|
|
54
|
+
|
|
55
|
+
/* Hovering THE RAIL opens it — matched with :has() on the sidebar, never on
|
|
56
|
+
.ae-root. .ae-root is the full-viewport grid container, so `.ae-root:hover`
|
|
57
|
+
is true anywhere on the page: the sidebar would spring open while the pointer
|
|
58
|
+
sat in the answer column. Measured, not guessed.
|
|
59
|
+
Pointer-only, so a touch device is not stuck half-open; :focus-within is the
|
|
60
|
+
keyboard equivalent. */
|
|
61
|
+
@media (hover: hover) and (pointer: fine) {
|
|
62
|
+
.ae-root.collapsed:has(.ae-sidebar:hover),
|
|
63
|
+
.ae-root.collapsed:has(.ae-sidebar:focus-within) {
|
|
64
|
+
grid-template-columns: var(--sidebar-w) 1fr;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/* Labels follow the SIDEBAR's own state, for the same reason. */
|
|
68
|
+
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-brand span,
|
|
69
|
+
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-new span,
|
|
70
|
+
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-nav,
|
|
71
|
+
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-signin-label { display: none; }
|
|
41
72
|
|
|
42
73
|
/* ── Sidebar ─────────────────────────────────────────────── */
|
|
43
74
|
.ae-sidebar {
|
|
@@ -68,11 +99,11 @@ a { color: inherit; text-decoration: none; }
|
|
|
68
99
|
.ae-new {
|
|
69
100
|
display: flex; align-items: center; gap: 8px;
|
|
70
101
|
margin-top: 8px; padding: 9px 12px;
|
|
71
|
-
background: var(--
|
|
72
|
-
border-radius: var(--radius-sm); font-size: 13px; font-weight:
|
|
102
|
+
background: var(--surface-3); color: var(--text); border: 1px solid var(--border-2);
|
|
103
|
+
border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
|
|
73
104
|
white-space: nowrap; overflow: hidden;
|
|
74
105
|
}
|
|
75
|
-
.ae-new:hover { background: #
|
|
106
|
+
.ae-new:hover { background: var(--surface-hover, #212121); border-color: var(--border-2); }
|
|
76
107
|
.ae-nav { display: flex; flex-direction: column; margin-top: 12px; gap: 1px; }
|
|
77
108
|
.ae-nav a {
|
|
78
109
|
padding: 8px 10px; border-radius: var(--radius-xs);
|
|
@@ -88,7 +119,16 @@ a { color: inherit; text-decoration: none; }
|
|
|
88
119
|
}
|
|
89
120
|
.ae-signin:hover { border-color: var(--border-2); background: var(--surface-2); }
|
|
90
121
|
.ae-signin.big { width: auto; padding: 10px 18px; font-size: 14px; }
|
|
91
|
-
|
|
122
|
+
/* Icon-rail geometry. Centre the glyphs and drop the label gaps so a 3rem rail
|
|
123
|
+
holds them without clipping; the :not(:hover) rules above own visibility. */
|
|
124
|
+
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) { padding: 14px 6px; align-items: center; overflow: hidden; }
|
|
125
|
+
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-side-top { justify-content: center; }
|
|
126
|
+
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-collapse { display: none; }
|
|
127
|
+
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-brand,
|
|
128
|
+
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-new,
|
|
129
|
+
.ae-root.collapsed .ae-sidebar:not(:hover):not(:focus-within) .ae-signin {
|
|
130
|
+
gap: 0; padding: 8px; justify-content: center; width: auto;
|
|
131
|
+
}
|
|
92
132
|
|
|
93
133
|
/* ── Main ────────────────────────────────────────────────── */
|
|
94
134
|
.ae-main { min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
|
|
@@ -98,10 +138,6 @@ a { color: inherit; text-decoration: none; }
|
|
|
98
138
|
flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
|
|
99
139
|
gap: 26px; padding: 24px; overflow-y: auto;
|
|
100
140
|
}
|
|
101
|
-
.ae-wordmark {
|
|
102
|
-
display: flex; align-items: center; gap: 14px;
|
|
103
|
-
font-size: 46px; font-weight: 600; letter-spacing: -0.03em; color: var(--text);
|
|
104
|
-
}
|
|
105
141
|
.ae-hero-card { width: 100%; max-width: 720px; }
|
|
106
142
|
.ae-news { width: 100%; max-width: 720px; }
|
|
107
143
|
.ae-news-head, .ae-followups-head, .ae-model-group-label {
|
|
@@ -124,7 +160,15 @@ a { color: inherit; text-decoration: none; }
|
|
|
124
160
|
border: 1px solid var(--border-2);
|
|
125
161
|
border-radius: var(--radius);
|
|
126
162
|
box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.02);
|
|
127
|
-
overflow:
|
|
163
|
+
/* NOT overflow:hidden. The model picker menu is position:absolute inside this
|
|
164
|
+
card and opens UPWARD, so a clip here truncates it to the card's box: the
|
|
165
|
+
"Search models…" filter, the Auto row and the whole Enso group get cut off
|
|
166
|
+
and only the last row plus the plan banner survive — which reads as "the
|
|
167
|
+
picker is broken / Enso is missing" rather than as a clipping bug. Nothing
|
|
168
|
+
here needs clipping: .ae-input is transparent, .ae-card-row has no
|
|
169
|
+
background, and the chips/modes/send button carry their own radii and sit
|
|
170
|
+
inside the padding, so none of them paint into the rounded corners. */
|
|
171
|
+
overflow: visible;
|
|
128
172
|
}
|
|
129
173
|
.ae-input {
|
|
130
174
|
display: block; width: 100%; resize: none;
|
|
@@ -133,6 +177,10 @@ a { color: inherit; text-decoration: none; }
|
|
|
133
177
|
color: var(--text); font-family: inherit; font-size: 15px; line-height: 1.5;
|
|
134
178
|
}
|
|
135
179
|
.ae-input::placeholder { color: var(--text-3); }
|
|
180
|
+
/* The composer field is @hanzo/ui's Textarea (data-slot is the design system's
|
|
181
|
+
own marker). It auto-grows by line count, so the browser's manual resize
|
|
182
|
+
grip is noise inside the card. */
|
|
183
|
+
.ae-card textarea[data-slot="textarea"] { resize: none; }
|
|
136
184
|
.ae-card-row {
|
|
137
185
|
display: flex; align-items: center; justify-content: space-between;
|
|
138
186
|
gap: 8px; padding: 8px 10px 10px; flex-wrap: wrap;
|
|
@@ -143,8 +191,9 @@ a { color: inherit; text-decoration: none; }
|
|
|
143
191
|
background: var(--glass); border: 1px solid var(--border);
|
|
144
192
|
color: var(--text-3); font-size: 11px; font-family: inherit;
|
|
145
193
|
}
|
|
146
|
-
.ae-chip:hover { color: var(--text-2); }
|
|
147
|
-
|
|
194
|
+
.ae-chip:hover { color: var(--text-2); background: var(--surface-2); }
|
|
195
|
+
/* Selected is a step UP the surface ladder, not a white lozenge (chat ModeChips). */
|
|
196
|
+
.ae-chip.on { background: var(--surface-active); color: var(--text); border-color: transparent; font-weight: 500; }
|
|
148
197
|
.ae-card-right { display: flex; align-items: center; gap: 6px; }
|
|
149
198
|
.ae-modes { display: flex; gap: 2px; background: var(--glass); border-radius: var(--radius-xs); padding: 2px; }
|
|
150
199
|
.ae-mode {
|
|
@@ -152,7 +201,7 @@ a { color: inherit; text-decoration: none; }
|
|
|
152
201
|
color: var(--text-3); font-size: 11.5px; font-family: inherit; border-radius: 5px;
|
|
153
202
|
}
|
|
154
203
|
.ae-mode:hover { color: var(--text-2); }
|
|
155
|
-
.ae-mode.on { background: var(--surface-
|
|
204
|
+
.ae-mode.on { background: var(--surface-active); color: var(--text); font-weight: 500; }
|
|
156
205
|
.ae-send {
|
|
157
206
|
width: 34px; height: 34px; flex-shrink: 0; cursor: pointer;
|
|
158
207
|
display: flex; align-items: center; justify-content: center;
|
|
@@ -209,17 +258,23 @@ a { color: inherit; text-decoration: none; }
|
|
|
209
258
|
.ae-answer-scroll > * { max-width: 760px; margin-left: auto; margin-right: auto; }
|
|
210
259
|
.ae-question { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 20px; }
|
|
211
260
|
.ae-sources { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 16px; margin-bottom: 8px; }
|
|
261
|
+
/* Source card — chat AnswerView: 160px, number pill first, favicon, host, 3-line title. */
|
|
212
262
|
.ae-source {
|
|
213
|
-
flex: 0 0
|
|
214
|
-
padding: 10px
|
|
215
|
-
background: var(--surface);
|
|
263
|
+
flex: 0 0 168px; display: flex; flex-direction: column; gap: 6px;
|
|
264
|
+
padding: 10px; border: 1px solid var(--border); border-radius: var(--radius);
|
|
265
|
+
background: var(--surface); transition: background 0.12s ease;
|
|
216
266
|
}
|
|
217
|
-
.ae-source:hover {
|
|
267
|
+
.ae-source:hover { background: var(--surface-2); }
|
|
218
268
|
.ae-source-head { display: flex; align-items: center; gap: 6px; }
|
|
219
|
-
.ae-source-head img { border-radius: 3px; }
|
|
220
|
-
.ae-source-host { font-size: 11px; color: var(--text-
|
|
221
|
-
.ae-source-idx {
|
|
222
|
-
|
|
269
|
+
.ae-source-head img { border-radius: 3px; flex-shrink: 0; }
|
|
270
|
+
.ae-source-host { font-size: 11px; color: var(--text-2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
271
|
+
.ae-source-idx {
|
|
272
|
+
flex: 0 0 auto; width: 16px; height: 16px; padding: 0; border: none;
|
|
273
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
274
|
+
font-size: 10px; font-weight: 500; color: var(--text-2);
|
|
275
|
+
background: var(--surface-3); border-radius: 50%;
|
|
276
|
+
}
|
|
277
|
+
.ae-source-title { font-size: 12px; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
223
278
|
|
|
224
279
|
.ae-status { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; padding: 8px 0; }
|
|
225
280
|
|
|
@@ -260,11 +315,31 @@ a { color: inherit; text-decoration: none; }
|
|
|
260
315
|
@keyframes ae-spin { to { transform: rotate(360deg); } }
|
|
261
316
|
|
|
262
317
|
@media (max-width: 720px) {
|
|
263
|
-
|
|
264
|
-
|
|
318
|
+
/* The rail SURVIVES on mobile as icons. `display:none` here used to be safe only
|
|
319
|
+
because a fixed reveal button floated above it; that button is gone (the rail
|
|
320
|
+
carries its own control now), so hiding the sidebar would leave a phone with no
|
|
321
|
+
brand, no new-thread and no sign-in at all. 3rem is 48px — it costs almost
|
|
322
|
+
nothing and keeps one layout from phone to desktop.
|
|
323
|
+
Hover-open does not apply here: the rule above is gated on (hover: hover), so a
|
|
324
|
+
touch device toggles with the button rather than sticking half-open. */
|
|
325
|
+
.ae-root, .ae-root.collapsed { grid-template-columns: var(--rail-w) 1fr; }
|
|
326
|
+
/* Hover must NOT widen the rail here. 232px out of a 390px viewport leaves the
|
|
327
|
+
answer column unreadable, and a desktop browser at a small window still
|
|
328
|
+
reports a fine pointer — so the (hover: hover) guard alone does not cover it.
|
|
329
|
+
This block is later in the file at equal specificity, so it wins. */
|
|
330
|
+
.ae-root.collapsed:has(.ae-sidebar:hover),
|
|
331
|
+
.ae-root.collapsed:has(.ae-sidebar:focus-within) {
|
|
332
|
+
grid-template-columns: var(--rail-w) 1fr;
|
|
333
|
+
}
|
|
334
|
+
/* Explicitly opened, the sidebar OVERLAYS rather than pushing: the grid keeps
|
|
335
|
+
the rail's width so the content column never shrinks. */
|
|
336
|
+
.ae-root:not(.collapsed) { grid-template-columns: var(--rail-w) 1fr; }
|
|
337
|
+
.ae-root:not(.collapsed) .ae-sidebar {
|
|
338
|
+
position: fixed; top: 0; bottom: 0; left: 0; width: var(--sidebar-w);
|
|
339
|
+
z-index: 60; box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
|
|
340
|
+
}
|
|
265
341
|
.ae-news-grid { grid-template-columns: 1fr; }
|
|
266
342
|
.ae-hero { gap: 20px; padding: 20px 16px; justify-content: flex-start; padding-top: 48px; }
|
|
267
|
-
.ae-wordmark { font-size: 34px; }
|
|
268
343
|
.ae-answer-scroll { padding: 20px 16px 16px; }
|
|
269
344
|
.ae-answer-composer { padding: 10px 16px 16px; }
|
|
270
345
|
.ae-question { font-size: 21px; }
|
|
@@ -275,3 +350,80 @@ a { color: inherit; text-decoration: none; }
|
|
|
275
350
|
.ae-modes { flex: 1; justify-content: space-between; }
|
|
276
351
|
.ae-source { flex-basis: 150px; }
|
|
277
352
|
}
|
|
353
|
+
|
|
354
|
+
/* The fallback escape hatch on the expired-session card. Quiet: it is the
|
|
355
|
+
second choice, offered so the surface is never a dead end. */
|
|
356
|
+
.ae-fallback-link {
|
|
357
|
+
display: inline-block; margin-top: 12px;
|
|
358
|
+
color: var(--text-3); font-size: 13px; text-decoration: underline;
|
|
359
|
+
text-underline-offset: 3px;
|
|
360
|
+
}
|
|
361
|
+
.ae-fallback-link:hover { color: var(--text); }
|
|
362
|
+
|
|
363
|
+
/* ── Generative result widgets ───────────────────────────── */
|
|
364
|
+
/* margin-left/right stay AUTO: .ae-answer-scroll > * centres its children at
|
|
365
|
+
760px, and a `margin: 4px 0 18px` shorthand here silently resets those to 0 —
|
|
366
|
+
the widgets then hugged the left edge while the prose beside them stayed
|
|
367
|
+
centred. Set only the block margins. */
|
|
368
|
+
.ae-widgets {
|
|
369
|
+
display: flex; flex-direction: column; gap: 14px;
|
|
370
|
+
margin-top: 4px; margin-bottom: 18px;
|
|
371
|
+
}
|
|
372
|
+
.ae-widget {
|
|
373
|
+
border: 1px solid var(--border); border-radius: var(--radius);
|
|
374
|
+
background: var(--surface); padding: 16px 18px;
|
|
375
|
+
}
|
|
376
|
+
.ae-widget-title {
|
|
377
|
+
margin: 0 0 10px; font-size: 14px; font-weight: 600;
|
|
378
|
+
color: var(--text); letter-spacing: -0.01em;
|
|
379
|
+
}
|
|
380
|
+
.ae-widget-subtitle { margin: -6px 0 12px; font-size: 13px; color: var(--text-3); }
|
|
381
|
+
|
|
382
|
+
/* A wide table scrolls INSIDE its own box; the page never scrolls sideways. */
|
|
383
|
+
.ae-widget-scroll { overflow-x: auto; }
|
|
384
|
+
.ae-widget-table { border-collapse: collapse; width: 100%; font-size: 13px; }
|
|
385
|
+
.ae-widget-table th, .ae-widget-table td {
|
|
386
|
+
text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border);
|
|
387
|
+
vertical-align: top;
|
|
388
|
+
}
|
|
389
|
+
.ae-widget-table thead th { color: var(--text-3); font-weight: 500; white-space: nowrap; }
|
|
390
|
+
.ae-widget-table tbody th { color: var(--text); font-weight: 500; }
|
|
391
|
+
.ae-widget-table td { color: var(--text-2); }
|
|
392
|
+
.ae-widget-table tr:last-child th, .ae-widget-table tr:last-child td { border-bottom: none; }
|
|
393
|
+
|
|
394
|
+
.ae-widget-steplist { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
|
|
395
|
+
.ae-widget-steplist li { font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
|
|
396
|
+
.ae-widget-steplist li::marker { color: var(--text-3); }
|
|
397
|
+
|
|
398
|
+
.ae-widget-statgrid {
|
|
399
|
+
display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px;
|
|
400
|
+
}
|
|
401
|
+
.ae-widget-stat { display: flex; flex-direction: column; gap: 2px; }
|
|
402
|
+
.ae-widget-statvalue {
|
|
403
|
+
font-size: 20px; font-weight: 600; color: var(--text);
|
|
404
|
+
font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
|
|
405
|
+
}
|
|
406
|
+
.ae-widget-statlabel { font-size: 12px; color: var(--text-3); }
|
|
407
|
+
|
|
408
|
+
.ae-widget-events { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
|
|
409
|
+
.ae-widget-events li { display: grid; grid-template-columns: minmax(72px, auto) 1fr; gap: 14px; }
|
|
410
|
+
.ae-widget-when { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
|
|
411
|
+
.ae-widget-what { font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
|
|
412
|
+
|
|
413
|
+
.ae-widget-facts { margin: 0; display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 8px 16px; }
|
|
414
|
+
.ae-widget-facts dt { font-size: 12.5px; color: var(--text-3); }
|
|
415
|
+
.ae-widget-facts dd { margin: 0; font-size: 13.5px; color: var(--text-2); }
|
|
416
|
+
|
|
417
|
+
.ae-widget-meaning { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-2); }
|
|
418
|
+
.ae-widget-example {
|
|
419
|
+
margin: 12px 0 0; padding: 10px 12px; overflow-x: auto;
|
|
420
|
+
background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
|
|
421
|
+
font-size: 12.5px; color: var(--text-2); white-space: pre-wrap;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
@media (max-width: 720px) {
|
|
425
|
+
.ae-widget { padding: 14px; }
|
|
426
|
+
.ae-widget-events li { grid-template-columns: 1fr; gap: 2px; }
|
|
427
|
+
.ae-widget-facts { grid-template-columns: 1fr; gap: 2px 0; }
|
|
428
|
+
.ae-widget-facts dd { margin-bottom: 8px; }
|
|
429
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--bg: #0b0b0c;
|
|
3
|
+
--card: #131315;
|
|
4
|
+
--line: #26262a;
|
|
5
|
+
--text: #f4f4f5;
|
|
6
|
+
--muted: #9a9aa2;
|
|
7
|
+
--accent: #f4f4f5;
|
|
8
|
+
}
|
|
9
|
+
* { box-sizing: border-box; }
|
|
10
|
+
html, body {
|
|
11
|
+
margin: 0;
|
|
12
|
+
height: 100%;
|
|
13
|
+
background: var(--bg);
|
|
14
|
+
color: var(--text);
|
|
15
|
+
font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
16
|
+
}
|
|
17
|
+
body { display: grid; place-items: center; padding: 32px; }
|
|
18
|
+
.card {
|
|
19
|
+
width: 100%;
|
|
20
|
+
max-width: 520px;
|
|
21
|
+
background: var(--card);
|
|
22
|
+
border: 1px solid var(--line);
|
|
23
|
+
border-radius: 16px;
|
|
24
|
+
padding: 32px;
|
|
25
|
+
}
|
|
26
|
+
.brand { font-weight: 700; letter-spacing: 0.02em; opacity: 0.7; margin-bottom: 20px; }
|
|
27
|
+
h1 { font-size: 24px; margin: 0 0 8px; }
|
|
28
|
+
.lede { color: var(--muted); margin: 0 0 24px; }
|
|
29
|
+
.row {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: flex-start;
|
|
32
|
+
gap: 12px;
|
|
33
|
+
padding: 14px 0;
|
|
34
|
+
border-top: 1px solid var(--line);
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
.row input { position: absolute; opacity: 0; width: 0; height: 0; }
|
|
38
|
+
.switch {
|
|
39
|
+
flex: 0 0 auto;
|
|
40
|
+
width: 38px;
|
|
41
|
+
height: 22px;
|
|
42
|
+
border-radius: 999px;
|
|
43
|
+
background: #3a3a40;
|
|
44
|
+
position: relative;
|
|
45
|
+
transition: background 0.15s;
|
|
46
|
+
margin-top: 2px;
|
|
47
|
+
}
|
|
48
|
+
.switch::after {
|
|
49
|
+
content: "";
|
|
50
|
+
position: absolute;
|
|
51
|
+
top: 2px;
|
|
52
|
+
left: 2px;
|
|
53
|
+
width: 18px;
|
|
54
|
+
height: 18px;
|
|
55
|
+
border-radius: 50%;
|
|
56
|
+
background: #fff;
|
|
57
|
+
transition: transform 0.15s;
|
|
58
|
+
}
|
|
59
|
+
.row input:checked + .switch { background: var(--accent); }
|
|
60
|
+
.row input:checked + .switch::after { transform: translateX(16px); background: #0b0b0c; }
|
|
61
|
+
.text { display: flex; flex-direction: column; gap: 2px; }
|
|
62
|
+
.text strong { font-weight: 600; }
|
|
63
|
+
.text small { color: var(--muted); }
|
|
64
|
+
.cta {
|
|
65
|
+
width: 100%;
|
|
66
|
+
margin-top: 24px;
|
|
67
|
+
padding: 12px;
|
|
68
|
+
border: 0;
|
|
69
|
+
border-radius: 10px;
|
|
70
|
+
background: var(--accent);
|
|
71
|
+
color: #0b0b0c;
|
|
72
|
+
font-weight: 600;
|
|
73
|
+
font-size: 15px;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
}
|
|
76
|
+
.cta:active { transform: translateY(1px); }
|
|
77
|
+
.fine { color: var(--muted); font-size: 12px; text-align: center; margin: 16px 0 0; }
|
|
78
|
+
.fine a { color: var(--text); }
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>Welcome to Hanzo</title>
|
|
7
|
+
<link rel="stylesheet" href="onboarding.css" />
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<main class="card">
|
|
11
|
+
<div class="brand">Hanzo</div>
|
|
12
|
+
<h1>Welcome to Hanzo AI</h1>
|
|
13
|
+
<p class="lede">
|
|
14
|
+
Search, research and browse with Hanzo's own models. Before you start,
|
|
15
|
+
choose what you'd like to share — you can change this anytime in settings
|
|
16
|
+
or on your Hanzo account.
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<label class="row">
|
|
20
|
+
<input type="checkbox" id="ob-insights" checked />
|
|
21
|
+
<span class="switch"></span>
|
|
22
|
+
<span class="text">
|
|
23
|
+
<strong>Anonymous usage insights</strong>
|
|
24
|
+
<small>Helps us improve Hanzo. No search text, no personal data — just a random per-install id.</small>
|
|
25
|
+
</span>
|
|
26
|
+
</label>
|
|
27
|
+
|
|
28
|
+
<label class="row">
|
|
29
|
+
<input type="checkbox" id="ob-training" />
|
|
30
|
+
<span class="switch"></span>
|
|
31
|
+
<span class="text">
|
|
32
|
+
<strong>Contribute to training Hanzo's open models</strong>
|
|
33
|
+
<small>Share your own searches & answers so Hanzo's open models get better. Opt in — off unless you turn it on.</small>
|
|
34
|
+
</span>
|
|
35
|
+
</label>
|
|
36
|
+
|
|
37
|
+
<button id="ob-continue" class="cta">Get started</button>
|
|
38
|
+
<p class="fine">
|
|
39
|
+
Signed in? These choices save to your Hanzo account and stay in sync
|
|
40
|
+
everywhere. <a href="https://hanzo.ai/privacy" target="_blank" rel="noopener">Privacy</a>
|
|
41
|
+
</p>
|
|
42
|
+
</main>
|
|
43
|
+
<script src="onboarding.js"></script>
|
|
44
|
+
</body>
|
|
45
|
+
</html>
|
package/src/popup.html
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
</svg>
|
|
32
32
|
<h2 class="login-headline">Sign in to Hanzo AI</h2>
|
|
33
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
|
|
34
|
+
<button id="login-btn" class="login-signin-btn">Sign in</button>
|
|
35
35
|
<button id="signup-btn-popup" class="login-create-btn">Create account</button>
|
|
36
36
|
<p class="login-note">
|
|
37
37
|
Browser tools work without sign-in. <a href="https://docs.hanzo.ai" target="_blank">Learn more</a>
|
|
@@ -222,6 +222,34 @@
|
|
|
222
222
|
|
|
223
223
|
<div class="divider"></div>
|
|
224
224
|
|
|
225
|
+
<!-- Privacy & data -->
|
|
226
|
+
<h3>Privacy & 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>
|
|
235
|
+
</div>
|
|
236
|
+
</label>
|
|
237
|
+
</div>
|
|
238
|
+
|
|
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 & answers to train Hanzo's open models. Off by default.</small>
|
|
246
|
+
</div>
|
|
247
|
+
</label>
|
|
248
|
+
</div>
|
|
249
|
+
</div>
|
|
250
|
+
|
|
251
|
+
<div class="divider"></div>
|
|
252
|
+
|
|
225
253
|
<!-- Browser Backend -->
|
|
226
254
|
<div class="setting-group backend-picker">
|
|
227
255
|
<h3>Backend</h3>
|
package/src/sidebar.css
CHANGED
|
@@ -333,46 +333,6 @@ html {
|
|
|
333
333
|
color: var(--text-primary);
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
/* Glass login card */
|
|
337
|
-
.chat-modern-login-card {
|
|
338
|
-
width: min(320px, 100%);
|
|
339
|
-
border: 1px solid var(--border-strong);
|
|
340
|
-
border-radius: var(--radius);
|
|
341
|
-
background: var(--glass-strong);
|
|
342
|
-
backdrop-filter: blur(24px) saturate(180%);
|
|
343
|
-
-webkit-backdrop-filter: blur(24px) saturate(180%);
|
|
344
|
-
color: var(--text-primary);
|
|
345
|
-
box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.05);
|
|
346
|
-
padding: 28px 24px;
|
|
347
|
-
animation: fadeIn 0.5s ease;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
.chat-modern-login-card .chat-modern-auth-btn {
|
|
351
|
-
width: 100%;
|
|
352
|
-
margin-bottom: 14px;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
.chat-modern-login-card #signup-btn {
|
|
356
|
-
width: 100%;
|
|
357
|
-
margin-bottom: 14px;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
.chat-modern-login-card .auth-note {
|
|
361
|
-
font-size: 11px;
|
|
362
|
-
color: var(--text-tertiary);
|
|
363
|
-
margin: 0;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
.chat-modern-login-card .auth-note a {
|
|
367
|
-
color: var(--text-secondary);
|
|
368
|
-
text-decoration: underline;
|
|
369
|
-
text-underline-offset: 2px;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
.chat-modern-login-card .auth-note a:hover {
|
|
373
|
-
color: var(--text-primary);
|
|
374
|
-
}
|
|
375
|
-
|
|
376
336
|
/* ==================== Tab Bar ==================== */
|
|
377
337
|
|
|
378
338
|
.tab-bar {
|
package/src/sidebar.html
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
</svg>
|
|
35
35
|
<p class="auth-headline">Sign in to Hanzo AI</p>
|
|
36
36
|
<p class="auth-sub">Chat with Zen AI models, use browser tools, and build with AI agents.</p>
|
|
37
|
-
<button id="auth-btn" class="auth-signin-btn">Sign
|
|
37
|
+
<button id="auth-btn" class="auth-signin-btn">Sign in</button>
|
|
38
38
|
<button id="signup-btn" class="auth-create-btn">Create account</button>
|
|
39
39
|
<p class="auth-note">Browser tools work without sign-in. <a href="https://docs.hanzo.ai" target="_blank">Learn more</a></p>
|
|
40
40
|
</div>
|
|
@@ -59,12 +59,11 @@
|
|
|
59
59
|
<div style="display:flex;align-items:center;gap:4px;flex:1;min-width:0;overflow:hidden;">
|
|
60
60
|
<select id="model-select"
|
|
61
61
|
style="padding:3px 18px 3px 6px;background:rgba(255,255,255,0.07);border:1px solid rgba(255,255,255,0.10);border-radius:6px;color:#a3a3a3;font-size:10px;font-family:inherit;cursor:pointer;-moz-appearance:none;appearance:none;white-space:nowrap;max-width:110px;text-overflow:ellipsis;overflow:hidden;height:22px;line-height:16px;flex-shrink:0;">
|
|
62
|
+
<!-- Auto is the only hand-written entry: it is the router, always
|
|
63
|
+
valid. Every other option is appended by loadModels() from
|
|
64
|
+
chat.listModels, so the picker can never advertise a model the
|
|
65
|
+
account cannot reach. -->
|
|
62
66
|
<option value="auto">Auto</option>
|
|
63
|
-
<option value="claude-sonnet-4-20250514">Claude Sonnet 4</option>
|
|
64
|
-
<option value="claude-opus-4-20250514">Claude Opus 4</option>
|
|
65
|
-
<option value="gpt-4o">GPT-4o</option>
|
|
66
|
-
<option value="zen-coder-flash">Zen Coder Flash</option>
|
|
67
|
-
<option value="zen-max">Zen Max</option>
|
|
68
67
|
</select>
|
|
69
68
|
<label title="RAG context" style="display:inline-flex;align-items:center;gap:2px;font-size:10px;color:#666;cursor:pointer;white-space:nowrap;padding:2px 4px;flex-shrink:0;">
|
|
70
69
|
<input type="checkbox" id="rag-enabled" checked style="width:11px;height:11px;accent-color:#fafafa;cursor:pointer;margin:0;">
|
|
@@ -350,11 +349,6 @@
|
|
|
350
349
|
<span>Default Model</span>
|
|
351
350
|
<select id="default-model">
|
|
352
351
|
<option value="auto">Auto (cost-aware)</option>
|
|
353
|
-
<option value="claude-sonnet-4-20250514">Claude Sonnet 4</option>
|
|
354
|
-
<option value="claude-opus-4-20250514">Claude Opus 4</option>
|
|
355
|
-
<option value="gpt-4o">GPT-4o</option>
|
|
356
|
-
<option value="zen-coder-flash">Zen Coder Flash</option>
|
|
357
|
-
<option value="zen-max">Zen Max</option>
|
|
358
352
|
</select>
|
|
359
353
|
</label>
|
|
360
354
|
<label class="setting-item">
|
package/LICENSE
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
Copyright 2025 Hanzo Industries Inc
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
-
|
|
5
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
-
|
|
7
|
-
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
8
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
9
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
10
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
11
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
12
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|