@vezham/react 26.0.3 → 26.3.1
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/index.css +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/lib/components/command/command-dialog.js +1 -1
- package/dist/lib/components/command/command-provider.js +1 -1
- package/dist/lib/components/command/index.d.ts +0 -1
- package/dist/lib/components/command/index.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/control-center/control-center.js +1 -1
- package/dist/lib/components/panel/footer/control-center/editor.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/control-center/editor.js +19 -24
- package/dist/lib/components/panel/footer/control-center/theme.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/control-center/theme.js +2 -15
- package/dist/lib/components/panel/footer/control-center/variant.d.ts +3 -3
- package/dist/lib/components/panel/footer/control-center/variant.js +1 -1
- package/dist/lib/components/panel/footer/data.d.ts +1 -1
- package/dist/lib/components/panel/footer/data.js +1 -1
- package/dist/lib/components/panel/footer/index.d.ts +1 -1
- package/dist/lib/components/panel/footer/index.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/index.js +11 -9
- package/dist/lib/components/panel/footer/notification-center/index.js +1 -1
- package/dist/lib/components/panel/footer/tamizhi/index.d.ts +3 -0
- package/dist/lib/components/panel/footer/tamizhi/index.d.ts.map +1 -0
- package/dist/lib/components/panel/footer/tamizhi/index.js +20 -0
- package/dist/lib/components/panel/footer/types.d.ts +2 -3
- package/dist/lib/components/panel/footer/types.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/user-menu.d.ts +2 -2
- package/dist/lib/components/panel/footer/user-menu.d.ts.map +1 -1
- package/dist/lib/components/panel/footer/user-menu.js +127 -59
- package/dist/lib/components/panel/header/bookmarks/favorites/variant.js +2 -2
- package/dist/lib/components/panel/header/bookmarks/folder-modal/index.js +6 -6
- package/dist/lib/components/panel/header/bookmarks/index.js +1 -1
- package/dist/lib/components/panel/header/bookmarks/quick-access/index.js +9 -9
- package/dist/lib/components/panel/header/bookmarks/variant.js +22 -22
- package/dist/lib/components/panel/header/index.js +3 -3
- package/dist/lib/components/panel/info-panel/provider.d.ts.map +1 -1
- package/dist/lib/components/panel/info-panel/provider.js +20 -34
- package/dist/lib/components/panel/info-panel/types.d.ts +1 -1
- package/dist/lib/components/panel/info-panel/types.d.ts.map +1 -1
- package/dist/lib/components/panel/menu/index.js +4 -4
- package/dist/lib/components/panel/menu/variant.js +4 -4
- package/dist/lib/components/workspace-navigation/index.d.ts.map +1 -1
- package/dist/lib/components/workspace-navigation/index.js +1 -1
- package/dist/lib/layouts/app/frame.d.ts +2 -1
- package/dist/lib/layouts/app/frame.d.ts.map +1 -1
- package/dist/lib/layouts/app/frame.js +2 -2
- package/dist/lib/layouts/app/index.d.ts +7 -4
- package/dist/lib/layouts/app/index.d.ts.map +1 -1
- package/dist/lib/layouts/app/index.js +37 -6
- package/dist/lib/layouts/menu-layout/home-navigation-bubble.js +3 -3
- package/dist/lib/layouts/menu-layout/index-md.d.ts.map +1 -1
- package/dist/lib/layouts/menu-layout/index-md.js +19 -28
- package/dist/lib/layouts/menu-layout/index-sm.d.ts.map +1 -1
- package/dist/lib/layouts/menu-layout/index-sm.js +8 -20
- package/dist/lib/layouts/section/toolbar.js +1 -1
- package/dist/lib/pages/settings/settings-content.d.ts.map +1 -1
- package/dist/lib/pages/settings/settings-content.js +14 -26
- package/dist/lib/workspace/action-dialog.d.ts +9 -0
- package/dist/lib/workspace/action-dialog.d.ts.map +1 -0
- package/dist/lib/workspace/action-dialog.js +86 -0
- package/dist/lib/workspace/actions-menu.d.ts +8 -0
- package/dist/lib/workspace/actions-menu.d.ts.map +1 -0
- package/dist/lib/workspace/actions-menu.js +47 -0
- package/dist/lib/workspace/create-dialog.d.ts +5 -0
- package/dist/lib/workspace/create-dialog.d.ts.map +1 -0
- package/dist/lib/workspace/create-dialog.js +108 -0
- package/dist/lib/workspace/index.d.ts +34 -0
- package/dist/lib/workspace/index.d.ts.map +1 -0
- package/dist/lib/workspace/index.js +128 -0
- package/dist/lib/workspace/menu.d.ts +18 -0
- package/dist/lib/workspace/menu.d.ts.map +1 -0
- package/dist/lib/workspace/menu.js +148 -0
- package/dist/lib/workspace/model.d.ts +17 -0
- package/dist/lib/workspace/model.d.ts.map +1 -0
- package/dist/lib/workspace/model.js +35 -0
- package/package.json +3 -2
- package/dist/lib/components/command/index.js +0 -3
- package/dist/lib/components/panel/footer/ai/chat-header.d.ts +0 -9
- package/dist/lib/components/panel/footer/ai/chat-header.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/chat-header.js +0 -63
- package/dist/lib/components/panel/footer/ai/composer.d.ts +0 -7
- package/dist/lib/components/panel/footer/ai/composer.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/composer.js +0 -77
- package/dist/lib/components/panel/footer/ai/content.d.ts +0 -13
- package/dist/lib/components/panel/footer/ai/content.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/content.js +0 -148
- package/dist/lib/components/panel/footer/ai/conversation.d.ts +0 -47
- package/dist/lib/components/panel/footer/ai/conversation.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/conversation.js +0 -222
- package/dist/lib/components/panel/footer/ai/index.d.ts +0 -3
- package/dist/lib/components/panel/footer/ai/index.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/index.js +0 -41
- package/dist/lib/components/panel/footer/ai/message-actions.d.ts +0 -8
- package/dist/lib/components/panel/footer/ai/message-actions.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/message-actions.js +0 -63
- package/dist/lib/components/panel/footer/ai/mock-result.d.ts +0 -6
- package/dist/lib/components/panel/footer/ai/mock-result.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/mock-result.js +0 -121
- package/dist/lib/components/panel/footer/ai/model-logo.d.ts +0 -5
- package/dist/lib/components/panel/footer/ai/model-logo.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/model-logo.js +0 -13
- package/dist/lib/components/panel/footer/ai/model-logos.d.ts +0 -2
- package/dist/lib/components/panel/footer/ai/model-logos.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/model-logos.js +0 -10
- package/dist/lib/components/panel/footer/ai/model-picker.d.ts +0 -8
- package/dist/lib/components/panel/footer/ai/model-picker.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/model-picker.js +0 -166
- package/dist/lib/components/panel/footer/ai/models.d.ts +0 -9
- package/dist/lib/components/panel/footer/ai/models.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/models.js +0 -72
- package/dist/lib/components/panel/footer/ai/permission-picker.d.ts +0 -5
- package/dist/lib/components/panel/footer/ai/permission-picker.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/permission-picker.js +0 -63
- package/dist/lib/components/panel/footer/ai/use-chat-scroll.d.ts +0 -9
- package/dist/lib/components/panel/footer/ai/use-chat-scroll.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/ai/use-chat-scroll.js +0 -57
- package/dist/lib/components/panel/footer/preferences/data.d.ts +0 -14
- package/dist/lib/components/panel/footer/preferences/data.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/preferences/data.js +0 -304
- package/dist/lib/components/panel/footer/preferences/modal.d.ts +0 -8
- package/dist/lib/components/panel/footer/preferences/modal.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/preferences/modal.js +0 -75
- package/dist/lib/components/panel/footer/preferences/sidebar.d.ts +0 -9
- package/dist/lib/components/panel/footer/preferences/sidebar.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/preferences/sidebar.js +0 -105
- package/dist/lib/components/panel/footer/preferences/user-settings/account/index.d.ts +0 -3
- package/dist/lib/components/panel/footer/preferences/user-settings/account/index.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/preferences/user-settings/account/index.js +0 -16
- package/dist/lib/components/panel/footer/preferences/user-settings/content-social/index.d.ts +0 -3
- package/dist/lib/components/panel/footer/preferences/user-settings/content-social/index.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/preferences/user-settings/content-social/index.js +0 -16
- package/dist/lib/components/panel/footer/preferences/user-settings/data-privacy/index.d.ts +0 -3
- package/dist/lib/components/panel/footer/preferences/user-settings/data-privacy/index.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/preferences/user-settings/data-privacy/index.js +0 -101
- package/dist/lib/components/panel/footer/preferences/user-settings/family-center/index.d.ts +0 -3
- package/dist/lib/components/panel/footer/preferences/user-settings/family-center/index.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/preferences/user-settings/family-center/index.js +0 -24
- package/dist/lib/components/panel/footer/preferences/user-settings/profiles/index.d.ts +0 -3
- package/dist/lib/components/panel/footer/preferences/user-settings/profiles/index.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/preferences/user-settings/profiles/index.js +0 -103
- package/dist/lib/components/panel/footer/tabs.d.ts +0 -12
- package/dist/lib/components/panel/footer/tabs.d.ts.map +0 -1
- package/dist/lib/components/panel/footer/tabs.js +0 -23
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
import { ModelLogo } from "./model-logo.js";
|
|
2
|
-
import { PREVIEW_MODELS } from "./models.js";
|
|
3
|
-
import { useRef, useState } from "react";
|
|
4
|
-
import { Button, Popover, Switch, Tooltip, useMediaQuery } from "@vezham/react-v3";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { AltArrowDown, Bolt, CheckRead, Stars } from "@vezham/icons-react";
|
|
7
|
-
//#region src/lib/components/panel/footer/ai/model-picker.tsx
|
|
8
|
-
var ModelFeatures = ({ model }) => /* @__PURE__ */ jsxs("div", {
|
|
9
|
-
className: "w-64 max-w-[calc(100vw-2rem)] p-2 text-xs",
|
|
10
|
-
children: [
|
|
11
|
-
/* @__PURE__ */ jsx("p", {
|
|
12
|
-
className: "font-semibold",
|
|
13
|
-
children: model.name
|
|
14
|
-
}),
|
|
15
|
-
/* @__PURE__ */ jsx("p", {
|
|
16
|
-
className: "text-muted mt-2",
|
|
17
|
-
children: model.description
|
|
18
|
-
}),
|
|
19
|
-
/* @__PURE__ */ jsx("dl", {
|
|
20
|
-
className: "border-separator mt-3 flex flex-col gap-2 border-t pt-3",
|
|
21
|
-
children: [
|
|
22
|
-
"Complex tasks",
|
|
23
|
-
"Generative UI",
|
|
24
|
-
"Speed",
|
|
25
|
-
"Cost"
|
|
26
|
-
].map((label, index) => /* @__PURE__ */ jsxs("div", {
|
|
27
|
-
className: "flex items-center justify-between gap-3",
|
|
28
|
-
children: [/* @__PURE__ */ jsx("dt", {
|
|
29
|
-
className: "text-muted",
|
|
30
|
-
children: label
|
|
31
|
-
}), /* @__PURE__ */ jsx("dd", {
|
|
32
|
-
"aria-label": `${model.ratings[index]} of 3`,
|
|
33
|
-
className: "flex gap-1",
|
|
34
|
-
children: [
|
|
35
|
-
1,
|
|
36
|
-
2,
|
|
37
|
-
3
|
|
38
|
-
].map((level) => /* @__PURE__ */ jsx("span", {
|
|
39
|
-
"aria-hidden": "true",
|
|
40
|
-
className: `h-1.5 w-4 rounded-full ${level <= model.ratings[index] ? "bg-foreground" : "bg-muted/25"}`
|
|
41
|
-
}, level))
|
|
42
|
-
})]
|
|
43
|
-
}, label))
|
|
44
|
-
}),
|
|
45
|
-
/* @__PURE__ */ jsx("p", {
|
|
46
|
-
className: "text-muted mt-3 text-xs",
|
|
47
|
-
children: model.context
|
|
48
|
-
}),
|
|
49
|
-
/* @__PURE__ */ jsx("p", {
|
|
50
|
-
className: "text-muted mt-1 text-xs",
|
|
51
|
-
children: "Illustrative ratings, not provider specifications."
|
|
52
|
-
})
|
|
53
|
-
]
|
|
54
|
-
});
|
|
55
|
-
var ModelPicker = ({ conversation: c }) => {
|
|
56
|
-
const [open, setOpen] = useState(false);
|
|
57
|
-
const smallScreen = useMediaQuery("(width < 640px)");
|
|
58
|
-
const manualModel = useRef(PREVIEW_MODELS[0].name);
|
|
59
|
-
const auto = c.model === "Auto";
|
|
60
|
-
return /* @__PURE__ */ jsxs(Popover, {
|
|
61
|
-
isOpen: open,
|
|
62
|
-
onOpenChange: setOpen,
|
|
63
|
-
children: [/* @__PURE__ */ jsxs(Button, {
|
|
64
|
-
"aria-label": "AI model",
|
|
65
|
-
variant: "ghost",
|
|
66
|
-
size: "sm",
|
|
67
|
-
className: "min-w-0 gap-1 px-2",
|
|
68
|
-
children: [
|
|
69
|
-
auto ? /* @__PURE__ */ jsx(Stars, {
|
|
70
|
-
size: 16,
|
|
71
|
-
className: "shrink-0",
|
|
72
|
-
"aria-hidden": "true"
|
|
73
|
-
}) : /* @__PURE__ */ jsx(ModelLogo, { provider: PREVIEW_MODELS.find((model) => model.name === c.model)?.provider ?? "GPT" }),
|
|
74
|
-
/* @__PURE__ */ jsx("span", {
|
|
75
|
-
className: "max-w-16 truncate text-xs",
|
|
76
|
-
children: c.model
|
|
77
|
-
}),
|
|
78
|
-
/* @__PURE__ */ jsx(AltArrowDown, {
|
|
79
|
-
size: 12,
|
|
80
|
-
className: "shrink-0",
|
|
81
|
-
"aria-hidden": "true"
|
|
82
|
-
})
|
|
83
|
-
]
|
|
84
|
-
}), /* @__PURE__ */ jsx(Popover.Content, {
|
|
85
|
-
placement: "top end",
|
|
86
|
-
className: "w-72 max-w-[calc(100vw-2rem)]",
|
|
87
|
-
children: /* @__PURE__ */ jsxs(Popover.Dialog, {
|
|
88
|
-
"aria-label": "Choose AI model",
|
|
89
|
-
className: "p-2",
|
|
90
|
-
children: [/* @__PURE__ */ jsx(Switch, {
|
|
91
|
-
"aria-label": "Auto model selection",
|
|
92
|
-
isSelected: auto,
|
|
93
|
-
onChange: (enabled) => {
|
|
94
|
-
if (!auto) manualModel.current = c.model;
|
|
95
|
-
c.setModel(enabled ? "Auto" : manualModel.current);
|
|
96
|
-
},
|
|
97
|
-
className: "bg-surface-secondary w-full rounded-2xl p-3",
|
|
98
|
-
children: /* @__PURE__ */ jsxs(Switch.Content, {
|
|
99
|
-
className: "flex w-full flex-row-reverse items-center justify-between gap-3",
|
|
100
|
-
children: [/* @__PURE__ */ jsx(Switch.Control, { children: /* @__PURE__ */ jsx(Switch.Thumb, {}) }), /* @__PURE__ */ jsx("span", {
|
|
101
|
-
className: "text-xs font-medium",
|
|
102
|
-
children: "Auto"
|
|
103
|
-
})]
|
|
104
|
-
})
|
|
105
|
-
}), auto ? /* @__PURE__ */ jsx("p", {
|
|
106
|
-
className: "text-muted px-2 pt-3 pb-2 text-xs",
|
|
107
|
-
children: "Balances and switches between models based on each task’s complexity. Recommended. Routing is simulated in this preview."
|
|
108
|
-
}) : /* @__PURE__ */ jsx("div", {
|
|
109
|
-
"aria-label": "Available models",
|
|
110
|
-
className: "mt-2 flex max-h-[min(24rem,50dvh)] flex-col gap-1 overflow-y-auto overscroll-contain",
|
|
111
|
-
children: PREVIEW_MODELS.map((model) => /* @__PURE__ */ jsxs(Tooltip, {
|
|
112
|
-
delay: 150,
|
|
113
|
-
isDisabled: smallScreen,
|
|
114
|
-
children: [/* @__PURE__ */ jsxs(Button, {
|
|
115
|
-
"aria-label": `Select ${model.name}`,
|
|
116
|
-
variant: "ghost",
|
|
117
|
-
className: `w-full shrink-0 justify-start gap-2 px-3 text-xs ${c.model === model.name ? "bg-surface-secondary" : ""}`,
|
|
118
|
-
"aria-pressed": c.model === model.name,
|
|
119
|
-
onPress: () => {
|
|
120
|
-
c.setModel(model.name);
|
|
121
|
-
manualModel.current = model.name;
|
|
122
|
-
setOpen(false);
|
|
123
|
-
},
|
|
124
|
-
children: [
|
|
125
|
-
/* @__PURE__ */ jsx(ModelLogo, {
|
|
126
|
-
provider: model.provider,
|
|
127
|
-
size: 16
|
|
128
|
-
}),
|
|
129
|
-
/* @__PURE__ */ jsx("span", {
|
|
130
|
-
className: "min-w-0 flex-1 truncate text-start",
|
|
131
|
-
children: model.name
|
|
132
|
-
}),
|
|
133
|
-
c.model === model.name && /* @__PURE__ */ jsx(CheckRead, {
|
|
134
|
-
size: 16,
|
|
135
|
-
"aria-hidden": "true"
|
|
136
|
-
})
|
|
137
|
-
]
|
|
138
|
-
}), /* @__PURE__ */ jsx(Tooltip.Content, {
|
|
139
|
-
placement: "right",
|
|
140
|
-
className: "bg-surface border-border rounded-2xl border shadow-xl",
|
|
141
|
-
children: /* @__PURE__ */ jsx(ModelFeatures, { model })
|
|
142
|
-
})]
|
|
143
|
-
}, model.name))
|
|
144
|
-
})]
|
|
145
|
-
})
|
|
146
|
-
})]
|
|
147
|
-
});
|
|
148
|
-
};
|
|
149
|
-
var FastModeToggle = ({ conversation: c }) => /* @__PURE__ */ jsxs(Tooltip, {
|
|
150
|
-
delay: 150,
|
|
151
|
-
children: [/* @__PURE__ */ jsx(Button, {
|
|
152
|
-
"aria-label": "Fast mode",
|
|
153
|
-
"aria-pressed": c.fastMode,
|
|
154
|
-
isIconOnly: true,
|
|
155
|
-
size: "sm",
|
|
156
|
-
variant: "ghost",
|
|
157
|
-
className: c.fastMode ? "text-accent bg-accent/10" : "text-muted",
|
|
158
|
-
onPress: () => c.setFastMode((current) => !current),
|
|
159
|
-
children: /* @__PURE__ */ jsx(Bolt, {
|
|
160
|
-
size: 18,
|
|
161
|
-
"aria-hidden": "true"
|
|
162
|
-
})
|
|
163
|
-
}), /* @__PURE__ */ jsxs(Tooltip.Content, { children: [c.fastMode ? "Fast mode on" : "Fast mode off", " · simulated"] })]
|
|
164
|
-
});
|
|
165
|
-
//#endregion
|
|
166
|
-
export { FastModeToggle, ModelPicker };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type PreviewModel = {
|
|
2
|
-
name: string;
|
|
3
|
-
provider: string;
|
|
4
|
-
description: string;
|
|
5
|
-
ratings: readonly [number, number, number, number];
|
|
6
|
-
context: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const PREVIEW_MODELS: readonly PreviewModel[];
|
|
9
|
-
//# sourceMappingURL=models.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/panel/footer/ai/models.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAClD,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAUD,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EA6DjD,CAAA"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
//#region src/lib/components/panel/footer/ai/models.ts
|
|
2
|
-
var model = (name, provider, description, ratings, context = "1M context window · preview") => ({
|
|
3
|
-
name,
|
|
4
|
-
provider,
|
|
5
|
-
description,
|
|
6
|
-
ratings,
|
|
7
|
-
context
|
|
8
|
-
});
|
|
9
|
-
var PREVIEW_MODELS = [
|
|
10
|
-
model("Sonnet 4.6", "Claude", "Balanced preset for everyday app generation and iteration.", [
|
|
11
|
-
2,
|
|
12
|
-
2,
|
|
13
|
-
2,
|
|
14
|
-
2
|
|
15
|
-
]),
|
|
16
|
-
model("Sonnet 5", "Claude", "Versatile preset for design and implementation tasks.", [
|
|
17
|
-
3,
|
|
18
|
-
3,
|
|
19
|
-
2,
|
|
20
|
-
2
|
|
21
|
-
]),
|
|
22
|
-
model("Opus 4.8", "Claude", "Thorough preset for complex planning and detailed work.", [
|
|
23
|
-
3,
|
|
24
|
-
3,
|
|
25
|
-
1,
|
|
26
|
-
3
|
|
27
|
-
]),
|
|
28
|
-
model("Fable 5", "Claude", "Creative preset for exploring ideas and visual directions.", [
|
|
29
|
-
2,
|
|
30
|
-
3,
|
|
31
|
-
2,
|
|
32
|
-
2
|
|
33
|
-
]),
|
|
34
|
-
model("Gemini 3.1 Pro", "Gemini", "General-purpose preset for larger contextual tasks.", [
|
|
35
|
-
3,
|
|
36
|
-
2,
|
|
37
|
-
2,
|
|
38
|
-
2
|
|
39
|
-
]),
|
|
40
|
-
model("Gemini 3.8 Flash", "Gemini", "Quick preset for concise answers and small iterations.", [
|
|
41
|
-
2,
|
|
42
|
-
2,
|
|
43
|
-
3,
|
|
44
|
-
1
|
|
45
|
-
]),
|
|
46
|
-
model("Kimi K3", "Kimi", "Context-focused preset for summaries and structured work.", [
|
|
47
|
-
2,
|
|
48
|
-
2,
|
|
49
|
-
2,
|
|
50
|
-
2
|
|
51
|
-
]),
|
|
52
|
-
model("Grok 4.6", "Grok", "Conversational preset for exploring alternatives.", [
|
|
53
|
-
2,
|
|
54
|
-
2,
|
|
55
|
-
2,
|
|
56
|
-
2
|
|
57
|
-
]),
|
|
58
|
-
model("GPT-6.1 Sol", "GPT", "Sample preset matching the Fast mode reference.", [
|
|
59
|
-
3,
|
|
60
|
-
3,
|
|
61
|
-
2,
|
|
62
|
-
2
|
|
63
|
-
]),
|
|
64
|
-
model("GPT-6 Astra", "GPT", "Thorough preset for complex reasoning and detailed work.", [
|
|
65
|
-
3,
|
|
66
|
-
3,
|
|
67
|
-
2,
|
|
68
|
-
2
|
|
69
|
-
])
|
|
70
|
-
];
|
|
71
|
-
//#endregion
|
|
72
|
-
export { PREVIEW_MODELS };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"permission-picker.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/panel/footer/ai/permission-picker.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAqBlD,eAAO,MAAM,gBAAgB,GAAI,qBAE9B;IACD,YAAY,EAAE,YAAY,CAAA;CAC3B,gCAsCA,CAAA"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Dropdown } from "@vezham/react-v3";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { CodeSquare, HandStars, ShieldWarning } from "@vezham/icons-react";
|
|
4
|
-
//#region src/lib/components/panel/footer/ai/permission-picker.tsx
|
|
5
|
-
var permissions = [
|
|
6
|
-
{
|
|
7
|
-
label: "Ask for approval",
|
|
8
|
-
description: "Always ask to edit external files and use the internet",
|
|
9
|
-
Icon: HandStars
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
label: "Approve for me",
|
|
13
|
-
description: "Only ask for actions detected as potentially unsafe",
|
|
14
|
-
Icon: CodeSquare
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
label: "Full access",
|
|
18
|
-
description: "Unrestricted access to the internet and any file on your computer",
|
|
19
|
-
Icon: ShieldWarning
|
|
20
|
-
}
|
|
21
|
-
];
|
|
22
|
-
var PermissionPicker = ({ conversation: c }) => /* @__PURE__ */ jsxs(Dropdown, { children: [/* @__PURE__ */ jsx(Dropdown.Trigger, {
|
|
23
|
-
"aria-label": "Tool permissions",
|
|
24
|
-
className: "button button--ghost button--sm text-muted text-xs",
|
|
25
|
-
children: c.permissions
|
|
26
|
-
}), /* @__PURE__ */ jsxs(Dropdown.Popover, {
|
|
27
|
-
placement: "top start",
|
|
28
|
-
className: "w-96 max-w-[calc(100vw-2rem)]",
|
|
29
|
-
children: [/* @__PURE__ */ jsx(Dropdown.Menu, {
|
|
30
|
-
"aria-label": "Tool permissions",
|
|
31
|
-
selectionMode: "single",
|
|
32
|
-
selectedKeys: [c.permissions],
|
|
33
|
-
onAction: (key) => c.setPermissions(String(key)),
|
|
34
|
-
children: permissions.map(({ label, description, Icon }) => /* @__PURE__ */ jsxs(Dropdown.Item, {
|
|
35
|
-
id: label,
|
|
36
|
-
textValue: label,
|
|
37
|
-
className: `gap-2 ps-2! pe-7 ${label === "Full access" ? "text-warning" : ""}`,
|
|
38
|
-
children: [
|
|
39
|
-
/* @__PURE__ */ jsx(Icon, {
|
|
40
|
-
size: 16,
|
|
41
|
-
"aria-hidden": "true",
|
|
42
|
-
className: "shrink-0"
|
|
43
|
-
}),
|
|
44
|
-
/* @__PURE__ */ jsxs("span", {
|
|
45
|
-
className: "min-w-0 flex-1 py-1",
|
|
46
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
47
|
-
className: "block text-xs font-medium",
|
|
48
|
-
children: label
|
|
49
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
50
|
-
className: `block text-xs whitespace-normal ${label === "Full access" ? "text-warning" : "text-muted"}`,
|
|
51
|
-
children: description
|
|
52
|
-
})]
|
|
53
|
-
}),
|
|
54
|
-
/* @__PURE__ */ jsx(Dropdown.ItemIndicator, { className: "start-auto end-2" })
|
|
55
|
-
]
|
|
56
|
-
}, label))
|
|
57
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
58
|
-
className: "text-muted px-3 pt-1 pb-2 text-xs",
|
|
59
|
-
children: "Preview only · No files or internet access is granted."
|
|
60
|
-
})]
|
|
61
|
-
})] });
|
|
62
|
-
//#endregion
|
|
63
|
-
export { PermissionPicker };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Conversation } from './conversation';
|
|
2
|
-
export declare const useChatScroll: (conversation: Conversation) => {
|
|
3
|
-
viewportRef: import("react").RefObject<HTMLDivElement | null>;
|
|
4
|
-
contentRef: import("react").RefObject<HTMLDivElement | null>;
|
|
5
|
-
showJump: boolean;
|
|
6
|
-
onScroll: () => void;
|
|
7
|
-
scrollToBottom: () => void;
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=use-chat-scroll.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-chat-scroll.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/panel/footer/ai/use-chat-scroll.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,eAAO,MAAM,aAAa,GAAI,cAAc,YAAY;;;;;;CAsDvD,CAAA"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
2
|
-
//#region src/lib/components/panel/footer/ai/use-chat-scroll.ts
|
|
3
|
-
var useChatScroll = (conversation) => {
|
|
4
|
-
const viewport = useRef(null);
|
|
5
|
-
const content = useRef(null);
|
|
6
|
-
const followLatest = useRef(true);
|
|
7
|
-
const previousThread = useRef(conversation.activeId);
|
|
8
|
-
const previousMessage = useRef(void 0);
|
|
9
|
-
const [showJump, setShowJump] = useState(false);
|
|
10
|
-
const scrollToBottom = useCallback(() => {
|
|
11
|
-
const element = viewport.current;
|
|
12
|
-
if (!element) return;
|
|
13
|
-
followLatest.current = true;
|
|
14
|
-
element.scrollTop = element.scrollHeight;
|
|
15
|
-
setShowJump(false);
|
|
16
|
-
}, []);
|
|
17
|
-
const onScroll = useCallback(() => {
|
|
18
|
-
const element = viewport.current;
|
|
19
|
-
if (!element) return;
|
|
20
|
-
const atBottom = element.scrollHeight - element.clientHeight - element.scrollTop <= 32;
|
|
21
|
-
followLatest.current = atBottom;
|
|
22
|
-
setShowJump(!atBottom);
|
|
23
|
-
}, []);
|
|
24
|
-
useLayoutEffect(() => {
|
|
25
|
-
const last = conversation.messages.at(-1);
|
|
26
|
-
if (previousThread.current !== conversation.activeId || last?.role === "user" && last.id !== previousMessage.current) followLatest.current = true;
|
|
27
|
-
previousThread.current = conversation.activeId;
|
|
28
|
-
previousMessage.current = last?.id;
|
|
29
|
-
if (followLatest.current) scrollToBottom();
|
|
30
|
-
}, [
|
|
31
|
-
conversation.activeId,
|
|
32
|
-
conversation.messages,
|
|
33
|
-
scrollToBottom
|
|
34
|
-
]);
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
const observer = new ResizeObserver(() => {
|
|
37
|
-
if (followLatest.current) scrollToBottom();
|
|
38
|
-
else onScroll();
|
|
39
|
-
});
|
|
40
|
-
if (viewport.current) observer.observe(viewport.current);
|
|
41
|
-
if (content.current) observer.observe(content.current);
|
|
42
|
-
return () => observer.disconnect();
|
|
43
|
-
}, [
|
|
44
|
-
conversation.activeId,
|
|
45
|
-
onScroll,
|
|
46
|
-
scrollToBottom
|
|
47
|
-
]);
|
|
48
|
-
return {
|
|
49
|
-
viewportRef: viewport,
|
|
50
|
-
contentRef: content,
|
|
51
|
-
showJump,
|
|
52
|
-
onScroll,
|
|
53
|
-
scrollToBottom
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
//#endregion
|
|
57
|
-
export { useChatScroll };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export type SidebarItem = {
|
|
2
|
-
id: string;
|
|
3
|
-
label: string;
|
|
4
|
-
icon?: string;
|
|
5
|
-
href?: string;
|
|
6
|
-
component?: React.ComponentType;
|
|
7
|
-
children?: SidebarItem[];
|
|
8
|
-
};
|
|
9
|
-
export type SidebarSection = {
|
|
10
|
-
title: string;
|
|
11
|
-
items: SidebarItem[];
|
|
12
|
-
};
|
|
13
|
-
export declare const settingsSidebar: SidebarSection[];
|
|
14
|
-
//# sourceMappingURL=data.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/panel/footer/preferences/data.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC/B,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,cAAc,EAwT3C,CAAA"}
|