@nastechai/agent 0.16.0 → 0.17.0
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/eslint.config.js +23 -0
- package/index.html +24 -0
- package/package.json +54 -26
- package/package.json.bak +89 -0
- package/package.json.pub +88 -0
- package/src/App.tsx +1173 -0
- package/src/components/AuthWidget.tsx +150 -0
- package/src/components/AutoField.tsx +206 -0
- package/src/components/Backdrop.tsx +93 -0
- package/src/components/ChatSidebar.tsx +394 -0
- package/src/components/DeleteConfirmDialog.tsx +40 -0
- package/src/components/LanguageSwitcher.tsx +186 -0
- package/src/components/Markdown.tsx +383 -0
- package/src/components/ModelInfoCard.tsx +112 -0
- package/src/components/ModelPickerDialog.tsx +470 -0
- package/src/components/OAuthLoginModal.tsx +374 -0
- package/src/components/OAuthProvidersCard.tsx +287 -0
- package/src/components/PlatformsCard.tsx +97 -0
- package/src/components/ScheduleBuilder.tsx +273 -0
- package/src/components/SidebarFooter.tsx +42 -0
- package/src/components/SidebarStatusStrip.tsx +72 -0
- package/src/components/SlashPopover.tsx +171 -0
- package/src/components/ThemeSwitcher.tsx +243 -0
- package/src/components/ToolCall.tsx +228 -0
- package/src/components/ToolsetConfigDrawer.tsx +448 -0
- package/src/contexts/PageHeaderProvider.tsx +139 -0
- package/src/contexts/SystemActions.tsx +120 -0
- package/src/contexts/page-header-context.ts +12 -0
- package/src/contexts/system-actions-context.ts +18 -0
- package/src/contexts/usePageHeader.ts +10 -0
- package/src/contexts/useSystemActions.ts +15 -0
- package/src/hooks/useModalBehavior.ts +44 -0
- package/src/hooks/useSidebarStatus.ts +27 -0
- package/src/i18n/af.ts +702 -0
- package/src/i18n/context.tsx +123 -0
- package/src/i18n/de.ts +701 -0
- package/src/i18n/en.ts +708 -0
- package/src/i18n/es.ts +701 -0
- package/src/i18n/fr.ts +701 -0
- package/src/i18n/ga.ts +702 -0
- package/src/i18n/hu.ts +702 -0
- package/src/i18n/index.ts +2 -0
- package/src/i18n/it.ts +701 -0
- package/src/i18n/ja.ts +702 -0
- package/src/i18n/ko.ts +702 -0
- package/src/i18n/pt.ts +702 -0
- package/src/i18n/ru.ts +702 -0
- package/src/i18n/tr.ts +702 -0
- package/src/i18n/types.ts +710 -0
- package/src/i18n/uk.ts +702 -0
- package/src/i18n/zh-hant.ts +702 -0
- package/src/i18n/zh.ts +698 -0
- package/src/index.css +274 -0
- package/src/lib/api.ts +1585 -0
- package/src/lib/dashboard-flags.ts +15 -0
- package/src/lib/format.ts +9 -0
- package/src/lib/fuzzy.ts +192 -0
- package/src/lib/gatewayClient.ts +253 -0
- package/src/lib/nested.ts +23 -0
- package/src/lib/resolve-page-title.ts +41 -0
- package/src/lib/schedule.ts +382 -0
- package/src/lib/slashExec.ts +163 -0
- package/src/lib/utils.ts +35 -0
- package/src/main.tsx +25 -0
- package/src/pages/AnalyticsPage.tsx +601 -0
- package/src/pages/ChannelsPage.tsx +772 -0
- package/src/pages/ChatPage.tsx +889 -0
- package/src/pages/ConfigPage.tsx +660 -0
- package/src/pages/CronPage.tsx +524 -0
- package/src/pages/DocsPage.tsx +69 -0
- package/src/pages/EnvPage.tsx +918 -0
- package/src/pages/LogsPage.tsx +246 -0
- package/src/pages/McpPage.tsx +757 -0
- package/src/pages/ModelsPage.tsx +994 -0
- package/src/pages/PairingPage.tsx +276 -0
- package/src/pages/PluginsPage.tsx +580 -0
- package/src/pages/ProfilesPage.tsx +559 -0
- package/src/pages/SessionsPage.tsx +936 -0
- package/src/pages/SkillsPage.tsx +557 -0
- package/src/pages/SystemPage.tsx +1259 -0
- package/src/pages/WebhooksPage.tsx +483 -0
- package/src/plugins/PluginPage.tsx +64 -0
- package/src/plugins/index.ts +6 -0
- package/src/plugins/registry.ts +151 -0
- package/src/plugins/sdk.d.ts +160 -0
- package/src/plugins/slots.ts +199 -0
- package/src/plugins/types.ts +37 -0
- package/src/plugins/usePlugins.ts +133 -0
- package/src/themes/context.tsx +443 -0
- package/src/themes/fonts.ts +160 -0
- package/src/themes/index.ts +3 -0
- package/src/themes/presets.ts +477 -0
- package/src/themes/types.ts +187 -0
- package/tsconfig.app.json +34 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +26 -0
- package/vite.config.ts +124 -0
- package/vite.config.ts.timestamp-1780999102396-af6b77b30ebd8.mjs +105 -0
package/src/index.css
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
@import 'tailwindcss';
|
|
2
|
+
/* `fonts.css` must come BEFORE `globals.css`: as of @nastech-ui 0.14.x,
|
|
3
|
+
`globals.css` only declares the `--font-*` CSS variables (Collapse, Rules
|
|
4
|
+
Compressed/Expanded, Mondwest). The `@font-face` registrations live in
|
|
5
|
+
`fonts.css`, so without this import the DS variables resolve to font
|
|
6
|
+
families the browser never loads and components fall back to a system
|
|
7
|
+
stack (Tabs, Segmented, Typography, Buttons, etc. all look unstyled). */
|
|
8
|
+
@import '@nastechai/ui/styles/fonts.css';
|
|
9
|
+
@import '@nastechai/ui/styles/globals.css';
|
|
10
|
+
|
|
11
|
+
/* Scan the published design-system bundle so its utility classes survive
|
|
12
|
+
Tailwind's JIT purge. */
|
|
13
|
+
@source '../node_modules/@nastechai/ui/dist';
|
|
14
|
+
|
|
15
|
+
/* ------------------------------------------------------------------ */
|
|
16
|
+
/* JetBrains Mono — bundled for the embedded TUI (/chat tab). */
|
|
17
|
+
/* Gives the terminal a proper monospace font even on systems where */
|
|
18
|
+
/* the user doesn't have one installed locally; xterm.js picks it up */
|
|
19
|
+
/* via ChatPage's `fontFamily` option. */
|
|
20
|
+
/* Apache-2.0. */
|
|
21
|
+
/* ------------------------------------------------------------------ */
|
|
22
|
+
|
|
23
|
+
@font-face {
|
|
24
|
+
font-family: 'JetBrains Mono';
|
|
25
|
+
font-style: normal;
|
|
26
|
+
font-weight: 400;
|
|
27
|
+
font-display: swap;
|
|
28
|
+
src: url('/fonts-terminal/JetBrainsMono-Regular.woff2') format('woff2');
|
|
29
|
+
}
|
|
30
|
+
@font-face {
|
|
31
|
+
font-family: 'JetBrains Mono';
|
|
32
|
+
font-style: normal;
|
|
33
|
+
font-weight: 700;
|
|
34
|
+
font-display: swap;
|
|
35
|
+
src: url('/fonts-terminal/JetBrainsMono-Bold.woff2') format('woff2');
|
|
36
|
+
}
|
|
37
|
+
@font-face {
|
|
38
|
+
font-family: 'JetBrains Mono';
|
|
39
|
+
font-style: italic;
|
|
40
|
+
font-weight: 400;
|
|
41
|
+
font-display: swap;
|
|
42
|
+
src: url('/fonts-terminal/JetBrainsMono-Italic.woff2') format('woff2');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* ------------------------------------------------------------------ */
|
|
46
|
+
/* NasTech Agent — NasTech DS with the LENS_0 (NasTech teal) lens applied */
|
|
47
|
+
/* statically. Mirrors nastech-web/(nastech-agent)/layout.tsx so the */
|
|
48
|
+
/* canonical NasTech palette is the default — teal canvas + cream */
|
|
49
|
+
/* accent — without relying on leva/gsap at runtime. */
|
|
50
|
+
/* ------------------------------------------------------------------ */
|
|
51
|
+
|
|
52
|
+
:root {
|
|
53
|
+
/* LENS_0 — from design-language/src/ui/components/overlays/index.tsx.
|
|
54
|
+
These are the defaults for the `default` (NasTech Teal) dashboard theme;
|
|
55
|
+
ThemeProvider rewrites them as inline styles when a user switches themes. */
|
|
56
|
+
--foreground: color-mix(in srgb, #ffffff 0%, transparent);
|
|
57
|
+
--foreground-base: #ffffff;
|
|
58
|
+
--foreground-alpha: 0;
|
|
59
|
+
--midground: color-mix(in srgb, #ffe6cb 100%, transparent);
|
|
60
|
+
--midground-base: #ffe6cb;
|
|
61
|
+
--midground-alpha: 1;
|
|
62
|
+
--background: color-mix(in srgb, #041c1c 100%, transparent);
|
|
63
|
+
--background-base: #041c1c;
|
|
64
|
+
--background-alpha: 1;
|
|
65
|
+
|
|
66
|
+
/* Consumed by <Backdrop />; also theme-switchable. */
|
|
67
|
+
--warm-glow: rgba(255, 189, 56, 0.35);
|
|
68
|
+
--noise-opacity-mul: 1;
|
|
69
|
+
|
|
70
|
+
/* Typography tokens — rewritten by ThemeProvider. Defaults match the
|
|
71
|
+
system stack so themes that don't override look native. */
|
|
72
|
+
--theme-font-sans: system-ui, -apple-system, "Segoe UI", Roboto,
|
|
73
|
+
"Helvetica Neue", Arial, sans-serif;
|
|
74
|
+
--theme-font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo,
|
|
75
|
+
Consolas, monospace;
|
|
76
|
+
--theme-font-display: var(--theme-font-sans);
|
|
77
|
+
--theme-base-size: 15px;
|
|
78
|
+
--theme-line-height: 1.55;
|
|
79
|
+
--theme-letter-spacing: 0;
|
|
80
|
+
|
|
81
|
+
/* Layout tokens. */
|
|
82
|
+
--radius: 0.5rem;
|
|
83
|
+
--theme-radius: 0.5rem;
|
|
84
|
+
--theme-spacing-mul: 1;
|
|
85
|
+
--theme-density: comfortable;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* Theme tokens cascade into the document root so every descendant inherits
|
|
89
|
+
the font stack, base size, and letter spacing without explicit calls. */
|
|
90
|
+
html {
|
|
91
|
+
font-family: var(--theme-font-sans);
|
|
92
|
+
font-size: var(--theme-base-size);
|
|
93
|
+
line-height: var(--theme-line-height);
|
|
94
|
+
letter-spacing: var(--theme-letter-spacing);
|
|
95
|
+
height: 100dvh;
|
|
96
|
+
max-height: 100dvh;
|
|
97
|
+
overflow: hidden;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
body {
|
|
101
|
+
font-family: var(--theme-font-sans);
|
|
102
|
+
min-height: 0;
|
|
103
|
+
height: 100%;
|
|
104
|
+
margin: 0;
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
code, kbd, pre, samp, .font-mono, .font-mono-ui {
|
|
109
|
+
font-family: var(--theme-font-mono);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Density: scale the shadcn spacing utilities via a multiplier. The DS
|
|
113
|
+
components use `p-N` / `gap-N` / `space-*` classes which resolve against
|
|
114
|
+
Tailwind's spacing scale; multiplying `--spacing` at :root scales them
|
|
115
|
+
all proportionally in Tailwind v4. */
|
|
116
|
+
@theme inline {
|
|
117
|
+
--spacing: calc(0.25rem * var(--theme-spacing-mul, 1));
|
|
118
|
+
--font-sans: var(--theme-font-sans);
|
|
119
|
+
--font-mono: var(--theme-font-mono);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
#root {
|
|
123
|
+
min-height: 0;
|
|
124
|
+
height: 100%;
|
|
125
|
+
max-height: 100%;
|
|
126
|
+
overflow: hidden;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@media (max-width: 768px) {
|
|
130
|
+
html,
|
|
131
|
+
body,
|
|
132
|
+
#root {
|
|
133
|
+
min-height: 100dvh;
|
|
134
|
+
height: auto;
|
|
135
|
+
max-height: none;
|
|
136
|
+
overflow-x: hidden;
|
|
137
|
+
overflow-y: auto;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* NasTech's nastech-agent layout bumps `small` and `code` to readable
|
|
142
|
+
dashboard sizes. Keep in sync. */
|
|
143
|
+
small { font-size: 1.0625rem; }
|
|
144
|
+
code { font-size: 0.875rem; }
|
|
145
|
+
|
|
146
|
+
/* Shadcn-compat tokens.
|
|
147
|
+
The dashboard's page code predates the Nous DS and uses shadcn-style
|
|
148
|
+
utility classes (bg-card, text-muted-foreground, border-border, etc.)
|
|
149
|
+
extensively. Rather than rewrite every call site, we expose those
|
|
150
|
+
tokens on top of the Nous palette so classes continue to resolve. */
|
|
151
|
+
@theme inline {
|
|
152
|
+
/* Remap foreground to midground so `text-foreground` / `bg-foreground`
|
|
153
|
+
stay visible — in LENS_0, `--foreground` itself has alpha 0. */
|
|
154
|
+
--color-foreground: var(--midground);
|
|
155
|
+
|
|
156
|
+
--color-card: color-mix(in srgb, var(--midground-base) 4%, var(--background-base));
|
|
157
|
+
--color-card-foreground: var(--midground);
|
|
158
|
+
--color-primary: var(--midground);
|
|
159
|
+
--color-primary-foreground: var(--background-base);
|
|
160
|
+
--color-secondary: color-mix(in srgb, var(--midground-base) 6%, var(--background-base));
|
|
161
|
+
--color-secondary-foreground: var(--midground);
|
|
162
|
+
--color-muted: color-mix(in srgb, var(--midground-base) 8%, var(--background-base));
|
|
163
|
+
/* Routes the shadcn `muted-foreground` slot through the DS semantic
|
|
164
|
+
text-secondary token (defaults to midground 80%) so legacy call
|
|
165
|
+
sites that use `text-muted-foreground` get a readable color
|
|
166
|
+
instead of the old 55%-transparent default. */
|
|
167
|
+
--color-muted-foreground: var(--color-text-secondary);
|
|
168
|
+
--color-accent: color-mix(in srgb, var(--midground-base) 10%, var(--background-base));
|
|
169
|
+
--color-accent-foreground: var(--midground);
|
|
170
|
+
--color-destructive: #fb2c36;
|
|
171
|
+
--color-destructive-foreground: #ffffff;
|
|
172
|
+
--color-success: #4ade80;
|
|
173
|
+
--color-warning: #ffbd38;
|
|
174
|
+
--color-border: color-mix(in srgb, var(--midground-base) 15%, transparent);
|
|
175
|
+
--color-input: color-mix(in srgb, var(--midground-base) 15%, transparent);
|
|
176
|
+
--color-ring: var(--midground);
|
|
177
|
+
--color-popover: color-mix(in srgb, var(--midground-base) 4%, var(--background-base));
|
|
178
|
+
--color-popover-foreground: var(--midground);
|
|
179
|
+
|
|
180
|
+
--radius-sm: calc(var(--theme-radius) - 4px);
|
|
181
|
+
--radius-md: calc(var(--theme-radius) - 2px);
|
|
182
|
+
--radius-lg: var(--theme-radius);
|
|
183
|
+
--radius-xl: calc(var(--theme-radius) + 4px);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
/* ── Global rounded corners ─────────────────────────────────────────────────
|
|
188
|
+
Every interactive element inherits the active theme's --theme-radius so
|
|
189
|
+
switching to a rounder theme (AMOLED, Cloud, Rosé) rounds everything, and
|
|
190
|
+
flat themes (Cyberpunk, Mono) keep their sharp look — no per-component
|
|
191
|
+
overrides needed. */
|
|
192
|
+
|
|
193
|
+
button,
|
|
194
|
+
[role="button"],
|
|
195
|
+
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
|
|
196
|
+
select,
|
|
197
|
+
textarea {
|
|
198
|
+
border-radius: var(--theme-radius, 0.5rem);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* Collapsed sidebar tooltip entrance — skipped when moving between items. */
|
|
202
|
+
@keyframes sidebar-tooltip-in {
|
|
203
|
+
from { opacity: 0; transform: translateY(-50%) translateX(-4px); }
|
|
204
|
+
to { opacity: 1; transform: translateY(-50%) translateX(0); }
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* Toast animations used by `components/Toast.tsx`. */
|
|
208
|
+
@keyframes toast-in {
|
|
209
|
+
from { opacity: 0; transform: translateX(16px); }
|
|
210
|
+
to { opacity: 1; transform: translateX(0); }
|
|
211
|
+
}
|
|
212
|
+
@keyframes toast-out {
|
|
213
|
+
from { opacity: 1; transform: translateX(0); }
|
|
214
|
+
to { opacity: 0; transform: translateX(16px); }
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* Generic fade + dialog entrance used by popovers and confirm dialogs. */
|
|
218
|
+
@keyframes fade-in {
|
|
219
|
+
from { opacity: 0; }
|
|
220
|
+
to { opacity: 1; }
|
|
221
|
+
}
|
|
222
|
+
@keyframes dialog-in {
|
|
223
|
+
from { opacity: 0; transform: translateY(4px) scale(0.98); }
|
|
224
|
+
to { opacity: 1; transform: translateY(0) scale(1); }
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* Hide scrollbar utility — used by the header's overflow-x nav row. */
|
|
228
|
+
.scrollbar-none {
|
|
229
|
+
-ms-overflow-style: none;
|
|
230
|
+
scrollbar-width: none;
|
|
231
|
+
}
|
|
232
|
+
.scrollbar-none::-webkit-scrollbar {
|
|
233
|
+
display: none;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* Plus-lighter blend used by logos/titles for a subtle glow. */
|
|
237
|
+
.blend-lighter {
|
|
238
|
+
mix-blend-mode: plus-lighter;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/* System UI-monospace stack — distinct from `font-courier` (Courier
|
|
242
|
+
Prime), used for dense data readouts where the display font would
|
|
243
|
+
break the grid. Routes through the theme's mono stack so themes
|
|
244
|
+
with a different monospace (JetBrains Mono, IBM Plex Mono, etc.)
|
|
245
|
+
still apply here. */
|
|
246
|
+
.font-mono-ui {
|
|
247
|
+
font-family: var(--theme-font-mono);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/* Subtle grain overlay for badges. */
|
|
251
|
+
.grain {
|
|
252
|
+
position: relative;
|
|
253
|
+
}
|
|
254
|
+
.grain::after {
|
|
255
|
+
content: '';
|
|
256
|
+
position: absolute;
|
|
257
|
+
inset: 0;
|
|
258
|
+
opacity: 0.12;
|
|
259
|
+
pointer-events: none;
|
|
260
|
+
background: repeating-conic-gradient(currentColor 0% 25%, #0000 0% 50%) 0 0 /
|
|
261
|
+
2px 2px;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/* When a theme provides `assets.bg`, the backdrop's <div> renders it as
|
|
265
|
+
a CSS background; the default filler <img> is hidden to prevent
|
|
266
|
+
double-compositing. Unset → initial → empty, so the :not() selector
|
|
267
|
+
matches and the default image stays visible. */
|
|
268
|
+
:root:not([style*="--theme-asset-bg:"]) .theme-default-filler {
|
|
269
|
+
display: block;
|
|
270
|
+
}
|
|
271
|
+
:root[style*="--theme-asset-bg:"] .theme-default-filler {
|
|
272
|
+
display: none;
|
|
273
|
+
}
|
|
274
|
+
|