@ash-cloud/ash-ui 0.0.2 → 0.0.3
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.cjs +199 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +78 -1
- package/dist/index.d.ts +78 -1
- package/dist/index.js +198 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -336,6 +336,83 @@ interface TodoPanelProps {
|
|
|
336
336
|
*/
|
|
337
337
|
declare function TodoPanel({ todos, title, compact, showProgress, className, }: TodoPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
338
338
|
|
|
339
|
+
interface EnvVarsPanelProps {
|
|
340
|
+
/** Current environment variables */
|
|
341
|
+
envVars: Record<string, string>;
|
|
342
|
+
/** Callback when environment variables change */
|
|
343
|
+
onChange: (envVars: Record<string, string>) => void;
|
|
344
|
+
/** Whether the panel is collapsed initially (default: true) */
|
|
345
|
+
defaultCollapsed?: boolean;
|
|
346
|
+
/** Additional class name */
|
|
347
|
+
className?: string;
|
|
348
|
+
/** Label for the panel header */
|
|
349
|
+
label?: string;
|
|
350
|
+
/** Helper text shown below the input */
|
|
351
|
+
helperText?: string;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* EnvVarsPanel - Collapsible panel for managing environment variables
|
|
355
|
+
*
|
|
356
|
+
* Provides a UI for adding, viewing, and removing environment variables.
|
|
357
|
+
* Commonly used to set environment variables for sandbox/agent execution.
|
|
358
|
+
*
|
|
359
|
+
* @example
|
|
360
|
+
* ```tsx
|
|
361
|
+
* function ChatSettings() {
|
|
362
|
+
* const [envVars, setEnvVars] = useState<Record<string, string>>({});
|
|
363
|
+
*
|
|
364
|
+
* return (
|
|
365
|
+
* <EnvVarsPanel
|
|
366
|
+
* envVars={envVars}
|
|
367
|
+
* onChange={setEnvVars}
|
|
368
|
+
* helperText="These variables will be available in the sandbox."
|
|
369
|
+
* />
|
|
370
|
+
* );
|
|
371
|
+
* }
|
|
372
|
+
* ```
|
|
373
|
+
*/
|
|
374
|
+
declare function EnvVarsPanel({ envVars, onChange, defaultCollapsed, className, label, helperText, }: EnvVarsPanelProps): react_jsx_runtime.JSX.Element;
|
|
375
|
+
|
|
376
|
+
interface DisplayModeToggleProps {
|
|
377
|
+
/** Additional class name */
|
|
378
|
+
className?: string;
|
|
379
|
+
/** Show label text (default: true) */
|
|
380
|
+
showLabel?: boolean;
|
|
381
|
+
/** Custom labels for modes */
|
|
382
|
+
labels?: {
|
|
383
|
+
inline?: string;
|
|
384
|
+
compact?: string;
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* DisplayModeToggle - Button to toggle between inline and compact display modes
|
|
389
|
+
*
|
|
390
|
+
* Uses the DisplayModeContext to toggle between 'inline' and 'compact' modes.
|
|
391
|
+
* Must be used within a DisplayModeProvider.
|
|
392
|
+
*
|
|
393
|
+
* @example
|
|
394
|
+
* ```tsx
|
|
395
|
+
* function ChatHeader() {
|
|
396
|
+
* return (
|
|
397
|
+
* <header>
|
|
398
|
+
* <h1>Chat</h1>
|
|
399
|
+
* <DisplayModeToggle />
|
|
400
|
+
* </header>
|
|
401
|
+
* );
|
|
402
|
+
* }
|
|
403
|
+
*
|
|
404
|
+
* function App() {
|
|
405
|
+
* return (
|
|
406
|
+
* <DisplayModeProvider>
|
|
407
|
+
* <ChatHeader />
|
|
408
|
+
* <MessageList entries={entries} />
|
|
409
|
+
* </DisplayModeProvider>
|
|
410
|
+
* );
|
|
411
|
+
* }
|
|
412
|
+
* ```
|
|
413
|
+
*/
|
|
414
|
+
declare function DisplayModeToggle({ className, showLabel, labels, }: DisplayModeToggleProps): react_jsx_runtime.JSX.Element;
|
|
415
|
+
|
|
339
416
|
interface StatusIndicatorProps {
|
|
340
417
|
status: ToolStatus;
|
|
341
418
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -763,4 +840,4 @@ interface UseFileUploadReturn {
|
|
|
763
840
|
declare function useFileUpload({ maxFileSize, // 100MB
|
|
764
841
|
maxFiles, onValidationError, }?: UseFileUploadOptions): UseFileUploadReturn;
|
|
765
842
|
|
|
766
|
-
export { ActionIcon, type ActionIconProps, ActionType, AssistantMessage, type AssistantMessageProps, type FileAttachment as ChatFileAttachment, CodeBlock, type CodeBlockProps, CompactToolStatusLine, type CompactToolStatusLineProps, type DisplayModeContextType, DisplayModeProvider, type DisplayModeProviderProps, ErrorMessage, type ErrorMessageProps, JsonDisplay, type JsonDisplayProps, LoadingIndicator, type LoadingIndicatorProps, LogEntry, LogsPanel, type LogsPanelProps, MessageEntry, type MessageEntryProps, MessageList, type MessageListProps, NormalizedEntry, NormalizedToolCall, OptionCards, type OptionCardsProps, ParsedOption, type QueuedMessage, StatusIndicator, type StatusIndicatorProps, StreamingText, type StreamingTextProps, type Theme, type ThemeContextType, ThemeProvider, type ThemeProviderProps, ThinkingMessage, type ThinkingMessageProps, TodoItem, TodoPanel, type TodoPanelProps, ToolCallCard, type ToolCallCardProps, ToolCallMessage, type ToolCallMessageProps, ToolDisplayConfig, ToolDisplayMode, ToolExecutionGroup, type ToolExecutionGroupProps, ToolStatus, TypewriterText, type TypewriterTextProps, type UseFileUploadOptions, type UseFileUploadReturn, type UseMessageQueueOptions, type UseMessageQueueReturn, type UseStopExecutionOptions, type UseStopExecutionReturn, UserMessage, type UserMessageProps, useDisplayConfig, useDisplayMode, useFileUpload, useMessageQueue, useStopExecution, useTheme };
|
|
843
|
+
export { ActionIcon, type ActionIconProps, ActionType, AssistantMessage, type AssistantMessageProps, type FileAttachment as ChatFileAttachment, CodeBlock, type CodeBlockProps, CompactToolStatusLine, type CompactToolStatusLineProps, type DisplayModeContextType, DisplayModeProvider, type DisplayModeProviderProps, DisplayModeToggle, type DisplayModeToggleProps, EnvVarsPanel, type EnvVarsPanelProps, ErrorMessage, type ErrorMessageProps, JsonDisplay, type JsonDisplayProps, LoadingIndicator, type LoadingIndicatorProps, LogEntry, LogsPanel, type LogsPanelProps, MessageEntry, type MessageEntryProps, MessageList, type MessageListProps, NormalizedEntry, NormalizedToolCall, OptionCards, type OptionCardsProps, ParsedOption, type QueuedMessage, StatusIndicator, type StatusIndicatorProps, StreamingText, type StreamingTextProps, type Theme, type ThemeContextType, ThemeProvider, type ThemeProviderProps, ThinkingMessage, type ThinkingMessageProps, TodoItem, TodoPanel, type TodoPanelProps, ToolCallCard, type ToolCallCardProps, ToolCallMessage, type ToolCallMessageProps, ToolDisplayConfig, ToolDisplayMode, ToolExecutionGroup, type ToolExecutionGroupProps, ToolStatus, TypewriterText, type TypewriterTextProps, type UseFileUploadOptions, type UseFileUploadReturn, type UseMessageQueueOptions, type UseMessageQueueReturn, type UseStopExecutionOptions, type UseStopExecutionReturn, UserMessage, type UserMessageProps, useDisplayConfig, useDisplayMode, useFileUpload, useMessageQueue, useStopExecution, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -336,6 +336,83 @@ interface TodoPanelProps {
|
|
|
336
336
|
*/
|
|
337
337
|
declare function TodoPanel({ todos, title, compact, showProgress, className, }: TodoPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
338
338
|
|
|
339
|
+
interface EnvVarsPanelProps {
|
|
340
|
+
/** Current environment variables */
|
|
341
|
+
envVars: Record<string, string>;
|
|
342
|
+
/** Callback when environment variables change */
|
|
343
|
+
onChange: (envVars: Record<string, string>) => void;
|
|
344
|
+
/** Whether the panel is collapsed initially (default: true) */
|
|
345
|
+
defaultCollapsed?: boolean;
|
|
346
|
+
/** Additional class name */
|
|
347
|
+
className?: string;
|
|
348
|
+
/** Label for the panel header */
|
|
349
|
+
label?: string;
|
|
350
|
+
/** Helper text shown below the input */
|
|
351
|
+
helperText?: string;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* EnvVarsPanel - Collapsible panel for managing environment variables
|
|
355
|
+
*
|
|
356
|
+
* Provides a UI for adding, viewing, and removing environment variables.
|
|
357
|
+
* Commonly used to set environment variables for sandbox/agent execution.
|
|
358
|
+
*
|
|
359
|
+
* @example
|
|
360
|
+
* ```tsx
|
|
361
|
+
* function ChatSettings() {
|
|
362
|
+
* const [envVars, setEnvVars] = useState<Record<string, string>>({});
|
|
363
|
+
*
|
|
364
|
+
* return (
|
|
365
|
+
* <EnvVarsPanel
|
|
366
|
+
* envVars={envVars}
|
|
367
|
+
* onChange={setEnvVars}
|
|
368
|
+
* helperText="These variables will be available in the sandbox."
|
|
369
|
+
* />
|
|
370
|
+
* );
|
|
371
|
+
* }
|
|
372
|
+
* ```
|
|
373
|
+
*/
|
|
374
|
+
declare function EnvVarsPanel({ envVars, onChange, defaultCollapsed, className, label, helperText, }: EnvVarsPanelProps): react_jsx_runtime.JSX.Element;
|
|
375
|
+
|
|
376
|
+
interface DisplayModeToggleProps {
|
|
377
|
+
/** Additional class name */
|
|
378
|
+
className?: string;
|
|
379
|
+
/** Show label text (default: true) */
|
|
380
|
+
showLabel?: boolean;
|
|
381
|
+
/** Custom labels for modes */
|
|
382
|
+
labels?: {
|
|
383
|
+
inline?: string;
|
|
384
|
+
compact?: string;
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* DisplayModeToggle - Button to toggle between inline and compact display modes
|
|
389
|
+
*
|
|
390
|
+
* Uses the DisplayModeContext to toggle between 'inline' and 'compact' modes.
|
|
391
|
+
* Must be used within a DisplayModeProvider.
|
|
392
|
+
*
|
|
393
|
+
* @example
|
|
394
|
+
* ```tsx
|
|
395
|
+
* function ChatHeader() {
|
|
396
|
+
* return (
|
|
397
|
+
* <header>
|
|
398
|
+
* <h1>Chat</h1>
|
|
399
|
+
* <DisplayModeToggle />
|
|
400
|
+
* </header>
|
|
401
|
+
* );
|
|
402
|
+
* }
|
|
403
|
+
*
|
|
404
|
+
* function App() {
|
|
405
|
+
* return (
|
|
406
|
+
* <DisplayModeProvider>
|
|
407
|
+
* <ChatHeader />
|
|
408
|
+
* <MessageList entries={entries} />
|
|
409
|
+
* </DisplayModeProvider>
|
|
410
|
+
* );
|
|
411
|
+
* }
|
|
412
|
+
* ```
|
|
413
|
+
*/
|
|
414
|
+
declare function DisplayModeToggle({ className, showLabel, labels, }: DisplayModeToggleProps): react_jsx_runtime.JSX.Element;
|
|
415
|
+
|
|
339
416
|
interface StatusIndicatorProps {
|
|
340
417
|
status: ToolStatus;
|
|
341
418
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -763,4 +840,4 @@ interface UseFileUploadReturn {
|
|
|
763
840
|
declare function useFileUpload({ maxFileSize, // 100MB
|
|
764
841
|
maxFiles, onValidationError, }?: UseFileUploadOptions): UseFileUploadReturn;
|
|
765
842
|
|
|
766
|
-
export { ActionIcon, type ActionIconProps, ActionType, AssistantMessage, type AssistantMessageProps, type FileAttachment as ChatFileAttachment, CodeBlock, type CodeBlockProps, CompactToolStatusLine, type CompactToolStatusLineProps, type DisplayModeContextType, DisplayModeProvider, type DisplayModeProviderProps, ErrorMessage, type ErrorMessageProps, JsonDisplay, type JsonDisplayProps, LoadingIndicator, type LoadingIndicatorProps, LogEntry, LogsPanel, type LogsPanelProps, MessageEntry, type MessageEntryProps, MessageList, type MessageListProps, NormalizedEntry, NormalizedToolCall, OptionCards, type OptionCardsProps, ParsedOption, type QueuedMessage, StatusIndicator, type StatusIndicatorProps, StreamingText, type StreamingTextProps, type Theme, type ThemeContextType, ThemeProvider, type ThemeProviderProps, ThinkingMessage, type ThinkingMessageProps, TodoItem, TodoPanel, type TodoPanelProps, ToolCallCard, type ToolCallCardProps, ToolCallMessage, type ToolCallMessageProps, ToolDisplayConfig, ToolDisplayMode, ToolExecutionGroup, type ToolExecutionGroupProps, ToolStatus, TypewriterText, type TypewriterTextProps, type UseFileUploadOptions, type UseFileUploadReturn, type UseMessageQueueOptions, type UseMessageQueueReturn, type UseStopExecutionOptions, type UseStopExecutionReturn, UserMessage, type UserMessageProps, useDisplayConfig, useDisplayMode, useFileUpload, useMessageQueue, useStopExecution, useTheme };
|
|
843
|
+
export { ActionIcon, type ActionIconProps, ActionType, AssistantMessage, type AssistantMessageProps, type FileAttachment as ChatFileAttachment, CodeBlock, type CodeBlockProps, CompactToolStatusLine, type CompactToolStatusLineProps, type DisplayModeContextType, DisplayModeProvider, type DisplayModeProviderProps, DisplayModeToggle, type DisplayModeToggleProps, EnvVarsPanel, type EnvVarsPanelProps, ErrorMessage, type ErrorMessageProps, JsonDisplay, type JsonDisplayProps, LoadingIndicator, type LoadingIndicatorProps, LogEntry, LogsPanel, type LogsPanelProps, MessageEntry, type MessageEntryProps, MessageList, type MessageListProps, NormalizedEntry, NormalizedToolCall, OptionCards, type OptionCardsProps, ParsedOption, type QueuedMessage, StatusIndicator, type StatusIndicatorProps, StreamingText, type StreamingTextProps, type Theme, type ThemeContextType, ThemeProvider, type ThemeProviderProps, ThinkingMessage, type ThinkingMessageProps, TodoItem, TodoPanel, type TodoPanelProps, ToolCallCard, type ToolCallCardProps, ToolCallMessage, type ToolCallMessageProps, ToolDisplayConfig, ToolDisplayMode, ToolExecutionGroup, type ToolExecutionGroupProps, ToolStatus, TypewriterText, type TypewriterTextProps, type UseFileUploadOptions, type UseFileUploadReturn, type UseMessageQueueOptions, type UseMessageQueueReturn, type UseStopExecutionOptions, type UseStopExecutionReturn, UserMessage, type UserMessageProps, useDisplayConfig, useDisplayMode, useFileUpload, useMessageQueue, useStopExecution, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -1924,6 +1924,203 @@ function TodoPanel({
|
|
|
1924
1924
|
}
|
|
1925
1925
|
);
|
|
1926
1926
|
}
|
|
1927
|
+
function EnvVarsPanel({
|
|
1928
|
+
envVars,
|
|
1929
|
+
onChange,
|
|
1930
|
+
defaultCollapsed = true,
|
|
1931
|
+
className,
|
|
1932
|
+
label = "Environment Variables",
|
|
1933
|
+
helperText = "These environment variables will be available in the sandbox for new sessions."
|
|
1934
|
+
}) {
|
|
1935
|
+
const [expanded, setExpanded] = useState(!defaultCollapsed);
|
|
1936
|
+
const [newEnvKey, setNewEnvKey] = useState("");
|
|
1937
|
+
const [newEnvValue, setNewEnvValue] = useState("");
|
|
1938
|
+
const hasEnvVars = Object.keys(envVars).length > 0;
|
|
1939
|
+
const handleAddEnvVar = useCallback(() => {
|
|
1940
|
+
const key = newEnvKey.trim();
|
|
1941
|
+
const val = newEnvValue.trim();
|
|
1942
|
+
if (key) {
|
|
1943
|
+
onChange({ ...envVars, [key]: val });
|
|
1944
|
+
setNewEnvKey("");
|
|
1945
|
+
setNewEnvValue("");
|
|
1946
|
+
}
|
|
1947
|
+
}, [envVars, newEnvKey, newEnvValue, onChange]);
|
|
1948
|
+
const handleRemoveEnvVar = useCallback(
|
|
1949
|
+
(key) => {
|
|
1950
|
+
const newEnvVars = { ...envVars };
|
|
1951
|
+
delete newEnvVars[key];
|
|
1952
|
+
onChange(newEnvVars);
|
|
1953
|
+
},
|
|
1954
|
+
[envVars, onChange]
|
|
1955
|
+
);
|
|
1956
|
+
const handleEnvKeyDown = useCallback(
|
|
1957
|
+
(e) => {
|
|
1958
|
+
if (e.key === "Enter") {
|
|
1959
|
+
e.preventDefault();
|
|
1960
|
+
handleAddEnvVar();
|
|
1961
|
+
}
|
|
1962
|
+
},
|
|
1963
|
+
[handleAddEnvVar]
|
|
1964
|
+
);
|
|
1965
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("ash-env-vars-panel", className), children: [
|
|
1966
|
+
/* @__PURE__ */ jsxs(
|
|
1967
|
+
"button",
|
|
1968
|
+
{
|
|
1969
|
+
type: "button",
|
|
1970
|
+
onClick: () => setExpanded(!expanded),
|
|
1971
|
+
className: "ash-env-vars-header",
|
|
1972
|
+
children: [
|
|
1973
|
+
/* @__PURE__ */ jsx(
|
|
1974
|
+
"svg",
|
|
1975
|
+
{
|
|
1976
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1977
|
+
className: cn("ash-env-vars-chevron", expanded && "ash-env-vars-chevron-expanded"),
|
|
1978
|
+
viewBox: "0 0 20 20",
|
|
1979
|
+
fill: "currentColor",
|
|
1980
|
+
children: /* @__PURE__ */ jsx(
|
|
1981
|
+
"path",
|
|
1982
|
+
{
|
|
1983
|
+
fillRule: "evenodd",
|
|
1984
|
+
d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",
|
|
1985
|
+
clipRule: "evenodd"
|
|
1986
|
+
}
|
|
1987
|
+
)
|
|
1988
|
+
}
|
|
1989
|
+
),
|
|
1990
|
+
/* @__PURE__ */ jsx("span", { className: "ash-env-vars-label", children: label }),
|
|
1991
|
+
hasEnvVars && !expanded && /* @__PURE__ */ jsx("span", { className: "ash-env-vars-badge", children: Object.keys(envVars).length })
|
|
1992
|
+
]
|
|
1993
|
+
}
|
|
1994
|
+
),
|
|
1995
|
+
expanded && /* @__PURE__ */ jsxs("div", { className: "ash-env-vars-content", children: [
|
|
1996
|
+
Object.entries(envVars).map(([key, val]) => /* @__PURE__ */ jsxs("div", { className: "ash-env-vars-item", children: [
|
|
1997
|
+
/* @__PURE__ */ jsx("span", { className: "ash-env-vars-key", children: key }),
|
|
1998
|
+
/* @__PURE__ */ jsx("span", { className: "ash-env-vars-equals", children: "=" }),
|
|
1999
|
+
/* @__PURE__ */ jsx("span", { className: "ash-env-vars-value", children: val || "(empty)" }),
|
|
2000
|
+
/* @__PURE__ */ jsx(
|
|
2001
|
+
"button",
|
|
2002
|
+
{
|
|
2003
|
+
type: "button",
|
|
2004
|
+
onClick: () => handleRemoveEnvVar(key),
|
|
2005
|
+
className: "ash-env-vars-remove",
|
|
2006
|
+
title: "Remove variable",
|
|
2007
|
+
children: /* @__PURE__ */ jsx(
|
|
2008
|
+
"svg",
|
|
2009
|
+
{
|
|
2010
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2011
|
+
className: "w-4 h-4",
|
|
2012
|
+
viewBox: "0 0 20 20",
|
|
2013
|
+
fill: "currentColor",
|
|
2014
|
+
children: /* @__PURE__ */ jsx(
|
|
2015
|
+
"path",
|
|
2016
|
+
{
|
|
2017
|
+
fillRule: "evenodd",
|
|
2018
|
+
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
2019
|
+
clipRule: "evenodd"
|
|
2020
|
+
}
|
|
2021
|
+
)
|
|
2022
|
+
}
|
|
2023
|
+
)
|
|
2024
|
+
}
|
|
2025
|
+
)
|
|
2026
|
+
] }, key)),
|
|
2027
|
+
/* @__PURE__ */ jsxs("div", { className: "ash-env-vars-add", children: [
|
|
2028
|
+
/* @__PURE__ */ jsx(
|
|
2029
|
+
"input",
|
|
2030
|
+
{
|
|
2031
|
+
type: "text",
|
|
2032
|
+
value: newEnvKey,
|
|
2033
|
+
onChange: (e) => setNewEnvKey(e.target.value.toUpperCase().replace(/[^A-Z0-9_]/g, "")),
|
|
2034
|
+
onKeyDown: handleEnvKeyDown,
|
|
2035
|
+
placeholder: "KEY",
|
|
2036
|
+
className: "ash-env-vars-input ash-env-vars-input-key"
|
|
2037
|
+
}
|
|
2038
|
+
),
|
|
2039
|
+
/* @__PURE__ */ jsx("span", { className: "ash-env-vars-equals", children: "=" }),
|
|
2040
|
+
/* @__PURE__ */ jsx(
|
|
2041
|
+
"input",
|
|
2042
|
+
{
|
|
2043
|
+
type: "text",
|
|
2044
|
+
value: newEnvValue,
|
|
2045
|
+
onChange: (e) => setNewEnvValue(e.target.value),
|
|
2046
|
+
onKeyDown: handleEnvKeyDown,
|
|
2047
|
+
placeholder: "value",
|
|
2048
|
+
className: "ash-env-vars-input ash-env-vars-input-value"
|
|
2049
|
+
}
|
|
2050
|
+
),
|
|
2051
|
+
/* @__PURE__ */ jsx(
|
|
2052
|
+
"button",
|
|
2053
|
+
{
|
|
2054
|
+
type: "button",
|
|
2055
|
+
onClick: handleAddEnvVar,
|
|
2056
|
+
disabled: !newEnvKey.trim(),
|
|
2057
|
+
className: "ash-env-vars-add-button",
|
|
2058
|
+
children: "Add"
|
|
2059
|
+
}
|
|
2060
|
+
)
|
|
2061
|
+
] }),
|
|
2062
|
+
helperText && /* @__PURE__ */ jsx("p", { className: "ash-env-vars-helper", children: helperText })
|
|
2063
|
+
] })
|
|
2064
|
+
] });
|
|
2065
|
+
}
|
|
2066
|
+
function DisplayModeToggle({
|
|
2067
|
+
className,
|
|
2068
|
+
showLabel = true,
|
|
2069
|
+
labels = { inline: "Inline", compact: "Compact" }
|
|
2070
|
+
}) {
|
|
2071
|
+
const { config, toggleMode } = useDisplayMode();
|
|
2072
|
+
const isInline = config.mode === "inline";
|
|
2073
|
+
return /* @__PURE__ */ jsx(
|
|
2074
|
+
"button",
|
|
2075
|
+
{
|
|
2076
|
+
type: "button",
|
|
2077
|
+
onClick: toggleMode,
|
|
2078
|
+
className: cn("ash-display-mode-toggle", className),
|
|
2079
|
+
title: isInline ? "Switch to compact mode" : "Switch to inline mode",
|
|
2080
|
+
children: isInline ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2081
|
+
/* @__PURE__ */ jsx(
|
|
2082
|
+
"svg",
|
|
2083
|
+
{
|
|
2084
|
+
className: "ash-display-mode-icon",
|
|
2085
|
+
viewBox: "0 0 24 24",
|
|
2086
|
+
fill: "none",
|
|
2087
|
+
stroke: "currentColor",
|
|
2088
|
+
strokeWidth: "1.5",
|
|
2089
|
+
children: /* @__PURE__ */ jsx(
|
|
2090
|
+
"path",
|
|
2091
|
+
{
|
|
2092
|
+
strokeLinecap: "round",
|
|
2093
|
+
strokeLinejoin: "round",
|
|
2094
|
+
d: "M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"
|
|
2095
|
+
}
|
|
2096
|
+
)
|
|
2097
|
+
}
|
|
2098
|
+
),
|
|
2099
|
+
showLabel && /* @__PURE__ */ jsx("span", { className: "ash-display-mode-label", children: labels.inline })
|
|
2100
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2101
|
+
/* @__PURE__ */ jsx(
|
|
2102
|
+
"svg",
|
|
2103
|
+
{
|
|
2104
|
+
className: "ash-display-mode-icon",
|
|
2105
|
+
viewBox: "0 0 24 24",
|
|
2106
|
+
fill: "none",
|
|
2107
|
+
stroke: "currentColor",
|
|
2108
|
+
strokeWidth: "1.5",
|
|
2109
|
+
children: /* @__PURE__ */ jsx(
|
|
2110
|
+
"path",
|
|
2111
|
+
{
|
|
2112
|
+
strokeLinecap: "round",
|
|
2113
|
+
strokeLinejoin: "round",
|
|
2114
|
+
d: "M3.75 6.75h16.5M3.75 12h16.5M12 17.25h8.25"
|
|
2115
|
+
}
|
|
2116
|
+
)
|
|
2117
|
+
}
|
|
2118
|
+
),
|
|
2119
|
+
showLabel && /* @__PURE__ */ jsx("span", { className: "ash-display-mode-label", children: labels.compact })
|
|
2120
|
+
] })
|
|
2121
|
+
}
|
|
2122
|
+
);
|
|
2123
|
+
}
|
|
1927
2124
|
var DEFAULT_WORDS = [
|
|
1928
2125
|
"Thinking",
|
|
1929
2126
|
"Reasoning",
|
|
@@ -2532,6 +2729,6 @@ function useFileUpload({
|
|
|
2532
2729
|
};
|
|
2533
2730
|
}
|
|
2534
2731
|
|
|
2535
|
-
export { ActionIcon, AlertCircleIcon, AlertTriangleIcon, AssistantMessage, BotIcon, BrainIcon, BugIcon, CheckCircleIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleIcon, ClipboardListIcon, CodeBlock, CodeIcon, CompactToolStatusLine, CopyIcon, DEFAULT_DISPLAY_CONFIG, DisplayModeProvider, EditIcon, ErrorMessage, FileIcon, FilePlusIcon, FolderSearchIcon, GlobeIcon, InfoIcon, JsonDisplay, ListChecksIcon, LoaderIcon, LoadingIndicator, LogsPanel, MessageEntry, MessageList, MessageSquareIcon, MoonIcon, OptionCards, PaperclipIcon, PlugIcon, SearchIcon, SendIcon, SparklesIcon, StatusIndicator, StopCircleIcon, StreamingText, SunIcon, TerminalIcon, ThemeProvider, ThinkingMessage, TodoPanel, ToolCallCard, ToolCallMessage, ToolExecutionGroup, ToolIcon, TypewriterText, UserIcon, UserMessage, XCircleIcon, XIcon, allKeyframesCss, borderRadius, cn, colors, createToolCall, extractTextContent, extractToolCallsFromGroup, formatFileSize, formatTimestamp, formatToolName, generateToolSummary, getActionIcon, getActionLabel, groupEntriesForCompactMode, inlineStyles, isCommandRunAction, isErrorEntry, isFileEditAction, isFileReadAction, isFileWriteAction, isGenericToolAction, isGlobAction, isMcpToolAction, isSearchAction, isTodoWriteAction, isToolCallEntry, isWebFetchAction, isWebSearchAction, keyframes, keyframesCss, mapToolToActionType, normalizeToolResult, parseCommandResult, parseMcpToolName, parseOptionsFromContent, shadows, spacing, tokensToCssVariables, transitions, truncate, typography, updateToolCallWithResult, useDisplayConfig, useDisplayMode, useFileUpload, useMessageQueue, useStopExecution, useTheme, widget, zIndex };
|
|
2732
|
+
export { ActionIcon, AlertCircleIcon, AlertTriangleIcon, AssistantMessage, BotIcon, BrainIcon, BugIcon, CheckCircleIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleIcon, ClipboardListIcon, CodeBlock, CodeIcon, CompactToolStatusLine, CopyIcon, DEFAULT_DISPLAY_CONFIG, DisplayModeProvider, DisplayModeToggle, EditIcon, EnvVarsPanel, ErrorMessage, FileIcon, FilePlusIcon, FolderSearchIcon, GlobeIcon, InfoIcon, JsonDisplay, ListChecksIcon, LoaderIcon, LoadingIndicator, LogsPanel, MessageEntry, MessageList, MessageSquareIcon, MoonIcon, OptionCards, PaperclipIcon, PlugIcon, SearchIcon, SendIcon, SparklesIcon, StatusIndicator, StopCircleIcon, StreamingText, SunIcon, TerminalIcon, ThemeProvider, ThinkingMessage, TodoPanel, ToolCallCard, ToolCallMessage, ToolExecutionGroup, ToolIcon, TypewriterText, UserIcon, UserMessage, XCircleIcon, XIcon, allKeyframesCss, borderRadius, cn, colors, createToolCall, extractTextContent, extractToolCallsFromGroup, formatFileSize, formatTimestamp, formatToolName, generateToolSummary, getActionIcon, getActionLabel, groupEntriesForCompactMode, inlineStyles, isCommandRunAction, isErrorEntry, isFileEditAction, isFileReadAction, isFileWriteAction, isGenericToolAction, isGlobAction, isMcpToolAction, isSearchAction, isTodoWriteAction, isToolCallEntry, isWebFetchAction, isWebSearchAction, keyframes, keyframesCss, mapToolToActionType, normalizeToolResult, parseCommandResult, parseMcpToolName, parseOptionsFromContent, shadows, spacing, tokensToCssVariables, transitions, truncate, typography, updateToolCallWithResult, useDisplayConfig, useDisplayMode, useFileUpload, useMessageQueue, useStopExecution, useTheme, widget, zIndex };
|
|
2536
2733
|
//# sourceMappingURL=index.js.map
|
|
2537
2734
|
//# sourceMappingURL=index.js.map
|