@alivault/pico 0.5.2 → 0.6.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/.output/nitro.json +1 -1
- package/.output/public/assets/{index-Bwe_XQfD.js → index-relf5WuY.js} +10 -10
- package/.output/public/assets/routes-D_oJExAc.js +2160 -0
- package/.output/public/assets/styles-DTlmo-Vu.css +2 -0
- package/.output/server/_ssr/{router-BKbJyS60.mjs → router-Bc19lQoF.mjs} +6 -4
- package/.output/server/_ssr/{routes-B_4MdyY2.mjs → routes-BZ9cdmtL.mjs} +179 -28
- package/.output/server/_ssr/{routes-Dmryr4Ep.mjs → routes-BpP7WwMR.mjs} +50 -5
- package/.output/server/_ssr/ssr.mjs +2 -2
- package/.output/server/{_tanstack-start-manifest_v-D9Bp2MHo.mjs → _tanstack-start-manifest_v-ByPcMc-9.mjs} +4 -4
- package/.output/server/index.mjs +569 -569
- package/package.json +1 -1
- package/.output/public/assets/routes-BN7pNQ_y.js +0 -2160
- package/.output/public/assets/styles-CUjj8zXo.css +0 -2
|
@@ -2,7 +2,7 @@ import { i as __toESM } from "../_runtime.mjs";
|
|
|
2
2
|
import { A as DialogRoot, C as MenuPortal, D as TabsTab, E as TabsList$1, F as DialogBackdrop, I as Separator, K as mergeProps, L as Input, M as DialogPopup, N as DialogDescription$1, O as TabsRoot, P as DialogClose, R as Button, S as MenuPositioner, T as MenuItem, X as require_react, Y as require_jsx_runtime, _ as AccordionRoot, a as CollapsiblePanel, b as MenuSubmenuRoot, c as PopoverPopup, d as PopoverTrigger$1, f as PopoverRoot, g as AccordionItem$1, h as AccordionHeader, i as ContextMenuRoot, j as DialogPortal$1, k as DialogTitle$1, l as PopoverPositioner, m as AccordionTrigger$1, n as Toggle, o as CollapsibleTrigger$1, p as AccordionPanel, r as ContextMenuTrigger$1, s as CollapsibleRoot, t as ToggleGroup, u as PopoverPortal, v as MenuSubmenuTrigger, w as MenuPopup, x as MenuRoot, y as MenuTrigger, z as useRender } from "../_libs/@base-ui/react+[...].mjs";
|
|
3
3
|
import { t as cva } from "../_libs/class-variance-authority+clsx.mjs";
|
|
4
4
|
import { A as ChevronsUpDown, B as ArrowDown, C as FolderPlus, D as Copy, E as Download, F as Check, I as ArrowUp, L as ArrowUpToLine, N as ChevronRight, O as Command, P as ChevronDown, S as Folder, T as EllipsisVertical, _ as ListEnd, a as Square, b as GitBranch, c as Settings2, d as PanelLeft, f as PanelLeftOpen, g as ListStart, h as OctagonX, j as ChevronsDownUp, l as Search, n as WandSparkles, o as SquarePen, p as PanelLeftClose, r as Upload, s as SquareArrowOutUpRight, t as X, u as PanelRight, w as Ellipsis, x as GitCommitHorizontal, y as ImagePlus, z as ArrowLeft } from "../_libs/lucide-react.mjs";
|
|
5
|
-
import { $ as
|
|
5
|
+
import { $ as readStoredCenterMessages, A as TooltipTrigger, C as THEME_COLOR_MODE_STORAGE_KEY, D as Tooltip$1, E as TitleTooltip, F as cn, G as normalizePromptImage, H as flattenTree, J as normalizeThemeColorMode, K as normalizeSessionSelectionKeys, L as createContextId, M as appliedThemeClass, O as TooltipContent, P as buildItemsFromSync, Q as readStoredAutoScrollEnabled, R as createInitialSessionState, S as THEME_COLOR_MODES, T as THEME_STORAGE_KEY, U as getSessionTitle, X as previewUrlForImage, Y as normalizeThemeFamily, Z as promptDraftKey, _ as Route, _t as themeColorModeLabel, a as COLLAPSED_DIRECTORIES_STORAGE_KEY, at as readStoredRecentDirectories, b as SIDEBAR_DIRECTORIES_STORAGE_KEY, c as Kbd, ct as readStoredSessionDoneSoundEnabled, d as RECENT_DIRECTORIES_STORAGE_KEY, dt as readStoredThemeColorMode, et as readStoredCollapsedDirectories, f as RIGHT_SIDEBAR_ACTIVE_TAB_STORAGE_KEY, ft as rememberStoredPromptDraft, g as RIGHT_SIDEBAR_WIDTHS_STORAGE_KEY, gt as sessionListEntryKey, h as RIGHT_SIDEBAR_OPEN_STORAGE_KEY, ht as sameContextUsage, i as CENTER_MESSAGES_STORAGE_KEY, it as readStoredPromptDraft, j as VIEWER_CONTEXT_STORAGE_KEY, l as KeyboardShortcutContent, lt as readStoredSidebarDirectories, m as RIGHT_SIDEBAR_HISTORY_HEIGHT_STORAGE_KEY, mt as safeLocalStorageSetItem, n as APPLIED_THEME_STORAGE_KEY, nt as readStoredHideToolBlocks, o as DRAFT_DIRECTORY_STORAGE_KEY, ot as readStoredRightSidebarOpen, p as RIGHT_SIDEBAR_FILE_TREE_WIDTH_STORAGE_KEY, pt as safeLocalStorageGetItem, q as normalizeStoredDirectoryList, r as AUTO_SCROLL_ENABLED_STORAGE_KEY, rt as readStoredPinnedSessionKeys, s as HIDE_TOOL_BLOCKS_STORAGE_KEY, st as readStoredSessionDoneDesktopNotificationsEnabled, tt as readStoredDraftDirectory, u as PINNED_SESSIONS_STORAGE_KEY, ut as readStoredTheme, v as SESSION_DONE_DESKTOP_NOTIFICATIONS_ENABLED_STORAGE_KEY, vt as themeFamilyLabel, w as THEME_FAMILIES, x as Spinner, y as SESSION_DONE_SOUND_ENABLED_STORAGE_KEY, yt as thinkingSummaryText } from "./routes-BpP7WwMR.mjs";
|
|
6
6
|
import { i as useQuery, n as useIsMutating, o as useQueryClient, r as useIsFetching, t as useMutation } from "../_libs/tanstack__react-query.mjs";
|
|
7
7
|
import { t as useHotkeys } from "../_libs/tanstack__react-hotkeys.mjs";
|
|
8
8
|
import { a as matchesKeyboardEvent, i as batch, o as formatForDisplay, r as createStore } from "../_libs/@tanstack/hotkeys+[...].mjs";
|
|
@@ -22,7 +22,7 @@ import { t as remarkGfm } from "../_libs/remark-gfm.mjs";
|
|
|
22
22
|
import { a as getBuiltInSpriteSheet, i as getBuiltInFileIconColor, n as FileTree, r as createFileTreeIconResolver, t as useFileTree } from "../_libs/@pierre/trees+[...].mjs";
|
|
23
23
|
import { a as closestCenter, d as useSensors, f as CSS$1, i as PointerSensor, n as DragOverlay, t as DndContext, u as useSensor } from "../_libs/@dnd-kit/core+[...].mjs";
|
|
24
24
|
import { a as verticalListSortingStrategy, i as useSortable, n as arrayMove, r as horizontalListSortingStrategy, t as SortableContext } from "../_libs/dnd-kit__sortable.mjs";
|
|
25
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/routes-
|
|
25
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/routes-BZ9cdmtL.js
|
|
26
26
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
27
27
|
var import_jsx_runtime = require_jsx_runtime();
|
|
28
28
|
var MOBILE_BREAKPOINT = 768;
|
|
@@ -2774,25 +2774,33 @@ function AppShellSessionsDialogController({ ref, openStateRef, ...props }) {
|
|
|
2774
2774
|
...props
|
|
2775
2775
|
});
|
|
2776
2776
|
}
|
|
2777
|
-
var THEME_OPTIONS = [
|
|
2778
|
-
|
|
2779
|
-
"light",
|
|
2780
|
-
"dark"
|
|
2781
|
-
];
|
|
2777
|
+
var THEME_OPTIONS = [...THEME_FAMILIES];
|
|
2778
|
+
var THEME_COLOR_MODE_OPTIONS = [...THEME_COLOR_MODES];
|
|
2782
2779
|
function desktopNotificationPermissionLabel(permission) {
|
|
2783
2780
|
if (permission === "unsupported") return "Desktop notifications are unavailable in this browser.";
|
|
2784
2781
|
if (permission === "granted") return "Desktop notifications are enabled for this origin.";
|
|
2785
2782
|
if (permission === "denied") return "Desktop notifications are blocked in this browser.";
|
|
2786
2783
|
return "Desktop notifications will ask for browser permission when enabled.";
|
|
2787
2784
|
}
|
|
2788
|
-
function formatThemeMode(theme) {
|
|
2789
|
-
return `${theme[0].toUpperCase()}${theme.slice(1)}`;
|
|
2790
|
-
}
|
|
2791
2785
|
function formatToggleValue(enabled) {
|
|
2792
2786
|
return enabled ? "On" : "Off";
|
|
2793
2787
|
}
|
|
2794
|
-
function
|
|
2795
|
-
return
|
|
2788
|
+
function nextThemeColorMode(currentMode) {
|
|
2789
|
+
return THEME_COLOR_MODE_OPTIONS[(THEME_COLOR_MODE_OPTIONS.indexOf(currentMode) + 1) % THEME_COLOR_MODE_OPTIONS.length] ?? "auto";
|
|
2790
|
+
}
|
|
2791
|
+
function themeDescription(theme) {
|
|
2792
|
+
switch (theme) {
|
|
2793
|
+
case "default": return "Use Pico's default palette.";
|
|
2794
|
+
case "flexoki": return "Use Flexoki's warm paper and inky dark palettes.";
|
|
2795
|
+
default: return "Use this theme.";
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
function themeKeywords(theme) {
|
|
2799
|
+
return [
|
|
2800
|
+
theme,
|
|
2801
|
+
themeFamilyLabel(theme),
|
|
2802
|
+
themeDescription(theme)
|
|
2803
|
+
];
|
|
2796
2804
|
}
|
|
2797
2805
|
function settingsCommandKeywords(command) {
|
|
2798
2806
|
return [
|
|
@@ -2807,9 +2815,12 @@ function settingsCommandFilter(value, search, keywords) {
|
|
|
2807
2815
|
if (!query) return 1;
|
|
2808
2816
|
return [value, ...keywords ?? []].join(" ").toLowerCase().includes(query) ? 1 : 0;
|
|
2809
2817
|
}
|
|
2810
|
-
function AppShellSettingsDialog({ open, onOpenChange, currentTheme, onThemeChange, hideThinkingBlocks, onHideThinkingBlocksChange, hideToolBlocks, onHideToolBlocksChange, centerMessages, onCenterMessagesChange, autoScrollEnabled, onAutoScrollEnabledChange, sessionDoneSoundEnabled, onSessionDoneSoundEnabledChange, sessionDoneDesktopNotificationsEnabled, onSessionDoneDesktopNotificationsEnabledChange, desktopNotificationPermission, onLoginProviders, onLogoutProviders }) {
|
|
2818
|
+
function AppShellSettingsDialog({ open, onOpenChange, currentTheme, currentThemeColorMode, onThemeChange, onThemeColorModeChange, systemTheme, hideThinkingBlocks, onHideThinkingBlocksChange, hideToolBlocks, onHideToolBlocksChange, centerMessages, onCenterMessagesChange, autoScrollEnabled, onAutoScrollEnabledChange, sessionDoneSoundEnabled, onSessionDoneSoundEnabledChange, sessionDoneDesktopNotificationsEnabled, onSessionDoneDesktopNotificationsEnabledChange, desktopNotificationPermission, onLoginProviders, onLogoutProviders }) {
|
|
2811
2819
|
const [query, setQuery] = import_react.useState("");
|
|
2820
|
+
const [themeQuery, setThemeQuery] = import_react.useState("");
|
|
2821
|
+
const [stage, setStage] = import_react.useState("browse");
|
|
2812
2822
|
const [selectedCommandId, setSelectedCommandId] = import_react.useState("theme");
|
|
2823
|
+
const [selectedTheme, setSelectedTheme] = import_react.useState(currentTheme);
|
|
2813
2824
|
const isMobile = useIsMobile();
|
|
2814
2825
|
const desktopNotificationDescription = desktopNotificationPermissionLabel(desktopNotificationPermission);
|
|
2815
2826
|
const settingGroups = [
|
|
@@ -2818,16 +2829,29 @@ function AppShellSettingsDialog({ open, onOpenChange, currentTheme, onThemeChang
|
|
|
2818
2829
|
commands: [{
|
|
2819
2830
|
id: "theme",
|
|
2820
2831
|
title: "Theme",
|
|
2821
|
-
description: "
|
|
2822
|
-
valueLabel:
|
|
2832
|
+
description: "Choose between Default and Flexoki.",
|
|
2833
|
+
valueLabel: themeFamilyLabel(currentTheme),
|
|
2823
2834
|
keywords: [
|
|
2824
2835
|
"color",
|
|
2825
2836
|
"mode",
|
|
2837
|
+
"default",
|
|
2838
|
+
"flexoki"
|
|
2839
|
+
],
|
|
2840
|
+
onSelect: () => setStage("theme")
|
|
2841
|
+
}, {
|
|
2842
|
+
id: "theme-color-mode",
|
|
2843
|
+
title: "Light/dark mode",
|
|
2844
|
+
description: "Follow OS appearance, or force light or dark mode.",
|
|
2845
|
+
valueLabel: themeColorModeLabel(currentThemeColorMode, systemTheme),
|
|
2846
|
+
keywords: [
|
|
2847
|
+
"auto",
|
|
2826
2848
|
"system",
|
|
2827
2849
|
"light",
|
|
2828
|
-
"dark"
|
|
2850
|
+
"dark",
|
|
2851
|
+
"mode",
|
|
2852
|
+
"color"
|
|
2829
2853
|
],
|
|
2830
|
-
onSelect: () =>
|
|
2854
|
+
onSelect: () => onThemeColorModeChange(nextThemeColorMode(currentThemeColorMode))
|
|
2831
2855
|
}]
|
|
2832
2856
|
},
|
|
2833
2857
|
{
|
|
@@ -2950,14 +2974,30 @@ function AppShellSettingsDialog({ open, onOpenChange, currentTheme, onThemeChang
|
|
|
2950
2974
|
}
|
|
2951
2975
|
];
|
|
2952
2976
|
import_react.useEffect(() => {
|
|
2953
|
-
if (!open
|
|
2954
|
-
|
|
2977
|
+
if (!open) {
|
|
2978
|
+
if (query) setQuery("");
|
|
2979
|
+
if (themeQuery) setThemeQuery("");
|
|
2980
|
+
setStage("browse");
|
|
2981
|
+
return;
|
|
2982
|
+
}
|
|
2983
|
+
}, [
|
|
2984
|
+
open,
|
|
2985
|
+
query,
|
|
2986
|
+
themeQuery
|
|
2987
|
+
]);
|
|
2988
|
+
import_react.useEffect(() => {
|
|
2989
|
+
if (stage === "theme") setSelectedTheme(currentTheme);
|
|
2990
|
+
}, [currentTheme, stage]);
|
|
2955
2991
|
const handleSelect = (command) => {
|
|
2956
2992
|
Promise.resolve(command.onSelect()).catch((error) => {
|
|
2957
2993
|
console.error(error);
|
|
2958
2994
|
});
|
|
2959
2995
|
};
|
|
2960
|
-
const
|
|
2996
|
+
const handleThemeSelect = (theme) => {
|
|
2997
|
+
setSelectedTheme(theme);
|
|
2998
|
+
onThemeChange(theme);
|
|
2999
|
+
};
|
|
3000
|
+
const settingsBrowseBody = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Command$1, {
|
|
2961
3001
|
shouldFilter: true,
|
|
2962
3002
|
filter: settingsCommandFilter,
|
|
2963
3003
|
loop: true,
|
|
@@ -2999,10 +3039,82 @@ function AppShellSettingsDialog({ open, onOpenChange, currentTheme, onThemeChang
|
|
|
2999
3039
|
}),
|
|
3000
3040
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3001
3041
|
className: "hidden border-t border-border/70 px-3 py-2 text-xs text-muted-foreground md:block",
|
|
3002
|
-
children: "Use ↑/↓ to select, Enter to
|
|
3042
|
+
children: "Use ↑/↓ to select, Enter to open or toggle, and Esc to close."
|
|
3003
3043
|
})
|
|
3004
3044
|
]
|
|
3005
3045
|
});
|
|
3046
|
+
const settingsThemeBody = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3047
|
+
className: "flex min-h-0 flex-1 flex-col",
|
|
3048
|
+
onKeyDown: (event) => {
|
|
3049
|
+
if (event.key !== "Escape") return;
|
|
3050
|
+
event.preventDefault();
|
|
3051
|
+
event.stopPropagation();
|
|
3052
|
+
setStage("browse");
|
|
3053
|
+
},
|
|
3054
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3055
|
+
className: "flex items-center gap-2 border-b border-border/70 px-3 py-2",
|
|
3056
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button$1, {
|
|
3057
|
+
type: "button",
|
|
3058
|
+
variant: "ghost",
|
|
3059
|
+
size: "icon-sm",
|
|
3060
|
+
onClick: () => setStage("browse"),
|
|
3061
|
+
"aria-label": "Back to settings",
|
|
3062
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ArrowLeft, {})
|
|
3063
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3064
|
+
className: "min-w-0 flex-1",
|
|
3065
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3066
|
+
className: "truncate text-sm font-medium",
|
|
3067
|
+
children: "Choose theme"
|
|
3068
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3069
|
+
className: "truncate text-xs text-muted-foreground",
|
|
3070
|
+
children: ["Current: ", themeFamilyLabel(currentTheme)]
|
|
3071
|
+
})]
|
|
3072
|
+
})]
|
|
3073
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Command$1, {
|
|
3074
|
+
shouldFilter: true,
|
|
3075
|
+
loop: true,
|
|
3076
|
+
value: selectedTheme,
|
|
3077
|
+
onValueChange: (value) => setSelectedTheme(value),
|
|
3078
|
+
className: "min-h-0 flex-1 rounded-none!",
|
|
3079
|
+
children: [
|
|
3080
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CommandInput, {
|
|
3081
|
+
autoFocus: !isMobile,
|
|
3082
|
+
value: themeQuery,
|
|
3083
|
+
onValueChange: setThemeQuery,
|
|
3084
|
+
placeholder: "Search themes",
|
|
3085
|
+
className: "text-base md:text-sm"
|
|
3086
|
+
}),
|
|
3087
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CommandList, {
|
|
3088
|
+
className: "max-h-none min-h-0 flex-1 md:max-h-[min(70vh,28rem)]",
|
|
3089
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CommandEmpty, { children: "No themes found." }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CommandGroup, {
|
|
3090
|
+
heading: "Themes",
|
|
3091
|
+
children: THEME_OPTIONS.map((theme) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CommandItem, {
|
|
3092
|
+
value: theme,
|
|
3093
|
+
keywords: themeKeywords(theme),
|
|
3094
|
+
onSelect: () => handleThemeSelect(theme),
|
|
3095
|
+
"data-checked": theme === currentTheme ? true : void 0,
|
|
3096
|
+
className: "items-start py-2",
|
|
3097
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
3098
|
+
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
3099
|
+
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
3100
|
+
className: "truncate font-medium",
|
|
3101
|
+
children: themeFamilyLabel(theme)
|
|
3102
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
3103
|
+
className: "line-clamp-2 text-xs text-muted-foreground",
|
|
3104
|
+
children: themeDescription(theme)
|
|
3105
|
+
})]
|
|
3106
|
+
})
|
|
3107
|
+
}, theme))
|
|
3108
|
+
})]
|
|
3109
|
+
}),
|
|
3110
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
3111
|
+
className: "hidden border-t border-border/70 px-3 py-2 text-xs text-muted-foreground md:block",
|
|
3112
|
+
children: "Use ↑/↓ to select, Enter to choose, and Esc to go back."
|
|
3113
|
+
})
|
|
3114
|
+
]
|
|
3115
|
+
})]
|
|
3116
|
+
});
|
|
3117
|
+
const settingsCommandBody = stage === "theme" ? settingsThemeBody : settingsBrowseBody;
|
|
3006
3118
|
if (isMobile) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Drawer$1, {
|
|
3007
3119
|
open,
|
|
3008
3120
|
onOpenChange,
|
|
@@ -3019,7 +3131,7 @@ function AppShellSettingsDialog({ open, onOpenChange, currentTheme, onThemeChang
|
|
|
3019
3131
|
open,
|
|
3020
3132
|
onOpenChange,
|
|
3021
3133
|
title: "Settings",
|
|
3022
|
-
description: "Search settings. Press Enter on a setting to
|
|
3134
|
+
description: "Search settings. Press Enter on a setting to open or toggle it.",
|
|
3023
3135
|
className: "sm:max-w-2xl",
|
|
3024
3136
|
initialFocus: true,
|
|
3025
3137
|
children: settingsCommandBody
|
|
@@ -7043,7 +7155,7 @@ var AppShellTreeDialogHost = import_react.memo(function AppShellTreeDialogHost({
|
|
|
7043
7155
|
activeSessionStreaming: useSelector(sessionStore, (sessionState) => sessionState.streaming)
|
|
7044
7156
|
});
|
|
7045
7157
|
});
|
|
7046
|
-
var AppShellSettingsDialogHost = import_react.memo(function AppShellSettingsDialogHost({ authDialogRef, currentTheme, displaySettingsStore, notificationStore, onAutoScrollEnabledChange, onCenterMessagesChange, onHideThinkingBlocksChange, onHideToolBlocksChange, onSessionDoneDesktopNotificationsEnabledChange, onSessionDoneSoundEnabledChange, onThemeChange, sessionStore, settingsDialogRef, settingsOpenRef }) {
|
|
7158
|
+
var AppShellSettingsDialogHost = import_react.memo(function AppShellSettingsDialogHost({ authDialogRef, currentTheme, currentThemeColorMode, displaySettingsStore, notificationStore, onAutoScrollEnabledChange, onCenterMessagesChange, onHideThinkingBlocksChange, onHideToolBlocksChange, onSessionDoneDesktopNotificationsEnabledChange, onSessionDoneSoundEnabledChange, onThemeChange, onThemeColorModeChange, sessionStore, settingsDialogRef, settingsOpenRef, systemTheme }) {
|
|
7047
7159
|
const hideThinkingBlocks = useSelector(sessionStore, (sessionState) => sessionState.hideThinkingBlock);
|
|
7048
7160
|
const { autoScrollEnabled, centerMessages, hideToolBlocks } = useSelector(displaySettingsStore);
|
|
7049
7161
|
const { desktopNotificationPermission, sessionDoneDesktopNotificationsEnabled, sessionDoneSoundEnabled } = useSelector(notificationStore, (state) => ({
|
|
@@ -7059,7 +7171,10 @@ var AppShellSettingsDialogHost = import_react.memo(function AppShellSettingsDial
|
|
|
7059
7171
|
ref: settingsDialogRef,
|
|
7060
7172
|
openStateRef: settingsOpenRef,
|
|
7061
7173
|
currentTheme,
|
|
7174
|
+
currentThemeColorMode,
|
|
7062
7175
|
onThemeChange,
|
|
7176
|
+
onThemeColorModeChange,
|
|
7177
|
+
systemTheme,
|
|
7063
7178
|
hideThinkingBlocks,
|
|
7064
7179
|
onHideThinkingBlocksChange,
|
|
7065
7180
|
hideToolBlocks,
|
|
@@ -7086,7 +7201,7 @@ var AppShellUiRequestDialogHost = import_react.memo(function AppShellUiRequestDi
|
|
|
7086
7201
|
onAuthBack: () => authDialogRef.current?.open("login")
|
|
7087
7202
|
});
|
|
7088
7203
|
});
|
|
7089
|
-
var AppShellFloatingControllers = import_react.memo(function AppShellFloatingControllers({ activeSessionId, addDirectoryDialogRef, addDirectoryOpenRef, addDirectoryPath, baseSidebarDirectories, commandPaletteCommandsRef, commandPaletteOpenRef, commandPaletteRef, currentSessionQueryScope, currentTheme, authDialogRef, authOpenRef, deleteDialogRef, deleteOpenRef, deleteSessions, deleteOldDirectorySessionsDialogRef, deleteOldDirectorySessionsOpenRef, notificationStore, forkDialogRef, forkOpenRef, gitCommitDialogRef, gitCommitOpenRef, displaySettingsStore, knownDirectories, onAutoScrollEnabledChange, onCenterMessagesChange, onHideThinkingBlocksChange, onHideToolBlocksChange, onSessionDoneDesktopNotificationsEnabledChange, onSessionDoneSoundEnabledChange, onSessionDialogSelect, onThemeChange, recentDirectoriesStore, renameDialogRef, renameOpenRef, renameSessionPath, sessionCwd, sessionsDialogDirectory, sessionsDialogRef, sessionsOpenRef, sessionStore, settingsDialogRef, settingsOpenRef, sidebarStore, treeDialogRef, treeOpenRef, uiRequestDialogRef, uiRequestOpenRef, viewerContextId }) {
|
|
7204
|
+
var AppShellFloatingControllers = import_react.memo(function AppShellFloatingControllers({ activeSessionId, addDirectoryDialogRef, addDirectoryOpenRef, addDirectoryPath, baseSidebarDirectories, commandPaletteCommandsRef, commandPaletteOpenRef, commandPaletteRef, currentSessionQueryScope, currentTheme, currentThemeColorMode, authDialogRef, authOpenRef, deleteDialogRef, deleteOpenRef, deleteSessions, deleteOldDirectorySessionsDialogRef, deleteOldDirectorySessionsOpenRef, notificationStore, forkDialogRef, forkOpenRef, gitCommitDialogRef, gitCommitOpenRef, displaySettingsStore, knownDirectories, onAutoScrollEnabledChange, onCenterMessagesChange, onHideThinkingBlocksChange, onHideToolBlocksChange, onSessionDoneDesktopNotificationsEnabledChange, onSessionDoneSoundEnabledChange, onSessionDialogSelect, onThemeChange, onThemeColorModeChange, recentDirectoriesStore, renameDialogRef, renameOpenRef, renameSessionPath, sessionCwd, sessionsDialogDirectory, sessionsDialogRef, sessionsOpenRef, sessionStore, settingsDialogRef, settingsOpenRef, sidebarStore, treeDialogRef, treeOpenRef, uiRequestDialogRef, uiRequestOpenRef, viewerContextId, systemTheme }) {
|
|
7090
7205
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
7091
7206
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AppShellCommandPaletteHost, {
|
|
7092
7207
|
commandPaletteCommandsRef,
|
|
@@ -7162,6 +7277,7 @@ var AppShellFloatingControllers = import_react.memo(function AppShellFloatingCon
|
|
|
7162
7277
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AppShellSettingsDialogHost, {
|
|
7163
7278
|
authDialogRef,
|
|
7164
7279
|
currentTheme,
|
|
7280
|
+
currentThemeColorMode,
|
|
7165
7281
|
displaySettingsStore,
|
|
7166
7282
|
notificationStore,
|
|
7167
7283
|
onAutoScrollEnabledChange,
|
|
@@ -7171,9 +7287,11 @@ var AppShellFloatingControllers = import_react.memo(function AppShellFloatingCon
|
|
|
7171
7287
|
onSessionDoneDesktopNotificationsEnabledChange,
|
|
7172
7288
|
onSessionDoneSoundEnabledChange,
|
|
7173
7289
|
onThemeChange,
|
|
7290
|
+
onThemeColorModeChange,
|
|
7174
7291
|
sessionStore,
|
|
7175
7292
|
settingsDialogRef,
|
|
7176
|
-
settingsOpenRef
|
|
7293
|
+
settingsOpenRef,
|
|
7294
|
+
systemTheme
|
|
7177
7295
|
}),
|
|
7178
7296
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AppShellUiRequestDialogHost, {
|
|
7179
7297
|
activeSessionId,
|
|
@@ -18934,6 +19052,34 @@ function useAppShellPromptMutations({ viewerContextId, activeSessionId, defaultN
|
|
|
18934
19052
|
submitPrompt
|
|
18935
19053
|
};
|
|
18936
19054
|
}
|
|
19055
|
+
function usePicoTheme() {
|
|
19056
|
+
const { setTheme, systemTheme } = z();
|
|
19057
|
+
const [themeFamily, setThemeFamilyState] = import_react.useState(() => readStoredTheme());
|
|
19058
|
+
const [colorMode, setColorModeState] = import_react.useState(() => readStoredThemeColorMode());
|
|
19059
|
+
const appliedTheme = appliedThemeClass(themeFamily, colorMode, systemTheme);
|
|
19060
|
+
import_react.useEffect(() => {
|
|
19061
|
+
setTheme(appliedTheme);
|
|
19062
|
+
safeLocalStorageSetItem(APPLIED_THEME_STORAGE_KEY, appliedTheme);
|
|
19063
|
+
}, [appliedTheme, setTheme]);
|
|
19064
|
+
const setThemeFamily = (value) => {
|
|
19065
|
+
const nextTheme = normalizeThemeFamily(value);
|
|
19066
|
+
setThemeFamilyState(nextTheme);
|
|
19067
|
+
safeLocalStorageSetItem(THEME_STORAGE_KEY, nextTheme);
|
|
19068
|
+
};
|
|
19069
|
+
const setColorMode = (value) => {
|
|
19070
|
+
const nextMode = normalizeThemeColorMode(value);
|
|
19071
|
+
setColorModeState(nextMode);
|
|
19072
|
+
safeLocalStorageSetItem(THEME_COLOR_MODE_STORAGE_KEY, nextMode);
|
|
19073
|
+
};
|
|
19074
|
+
return {
|
|
19075
|
+
appliedTheme,
|
|
19076
|
+
colorMode,
|
|
19077
|
+
setColorMode,
|
|
19078
|
+
setThemeFamily,
|
|
19079
|
+
systemTheme,
|
|
19080
|
+
themeFamily
|
|
19081
|
+
};
|
|
19082
|
+
}
|
|
18937
19083
|
function sameThinkingLevelSessionTarget(target, state) {
|
|
18938
19084
|
if (target.sessionKey || state.sessionKey) return target.sessionKey === state.sessionKey;
|
|
18939
19085
|
if (target.sessionId || state.sessionId) return target.sessionId === state.sessionId;
|
|
@@ -20596,8 +20742,7 @@ var AppShellSessionWorkspace = import_react.forwardRef(function AppShellSessionW
|
|
|
20596
20742
|
conversationItemsStore.setItems(nextItems);
|
|
20597
20743
|
setSessionState(nextState);
|
|
20598
20744
|
}, [conversationItemsStore]);
|
|
20599
|
-
const {
|
|
20600
|
-
const currentTheme = normalizeThemeMode(theme);
|
|
20745
|
+
const { colorMode: currentThemeColorMode, setColorMode, setThemeFamily, systemTheme, themeFamily: currentTheme } = usePicoTheme();
|
|
20601
20746
|
const { initialLoadingSessionId, loadingSessionId } = useSelector(appUiStore, (state) => ({
|
|
20602
20747
|
initialLoadingSessionId: state.initialLoadingSessionId,
|
|
20603
20748
|
loadingSessionId: state.loadingSessionId
|
|
@@ -21512,7 +21657,10 @@ var AppShellSessionWorkspace = import_react.forwardRef(function AppShellSessionW
|
|
|
21512
21657
|
}
|
|
21513
21658
|
};
|
|
21514
21659
|
const handleThemeChange = (value) => {
|
|
21515
|
-
|
|
21660
|
+
setThemeFamily(value);
|
|
21661
|
+
};
|
|
21662
|
+
const handleThemeColorModeChange = (value) => {
|
|
21663
|
+
setColorMode(value);
|
|
21516
21664
|
};
|
|
21517
21665
|
const composerSnapshot = {
|
|
21518
21666
|
activeSessionId,
|
|
@@ -22158,6 +22306,7 @@ var AppShellSessionWorkspace = import_react.forwardRef(function AppShellSessionW
|
|
|
22158
22306
|
commandPaletteRef,
|
|
22159
22307
|
currentSessionQueryScope,
|
|
22160
22308
|
currentTheme,
|
|
22309
|
+
currentThemeColorMode,
|
|
22161
22310
|
authDialogRef,
|
|
22162
22311
|
authOpenRef,
|
|
22163
22312
|
deleteDialogRef,
|
|
@@ -22182,6 +22331,8 @@ var AppShellSessionWorkspace = import_react.forwardRef(function AppShellSessionW
|
|
|
22182
22331
|
onSessionDoneSoundEnabledChange: handleSessionDoneSoundEnabledChange,
|
|
22183
22332
|
onSessionDialogSelect: handleSelectSession,
|
|
22184
22333
|
onThemeChange: handleThemeChange,
|
|
22334
|
+
onThemeColorModeChange: handleThemeColorModeChange,
|
|
22335
|
+
systemTheme,
|
|
22185
22336
|
recentDirectoriesStore,
|
|
22186
22337
|
renameDialogRef,
|
|
22187
22338
|
renameOpenRef,
|
|
@@ -5,7 +5,7 @@ import { n as clsx } from "../_libs/class-variance-authority+clsx.mjs";
|
|
|
5
5
|
import { t as twMerge } from "../_libs/tailwind-merge.mjs";
|
|
6
6
|
import { B as ArrowDown, I as ArrowUp, M as ChevronUp, O as Command, R as ArrowRight, V as ArrowBigUp, m as Option, z as ArrowLeft } from "../_libs/lucide-react.mjs";
|
|
7
7
|
import { n as string, t as object } from "../_libs/zod.mjs";
|
|
8
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/routes-
|
|
8
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/routes-BpP7WwMR.js
|
|
9
9
|
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
10
10
|
var import_jsx_runtime = require_jsx_runtime();
|
|
11
11
|
function cn(...inputs) {
|
|
@@ -255,6 +255,20 @@ function Spinner({ className, "aria-label": ariaLabel = "Loading", ...props }) {
|
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
257
|
var THEME_STORAGE_KEY = "pico-theme";
|
|
258
|
+
var THEME_COLOR_MODE_STORAGE_KEY = "pico-theme-color-mode";
|
|
259
|
+
var APPLIED_THEME_STORAGE_KEY = "pico-applied-theme";
|
|
260
|
+
var THEME_FAMILIES = ["default", "flexoki"];
|
|
261
|
+
var THEME_COLOR_MODES = [
|
|
262
|
+
"auto",
|
|
263
|
+
"light",
|
|
264
|
+
"dark"
|
|
265
|
+
];
|
|
266
|
+
var APPLIED_THEME_CLASSES = [
|
|
267
|
+
"light",
|
|
268
|
+
"dark",
|
|
269
|
+
"flexoki-light",
|
|
270
|
+
"flexoki-dark"
|
|
271
|
+
];
|
|
258
272
|
var DRAFT_DIRECTORY_STORAGE_KEY = "pico-draft-directory";
|
|
259
273
|
var SIDEBAR_DIRECTORIES_STORAGE_KEY = "pico-sidebar-directories";
|
|
260
274
|
var COLLAPSED_DIRECTORIES_STORAGE_KEY = "pico-collapsed-directories";
|
|
@@ -412,8 +426,39 @@ function readStoredRecentDirectories() {
|
|
|
412
426
|
return [];
|
|
413
427
|
}
|
|
414
428
|
}
|
|
415
|
-
function
|
|
416
|
-
return value === "
|
|
429
|
+
function normalizeThemeFamily(value) {
|
|
430
|
+
return value === "flexoki" || value === "flexoki-light" || value === "flexoki-dark" ? "flexoki" : "default";
|
|
431
|
+
}
|
|
432
|
+
function normalizeThemeColorMode(value) {
|
|
433
|
+
if (value === "auto" || value === "system") return "auto";
|
|
434
|
+
if (value === "light" || value === "flexoki-light") return "light";
|
|
435
|
+
if (value === "dark" || value === "flexoki-dark") return "dark";
|
|
436
|
+
return "auto";
|
|
437
|
+
}
|
|
438
|
+
function resolvedThemeMode(mode, systemTheme) {
|
|
439
|
+
if (mode === "auto") return systemTheme === "dark" ? "dark" : "light";
|
|
440
|
+
return mode;
|
|
441
|
+
}
|
|
442
|
+
function appliedThemeClass(family, mode, systemTheme) {
|
|
443
|
+
const resolvedMode = resolvedThemeMode(mode, systemTheme);
|
|
444
|
+
if (family === "flexoki") return resolvedMode === "dark" ? "flexoki-dark" : "flexoki-light";
|
|
445
|
+
return resolvedMode;
|
|
446
|
+
}
|
|
447
|
+
function themeFamilyLabel(theme) {
|
|
448
|
+
return theme === "flexoki" ? "Flexoki" : "Default";
|
|
449
|
+
}
|
|
450
|
+
function themeColorModeLabel(mode, systemTheme) {
|
|
451
|
+
if (mode === "auto") {
|
|
452
|
+
if (!systemTheme) return "Auto";
|
|
453
|
+
return `Auto (${resolvedThemeMode(mode, systemTheme) === "light" ? "Light" : "Dark"})`;
|
|
454
|
+
}
|
|
455
|
+
return mode === "light" ? "Light" : "Dark";
|
|
456
|
+
}
|
|
457
|
+
function readStoredTheme() {
|
|
458
|
+
return normalizeThemeFamily((safeLocalStorageGetItem("pico-theme") ?? "default").trim());
|
|
459
|
+
}
|
|
460
|
+
function readStoredThemeColorMode() {
|
|
461
|
+
return normalizeThemeColorMode((safeLocalStorageGetItem("pico-theme-color-mode") ?? safeLocalStorageGetItem("pico-theme") ?? "auto").trim());
|
|
417
462
|
}
|
|
418
463
|
function readStoredHideToolBlocks() {
|
|
419
464
|
return safeLocalStorageGetItem(HIDE_TOOL_BLOCKS_STORAGE_KEY) === "1";
|
|
@@ -1279,11 +1324,11 @@ function getSessionTitle(summary) {
|
|
|
1279
1324
|
if (summary?.name?.trim()) return summary.name.trim();
|
|
1280
1325
|
return "New session";
|
|
1281
1326
|
}
|
|
1282
|
-
var $$splitComponentImporter = () => import("./routes-
|
|
1327
|
+
var $$splitComponentImporter = () => import("./routes-BZ9cdmtL.mjs");
|
|
1283
1328
|
var indexSearchSchema = object({ session: string().optional() });
|
|
1284
1329
|
var Route = createFileRoute("/")({
|
|
1285
1330
|
validateSearch: indexSearchSchema,
|
|
1286
1331
|
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
1287
1332
|
});
|
|
1288
1333
|
//#endregion
|
|
1289
|
-
export {
|
|
1334
|
+
export { readStoredCenterMessages as $, TooltipTrigger as A, extractMessageText as B, THEME_COLOR_MODE_STORAGE_KEY as C, Tooltip$1 as D, TitleTooltip as E, cn as F, normalizePromptImage as G, flattenTree as H, createCompactionSummaryItem as I, normalizeThemeColorMode as J, normalizeSessionSelectionKeys as K, createContextId as L, appliedThemeClass as M, assistantBlocksFromMessage as N, TooltipContent as O, buildItemsFromSync as P, readStoredAutoScrollEnabled as Q, createInitialSessionState as R, THEME_COLOR_MODES as S, THEME_STORAGE_KEY as T, getSessionTitle as U, extractToolText as V, mergeAssistantBlocksForStreaming as W, previewUrlForImage as X, normalizeThemeFamily as Y, promptDraftKey as Z, Route as _, themeColorModeLabel as _t, COLLAPSED_DIRECTORIES_STORAGE_KEY as a, readStoredRecentDirectories as at, SIDEBAR_DIRECTORIES_STORAGE_KEY as b, toolCategoryFromTool as bt, Kbd as c, readStoredSessionDoneSoundEnabled as ct, RECENT_DIRECTORIES_STORAGE_KEY as d, readStoredThemeColorMode as dt, readStoredCollapsedDirectories as et, RIGHT_SIDEBAR_ACTIVE_TAB_STORAGE_KEY as f, rememberStoredPromptDraft as ft, RIGHT_SIDEBAR_WIDTHS_STORAGE_KEY as g, sessionListEntryKey as gt, RIGHT_SIDEBAR_OPEN_STORAGE_KEY as h, sameContextUsage as ht, CENTER_MESSAGES_STORAGE_KEY as i, readStoredPromptDraft as it, VIEWER_CONTEXT_STORAGE_KEY as j, TooltipProvider as k, KeyboardShortcutContent as l, readStoredSidebarDirectories as lt, RIGHT_SIDEBAR_HISTORY_HEIGHT_STORAGE_KEY as m, safeLocalStorageSetItem as mt, APPLIED_THEME_STORAGE_KEY as n, readStoredHideToolBlocks as nt, DRAFT_DIRECTORY_STORAGE_KEY as o, readStoredRightSidebarOpen as ot, RIGHT_SIDEBAR_FILE_TREE_WIDTH_STORAGE_KEY as p, safeLocalStorageGetItem as pt, normalizeStoredDirectoryList as q, AUTO_SCROLL_ENABLED_STORAGE_KEY as r, readStoredPinnedSessionKeys as rt, HIDE_TOOL_BLOCKS_STORAGE_KEY as s, readStoredSessionDoneDesktopNotificationsEnabled as st, APPLIED_THEME_CLASSES as t, readStoredDraftDirectory as tt, PINNED_SESSIONS_STORAGE_KEY as u, readStoredTheme as ut, SESSION_DONE_DESKTOP_NOTIFICATIONS_ENABLED_STORAGE_KEY as v, themeFamilyLabel as vt, THEME_FAMILIES as w, Spinner as x, SESSION_DONE_SOUND_ENABLED_STORAGE_KEY as y, thinkingSummaryText as yt, extractMessageImages as z };
|
|
@@ -3813,7 +3813,7 @@ var defaultSerovalPlugins = [
|
|
|
3813
3813
|
* the dev styles URL for route-scoped CSS collection.
|
|
3814
3814
|
*/
|
|
3815
3815
|
async function getStartManifest(matchedRoutes) {
|
|
3816
|
-
const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-
|
|
3816
|
+
const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-ByPcMc-9.mjs");
|
|
3817
3817
|
const startManifest = tsrStartManifest();
|
|
3818
3818
|
const rootRoute = startManifest.routes[rootRouteId] = startManifest.routes["__root__"] || {};
|
|
3819
3819
|
rootRoute.assets = rootRoute.assets || [];
|
|
@@ -4799,7 +4799,7 @@ var baseManifestPromise;
|
|
|
4799
4799
|
var cachedFinalManifestPromise;
|
|
4800
4800
|
async function loadEntries() {
|
|
4801
4801
|
const [routerEntry, startEntry, pluginAdapters] = await Promise.all([
|
|
4802
|
-
import("./router-
|
|
4802
|
+
import("./router-Bc19lQoF.mjs"),
|
|
4803
4803
|
import("./start-Captdpmb.mjs"),
|
|
4804
4804
|
import("../__23tanstack-start-plugin-adapters-y_fshQDY.mjs")
|
|
4805
4805
|
]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/_tanstack-start-manifest_v-
|
|
1
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/_tanstack-start-manifest_v-ByPcMc-9.js
|
|
2
2
|
var tsrStartManifest = () => ({
|
|
3
3
|
routes: {
|
|
4
4
|
__root__: {
|
|
@@ -50,16 +50,16 @@ var tsrStartManifest = () => ({
|
|
|
50
50
|
"/api/ui/$id"
|
|
51
51
|
],
|
|
52
52
|
assets: void 0,
|
|
53
|
-
preloads: ["/assets/index-
|
|
53
|
+
preloads: ["/assets/index-relf5WuY.js", "/assets/rolldown-runtime-S-ySWqyJ.js"]
|
|
54
54
|
},
|
|
55
55
|
"/": {
|
|
56
56
|
filePath: "/home/runner/work/pico/pico/src/routes/index.tsx",
|
|
57
57
|
children: void 0,
|
|
58
58
|
assets: void 0,
|
|
59
|
-
preloads: ["/assets/routes-
|
|
59
|
+
preloads: ["/assets/routes-D_oJExAc.js"]
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
-
clientEntry: "/assets/index-
|
|
62
|
+
clientEntry: "/assets/index-relf5WuY.js"
|
|
63
63
|
});
|
|
64
64
|
//#endregion
|
|
65
65
|
export { tsrStartManifest };
|