@vezham/react 26.1.0 → 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 +10 -8
- 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 +1 -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/index.d.ts +6 -3
- package/dist/lib/layouts/app/index.d.ts.map +1 -1
- package/dist/lib/layouts/app/index.js +36 -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 +13 -27
- package/dist/lib/layouts/menu-layout/index-sm.d.ts.map +1 -1
- package/dist/lib/layouts/menu-layout/index-sm.js +7 -19
- 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,41 +0,0 @@
|
|
|
1
|
-
import { InfoPanelSheet } from "../../info-panel/sheet.js";
|
|
2
|
-
import { AIContent } from "./content.js";
|
|
3
|
-
import { useMockConversation } from "./conversation.js";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { VezhamTamizhi } from "@vezham/icons-react";
|
|
6
|
-
//#region src/lib/components/panel/footer/ai/index.tsx
|
|
7
|
-
var AISheet = ({ isOpen, onClose }) => isOpen ? /* @__PURE__ */ jsx(AISession, { onClose }) : null;
|
|
8
|
-
var AISession = ({ onClose }) => {
|
|
9
|
-
const conversation = useMockConversation();
|
|
10
|
-
return /* @__PURE__ */ jsx(InfoPanelSheet, {
|
|
11
|
-
onClose,
|
|
12
|
-
panel: {
|
|
13
|
-
title: aiPanel.title,
|
|
14
|
-
titleIcon: aiPanel.titleIcon,
|
|
15
|
-
scrollable: false,
|
|
16
|
-
content: /* @__PURE__ */ jsx(AIContent, {
|
|
17
|
-
conversation,
|
|
18
|
-
panel: true
|
|
19
|
-
})
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
var AIPanelContent = () => {
|
|
24
|
-
return /* @__PURE__ */ jsx(AIContent, {
|
|
25
|
-
conversation: useMockConversation(),
|
|
26
|
-
panel: true
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
var aiPanel = {
|
|
30
|
-
title: "Tamizhi AI",
|
|
31
|
-
titleIcon: /* @__PURE__ */ jsx(VezhamTamizhi, {
|
|
32
|
-
size: 20,
|
|
33
|
-
"aria-hidden": "true",
|
|
34
|
-
className: "shrink-0"
|
|
35
|
-
}),
|
|
36
|
-
scrollable: false,
|
|
37
|
-
content: /* @__PURE__ */ jsx(AIPanelContent, {}),
|
|
38
|
-
renderCompact: (props) => /* @__PURE__ */ jsx(AISheet, { ...props })
|
|
39
|
-
};
|
|
40
|
-
//#endregion
|
|
41
|
-
export { aiPanel };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Conversation } from './conversation';
|
|
2
|
-
type Props = {
|
|
3
|
-
message: Conversation['messages'][number];
|
|
4
|
-
conversation: Conversation;
|
|
5
|
-
};
|
|
6
|
-
export declare const MessageActions: ({ message, conversation }: Props) => import("react").JSX.Element;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=message-actions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message-actions.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/panel/footer/ai/message-actions.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;IACzC,YAAY,EAAE,YAAY,CAAA;CAC3B,CAAA;AACD,eAAO,MAAM,cAAc,GAAI,2BAA2B,KAAK,gCAuD9D,CAAA"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
import { Button } from "@vezham/react-v3";
|
|
3
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { BranchingPathsUp } from "@vezham/icons-react";
|
|
5
|
-
import { ChatMessageActions } from "@vezham/react-pro-v3";
|
|
6
|
-
import { writeClipboardText } from "@vezham/docs-react/utils/clipboard";
|
|
7
|
-
//#region src/lib/components/panel/footer/ai/message-actions.tsx
|
|
8
|
-
var MessageActions = ({ message, conversation }) => {
|
|
9
|
-
const [copied, setCopied] = useState(false);
|
|
10
|
-
const [error, setError] = useState(false);
|
|
11
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(ChatMessageActions, { children: [
|
|
12
|
-
/* @__PURE__ */ jsx(ChatMessageActions.Copy, {
|
|
13
|
-
"aria-label": "Copy response",
|
|
14
|
-
tooltip: "Copy",
|
|
15
|
-
isCopied: copied,
|
|
16
|
-
onPress: async () => {
|
|
17
|
-
try {
|
|
18
|
-
await writeClipboardText(message.text);
|
|
19
|
-
setCopied(true);
|
|
20
|
-
setError(false);
|
|
21
|
-
} catch {
|
|
22
|
-
setError(true);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}),
|
|
26
|
-
/* @__PURE__ */ jsx(ChatMessageActions.ThumbsUp, {
|
|
27
|
-
"aria-label": "Good response",
|
|
28
|
-
tooltip: "Good response",
|
|
29
|
-
"aria-pressed": message.rating === "up",
|
|
30
|
-
onPress: () => conversation.rate(message.id, "up")
|
|
31
|
-
}),
|
|
32
|
-
/* @__PURE__ */ jsx(ChatMessageActions.ThumbsDown, {
|
|
33
|
-
"aria-label": "Bad response",
|
|
34
|
-
tooltip: "Bad response",
|
|
35
|
-
"aria-pressed": message.rating === "down",
|
|
36
|
-
onPress: () => conversation.rate(message.id, "down")
|
|
37
|
-
}),
|
|
38
|
-
/* @__PURE__ */ jsx(ChatMessageActions.Regenerate, {
|
|
39
|
-
"aria-label": "Regenerate response",
|
|
40
|
-
tooltip: "Regenerate",
|
|
41
|
-
isDisabled: conversation.phase !== "ready",
|
|
42
|
-
onPress: () => conversation.regenerate(message.id)
|
|
43
|
-
}),
|
|
44
|
-
/* @__PURE__ */ jsx(Button, {
|
|
45
|
-
"aria-label": "Branch chat",
|
|
46
|
-
isIconOnly: true,
|
|
47
|
-
size: "sm",
|
|
48
|
-
variant: "ghost",
|
|
49
|
-
isDisabled: conversation.phase !== "ready",
|
|
50
|
-
onPress: () => conversation.branchChat(message.id),
|
|
51
|
-
children: /* @__PURE__ */ jsx(BranchingPathsUp, {
|
|
52
|
-
size: 18,
|
|
53
|
-
"aria-hidden": "true"
|
|
54
|
-
})
|
|
55
|
-
})
|
|
56
|
-
] }), error && /* @__PURE__ */ jsx("p", {
|
|
57
|
-
role: "status",
|
|
58
|
-
className: "text-muted text-xs",
|
|
59
|
-
children: "Copy is unavailable in this browser."
|
|
60
|
-
})] });
|
|
61
|
-
};
|
|
62
|
-
//#endregion
|
|
63
|
-
export { MessageActions };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mock-result.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/panel/footer/ai/mock-result.tsx"],"names":[],"mappings":"AAyBA,KAAK,KAAK,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAC/B,eAAO,MAAM,UAAU,GAAI,YAAY,KAAK,uCA8F3C,CAAA"}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
import { Button, Card, Input, Label, TextField } from "@vezham/react-v3";
|
|
3
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
//#region src/lib/components/panel/footer/ai/mock-result.tsx
|
|
5
|
-
var ResultCard = ({ title, description, children, footer }) => /* @__PURE__ */ jsxs(Card, {
|
|
6
|
-
className: "my-3",
|
|
7
|
-
children: [
|
|
8
|
-
/* @__PURE__ */ jsxs(Card.Header, { children: [/* @__PURE__ */ jsx(Card.Title, { children: title }), description && /* @__PURE__ */ jsx(Card.Description, { children: description })] }),
|
|
9
|
-
children && /* @__PURE__ */ jsx(Card.Content, { children }),
|
|
10
|
-
footer && /* @__PURE__ */ jsx(Card.Footer, { children: footer })
|
|
11
|
-
]
|
|
12
|
-
});
|
|
13
|
-
var MockResult = ({ prompt }) => {
|
|
14
|
-
const [saved, setSaved] = useState(false);
|
|
15
|
-
const [name, setName] = useState("My workspace");
|
|
16
|
-
if (/preferences/i.test(prompt)) return /* @__PURE__ */ jsx(ResultCard, {
|
|
17
|
-
title: "Preferences preview",
|
|
18
|
-
children: /* @__PURE__ */ jsxs("form", {
|
|
19
|
-
onSubmit: (event) => {
|
|
20
|
-
event.preventDefault();
|
|
21
|
-
setSaved(true);
|
|
22
|
-
},
|
|
23
|
-
className: "flex flex-col gap-3",
|
|
24
|
-
children: [
|
|
25
|
-
/* @__PURE__ */ jsxs(TextField, { children: [/* @__PURE__ */ jsx(Label, { children: "Workspace name" }), /* @__PURE__ */ jsx(Input, {
|
|
26
|
-
value: name,
|
|
27
|
-
onChange: (event) => {
|
|
28
|
-
setName(event.target.value);
|
|
29
|
-
setSaved(false);
|
|
30
|
-
}
|
|
31
|
-
})] }),
|
|
32
|
-
/* @__PURE__ */ jsx(Button, {
|
|
33
|
-
type: "submit",
|
|
34
|
-
size: "sm",
|
|
35
|
-
children: "Save preview"
|
|
36
|
-
}),
|
|
37
|
-
saved && /* @__PURE__ */ jsxs("p", {
|
|
38
|
-
role: "status",
|
|
39
|
-
className: "text-muted text-xs",
|
|
40
|
-
children: [
|
|
41
|
-
"Saved “",
|
|
42
|
-
name,
|
|
43
|
-
"” in this preview."
|
|
44
|
-
]
|
|
45
|
-
})
|
|
46
|
-
]
|
|
47
|
-
})
|
|
48
|
-
});
|
|
49
|
-
if (/summary|chart|metrics/i.test(prompt)) return /* @__PURE__ */ jsxs(ResultCard, {
|
|
50
|
-
title: "Workspace summary",
|
|
51
|
-
description: "Sample data",
|
|
52
|
-
children: [
|
|
53
|
-
/* @__PURE__ */ jsxs("div", {
|
|
54
|
-
className: "mb-3 grid grid-cols-2 gap-3",
|
|
55
|
-
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
|
|
56
|
-
className: "text-muted text-xs",
|
|
57
|
-
children: "Tasks"
|
|
58
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
59
|
-
className: "text-xl font-semibold",
|
|
60
|
-
children: "24"
|
|
61
|
-
})] }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
|
|
62
|
-
className: "text-muted text-xs",
|
|
63
|
-
children: "Complete"
|
|
64
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
65
|
-
className: "text-xl font-semibold",
|
|
66
|
-
children: "75%"
|
|
67
|
-
})] })]
|
|
68
|
-
}),
|
|
69
|
-
/* @__PURE__ */ jsxs("table", {
|
|
70
|
-
className: "w-full text-start text-xs",
|
|
71
|
-
children: [
|
|
72
|
-
/* @__PURE__ */ jsx("caption", {
|
|
73
|
-
className: "sr-only",
|
|
74
|
-
children: "Sample weekly completed tasks"
|
|
75
|
-
}),
|
|
76
|
-
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [/* @__PURE__ */ jsx("th", {
|
|
77
|
-
className: "text-start",
|
|
78
|
-
children: "Week"
|
|
79
|
-
}), /* @__PURE__ */ jsx("th", {
|
|
80
|
-
className: "text-end",
|
|
81
|
-
children: "Completed"
|
|
82
|
-
})] }) }),
|
|
83
|
-
/* @__PURE__ */ jsx("tbody", { children: [
|
|
84
|
-
8,
|
|
85
|
-
12,
|
|
86
|
-
18
|
|
87
|
-
].map((count, i) => /* @__PURE__ */ jsxs("tr", { children: [/* @__PURE__ */ jsxs("td", {
|
|
88
|
-
className: "py-2",
|
|
89
|
-
children: ["Week ", i + 1]
|
|
90
|
-
}), /* @__PURE__ */ jsx("td", {
|
|
91
|
-
className: "text-end",
|
|
92
|
-
children: count
|
|
93
|
-
})] }, count)) })
|
|
94
|
-
]
|
|
95
|
-
}),
|
|
96
|
-
/* @__PURE__ */ jsx("div", {
|
|
97
|
-
role: "img",
|
|
98
|
-
"aria-label": "Sample task progress: 75 percent",
|
|
99
|
-
className: "bg-surface-secondary mt-2 h-2 overflow-hidden rounded-full",
|
|
100
|
-
children: /* @__PURE__ */ jsx("div", { className: "bg-accent h-full w-3/4" })
|
|
101
|
-
})
|
|
102
|
-
]
|
|
103
|
-
});
|
|
104
|
-
if (/workspace/i.test(prompt)) return /* @__PURE__ */ jsx(ResultCard, {
|
|
105
|
-
title: "Workspace guide",
|
|
106
|
-
description: "Search pages, save bookmarks, and explore Storage.",
|
|
107
|
-
footer: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
|
|
108
|
-
variant: "secondary",
|
|
109
|
-
size: "sm",
|
|
110
|
-
onPress: () => setSaved(true),
|
|
111
|
-
children: "Preview next step"
|
|
112
|
-
}), saved && /* @__PURE__ */ jsx("p", {
|
|
113
|
-
role: "status",
|
|
114
|
-
className: "text-xs",
|
|
115
|
-
children: "Try Search from the application menu."
|
|
116
|
-
})] })
|
|
117
|
-
});
|
|
118
|
-
return null;
|
|
119
|
-
};
|
|
120
|
-
//#endregion
|
|
121
|
-
export { MockResult };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model-logo.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/panel/footer/ai/model-logo.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,GAAI,oBAGvB;IACD,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,gCASA,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { MODEL_LOGOS } from "./model-logos.js";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
//#region src/lib/components/panel/footer/ai/model-logo.tsx
|
|
4
|
-
var ModelLogo = ({ provider, size = 16 }) => /* @__PURE__ */ jsx("img", {
|
|
5
|
-
src: MODEL_LOGOS[provider],
|
|
6
|
-
alt: "",
|
|
7
|
-
"aria-hidden": "true",
|
|
8
|
-
width: size,
|
|
9
|
-
height: size,
|
|
10
|
-
className: `shrink-0 object-contain ${provider !== "Claude" && provider !== "Gemini" ? "dark:invert" : ""}`
|
|
11
|
-
});
|
|
12
|
-
//#endregion
|
|
13
|
-
export { ModelLogo };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model-logos.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/panel/footer/ai/model-logos.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQ9C,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//#region src/lib/components/panel/footer/ai/model-logos.ts
|
|
2
|
-
var MODEL_LOGOS = {
|
|
3
|
-
Claude: "data:image/svg+xml,%3Csvg%20height%3D%221em%22%20style%3D%22flex%3Anone%3Bline-height%3A1%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%221em%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ctitle%3EClaude%3C%2Ftitle%3E%3Cpath%20d%3D%22M4.709%2015.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0%2011.784l.055-.352.48-.321.686.06%201.52.103%202.278.158%201.652.097%202.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686%201.908%201.476%202.491%201.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97%202.97%200%2001-.104-.729L6.283.134%206.696%200l.996.134.42.364.62%201.414%201.002%202.229%201.555%203.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286%201.851-.559%202.903-.364%201.942h.212l.243-.242.985-1.306%201.652-2.064.73-.82.85-.904.547-.431h1.033l.76%201.129-.34%201.166-1.064%201.347-.881%201.142-1.264%201.7-.79%201.36.073.11.188-.02%202.856-.606%201.543-.28%201.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061%201.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093%201.068%202.006%201.81%202.509%202.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649%202.345%203.521.122%201.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674%207.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434%201.967-2.18%202.945-1.726%201.845-.414.164-.717-.37.067-.662.401-.589%202.388-3.036%201.44-1.882.93-1.086-.006-.158h-.055L4.132%2018.56l-1.13.146-.487-.456.061-.746.231-.243%201.908-1.312-.006.006z%22%20fill%3D%22%23D97757%22%20fill-rule%3D%22nonzero%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E",
|
|
4
|
-
Gemini: "data:image/svg+xml,%3Csvg%20height%3D%221em%22%20style%3D%22flex%3Anone%3Bline-height%3A1%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%221em%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ctitle%3EGemini%3C%2Ftitle%3E%3Cpath%20d%3D%22M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z%22%20fill%3D%22%233186FF%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z%22%20fill%3D%22url%28%23lobe-icons-gemini-0-_R_0_%29%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z%22%20fill%3D%22url%28%23lobe-icons-gemini-1-_R_0_%29%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z%22%20fill%3D%22url%28%23lobe-icons-gemini-2-_R_0_%29%22%3E%3C%2Fpath%3E%3Cdefs%3E%3ClinearGradient%20gradientUnits%3D%22userSpaceOnUse%22%20id%3D%22lobe-icons-gemini-0-_R_0_%22%20x1%3D%227%22%20x2%3D%2211%22%20y1%3D%2215.5%22%20y2%3D%2212%22%3E%3Cstop%20stop-color%3D%22%2308B962%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%2308B962%22%20stop-opacity%3D%220%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3ClinearGradient%20gradientUnits%3D%22userSpaceOnUse%22%20id%3D%22lobe-icons-gemini-1-_R_0_%22%20x1%3D%228%22%20x2%3D%2211.5%22%20y1%3D%225.5%22%20y2%3D%2211%22%3E%3Cstop%20stop-color%3D%22%23F94543%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23F94543%22%20stop-opacity%3D%220%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3ClinearGradient%20gradientUnits%3D%22userSpaceOnUse%22%20id%3D%22lobe-icons-gemini-2-_R_0_%22%20x1%3D%223.5%22%20x2%3D%2217.5%22%20y1%3D%2213.5%22%20y2%3D%2212%22%3E%3Cstop%20stop-color%3D%22%23FABC12%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%22.46%22%20stop-color%3D%22%23FABC12%22%20stop-opacity%3D%220%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3C%2Fsvg%3E",
|
|
5
|
-
Kimi: "data:image/svg+xml,%3Csvg%20fill%3D%22currentColor%22%20fill-rule%3D%22evenodd%22%20height%3D%221em%22%20style%3D%22flex%3Anone%3Bline-height%3A1%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%221em%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ctitle%3EKimi%3C%2Ftitle%3E%3Cpath%20d%3D%22M21.846%200a1.923%201.923%200%20110%203.846H20.15a.226.226%200%2001-.227-.226V1.923C19.923.861%2020.784%200%2021.846%200z%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M11.065%2011.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164%200%2000-.117.051l-7.82%207.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103%200-.186.103-.186.23V19.77c0%20.128.083.23.186.23h2.69c.103%200%20.186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158%200%2001.205-.023l6.484%204.772a7.677%207.677%200%20003.453%201.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028%205.028%200%2001-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E",
|
|
6
|
-
Grok: "data:image/svg+xml,%3Csvg%20fill%3D%22currentColor%22%20fill-rule%3D%22evenodd%22%20height%3D%221em%22%20style%3D%22flex%3Anone%3Bline-height%3A1%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%221em%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ctitle%3EGrok%3C%2Ftitle%3E%3Cpath%20d%3D%22M9.27%2015.29l7.978-5.897c.391-.29.95-.177%201.137.272.98%202.369.542%205.215-1.41%207.169-1.951%201.954-4.667%202.382-7.149%201.406l-2.711%201.257c3.889%202.661%208.611%202.003%2011.562-.953%202.341-2.344%203.066-5.539%202.388-8.42l.006.007c-.983-4.232.242-5.924%202.75-9.383.06-.082.12-.164.179-.248l-3.301%203.305v-.01L9.267%2015.292M7.623%2016.723c-2.792-2.67-2.31-6.801.071-9.184%201.761-1.763%204.647-2.483%207.166-1.425l2.705-1.25a7.808%207.808%200%2000-1.829-1A8.975%208.975%200%20005.984%205.83c-2.533%202.536-3.33%206.436-1.962%209.764%201.022%202.487-.653%204.246-2.34%206.022-.599.63-1.199%201.259-1.682%201.925l7.62-6.815%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E",
|
|
7
|
-
GPT: "data:image/svg+xml,%3Csvg%20fill%3D%22currentColor%22%20fill-rule%3D%22evenodd%22%20height%3D%221em%22%20style%3D%22flex%3Anone%3Bline-height%3A1%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%221em%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ctitle%3EOpenAI%3C%2Ftitle%3E%3Cpath%20d%3D%22M9.205%208.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357%201.356-.523%202.117-.523%202.854%200%204.662%202.212%204.662%204.566%200%20.167%200%20.357-.024.547l-4.71-2.759a.797.797%200%2000-.856%200l-5.97%203.473zm10.609%208.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473%201.95-1.118a.433.433%200%2001.476%200l4.543%202.617c1.309.76%202.189%202.378%202.189%203.948%200%201.808-1.07%203.473-2.76%204.163zM7.802%2012.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545%201.95-4.472%204.591-4.472%201%200%201.927.333%202.712.928L8.23%205.067c-.285.166-.428.404-.428.737v6.898zM12%2015.128l-2.795-1.57v-3.33L12%208.658l2.795%201.57v3.33L12%2015.128zm1.796%207.23c-1%200-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974%201.142c.167.095.238.238.238.428v5.233c0%202.545-1.974%204.472-4.614%204.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482%204.482%200%20014.21%206.327v5.423c0%20.333.143.571.428.738l5.947%203.449-1.95%201.118a.432.432%200%2001-.476%200zm-.262%203.9c-2.688%200-4.662-2.021-4.662-4.519%200-.19.024-.38.047-.57l4.686%202.71c.286.167.571.167.856%200l5.97-3.448v2.26c0%20.19-.07.333-.237.428l-4.543%202.616c-.619.357-1.356.523-2.117.523zm5.899%202.83a5.947%205.947%200%20005.827-4.756C22.287%2018.339%2024%2015.84%2024%2013.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498%200-3.401-2.759-5.947-5.946-5.947-.642%200-1.26.095-1.88.31A5.962%205.962%200%200010.205%200a5.947%205.947%200%2000-5.827%204.757C1.713%205.447%200%207.945%200%2010.49c0%201.666.713%203.283%201.998%204.448-.119.5-.19%201-.19%201.499%200%203.401%202.759%205.946%205.946%205.946.642%200%201.26-.095%201.88-.309a5.96%205.96%200%20004.162%201.713z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E"
|
|
8
|
-
};
|
|
9
|
-
//#endregion
|
|
10
|
-
export { MODEL_LOGOS };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Conversation } from './conversation';
|
|
2
|
-
export declare const ModelPicker: ({ conversation: c }: {
|
|
3
|
-
conversation: Conversation;
|
|
4
|
-
}) => import("react").JSX.Element;
|
|
5
|
-
export declare const FastModeToggle: ({ conversation: c }: {
|
|
6
|
-
conversation: Conversation;
|
|
7
|
-
}) => import("react").JSX.Element;
|
|
8
|
-
//# sourceMappingURL=model-picker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model-picker.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/components/panel/footer/ai/model-picker.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAmClD,eAAO,MAAM,WAAW,GAAI,qBAEzB;IACD,YAAY,EAAE,YAAY,CAAA;CAC3B,gCAsFA,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,qBAE5B;IACD,YAAY,EAAE,YAAY,CAAA;CAC3B,gCAgBA,CAAA"}
|
|
@@ -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 };
|