@gendive/chatllm 0.17.19 → 0.17.21
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/react/index.d.mts +17 -1
- package/dist/react/index.d.ts +17 -1
- package/dist/react/index.js +605 -499
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +605 -499
- package/dist/react/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -483,7 +483,7 @@ var parseExtractionResult = (text) => {
|
|
|
483
483
|
function useInfoExtraction(options) {
|
|
484
484
|
const [isExtracting, setIsExtracting] = (0, import_react2.useState)(false);
|
|
485
485
|
const [lastExtraction, setLastExtraction] = (0, import_react2.useState)(null);
|
|
486
|
-
const { apiEndpoint, model, minConfidence = 0.8, globalMemory } = options;
|
|
486
|
+
const { apiEndpoint, model, minConfidence = 0.8, globalMemory, onCallLLM } = options;
|
|
487
487
|
const extractInfo = (0, import_react2.useCallback)(
|
|
488
488
|
async (messages) => {
|
|
489
489
|
if (messages.length === 0) {
|
|
@@ -492,41 +492,44 @@ function useInfoExtraction(options) {
|
|
|
492
492
|
setIsExtracting(true);
|
|
493
493
|
try {
|
|
494
494
|
const prompt = buildExtractionPrompt(messages);
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
const
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
495
|
+
let fullResponse;
|
|
496
|
+
if (onCallLLM) {
|
|
497
|
+
fullResponse = await onCallLLM(prompt, model || "default");
|
|
498
|
+
} else {
|
|
499
|
+
const response = await fetch(apiEndpoint, {
|
|
500
|
+
method: "POST",
|
|
501
|
+
headers: { "Content-Type": "application/json" },
|
|
502
|
+
body: JSON.stringify({
|
|
503
|
+
messages: [{ role: "user", content: prompt }],
|
|
504
|
+
model: model || "default"
|
|
505
|
+
})
|
|
506
|
+
});
|
|
507
|
+
if (!response.ok) {
|
|
508
|
+
throw new Error(`API error: ${response.status}`);
|
|
509
|
+
}
|
|
510
|
+
const reader = response.body?.getReader();
|
|
511
|
+
if (!reader) {
|
|
512
|
+
return [];
|
|
513
|
+
}
|
|
514
|
+
const decoder = new TextDecoder();
|
|
515
|
+
let buffer = "";
|
|
516
|
+
fullResponse = "";
|
|
517
|
+
while (true) {
|
|
518
|
+
const { done, value } = await reader.read();
|
|
519
|
+
if (done) break;
|
|
520
|
+
buffer += decoder.decode(value, { stream: true });
|
|
521
|
+
const lines = buffer.split("\n");
|
|
522
|
+
buffer = lines.pop() || "";
|
|
523
|
+
for (const line of lines) {
|
|
524
|
+
if (line.startsWith("data: ")) {
|
|
525
|
+
const data = line.slice(6);
|
|
526
|
+
if (data === "[DONE]") continue;
|
|
527
|
+
try {
|
|
528
|
+
const parsed = JSON.parse(data);
|
|
526
529
|
const chunk = parsed.content ?? parsed.text ?? "";
|
|
527
530
|
if (chunk) fullResponse += chunk;
|
|
531
|
+
} catch {
|
|
528
532
|
}
|
|
529
|
-
} catch {
|
|
530
533
|
}
|
|
531
534
|
}
|
|
532
535
|
}
|
|
@@ -553,7 +556,7 @@ function useInfoExtraction(options) {
|
|
|
553
556
|
setIsExtracting(false);
|
|
554
557
|
}
|
|
555
558
|
},
|
|
556
|
-
[apiEndpoint, model, minConfidence, globalMemory]
|
|
559
|
+
[apiEndpoint, model, minConfidence, globalMemory, onCallLLM]
|
|
557
560
|
);
|
|
558
561
|
return {
|
|
559
562
|
extractInfo,
|
|
@@ -1609,6 +1612,33 @@ var removeSessionCache = (storageKey, sessionId) => {
|
|
|
1609
1612
|
};
|
|
1610
1613
|
|
|
1611
1614
|
// src/react/hooks/useChatUI.ts
|
|
1615
|
+
var parseSSEResponse = async (response) => {
|
|
1616
|
+
const reader = response.body?.getReader();
|
|
1617
|
+
if (!reader) return "";
|
|
1618
|
+
const decoder = new TextDecoder();
|
|
1619
|
+
let buffer = "";
|
|
1620
|
+
let result = "";
|
|
1621
|
+
while (true) {
|
|
1622
|
+
const { done, value } = await reader.read();
|
|
1623
|
+
if (done) break;
|
|
1624
|
+
buffer += decoder.decode(value, { stream: true });
|
|
1625
|
+
const lines = buffer.split("\n");
|
|
1626
|
+
buffer = lines.pop() || "";
|
|
1627
|
+
for (const line of lines) {
|
|
1628
|
+
if (line.startsWith("data: ")) {
|
|
1629
|
+
const data = line.slice(6);
|
|
1630
|
+
if (data === "[DONE]") continue;
|
|
1631
|
+
try {
|
|
1632
|
+
const parsed = JSON.parse(data);
|
|
1633
|
+
const chunk = parsed.content ?? parsed.text ?? "";
|
|
1634
|
+
if (chunk) result += chunk;
|
|
1635
|
+
} catch {
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
return result;
|
|
1641
|
+
};
|
|
1612
1642
|
var DEFAULT_STORAGE_KEY = "chatllm_sessions";
|
|
1613
1643
|
var DEFAULT_COMPRESSION_THRESHOLD = 20;
|
|
1614
1644
|
var DEFAULT_KEEP_RECENT = 6;
|
|
@@ -1814,11 +1844,37 @@ var useChatUI = (options) => {
|
|
|
1814
1844
|
);
|
|
1815
1845
|
const projectMemoryRaw = useGlobalMemory(projectMemoryOptions);
|
|
1816
1846
|
const projectMemory = enableProjects ? projectMemoryRaw : null;
|
|
1847
|
+
const callInternalLLM = (0, import_react5.useCallback)(async (prompt, model) => {
|
|
1848
|
+
if (onSendMessageRef.current) {
|
|
1849
|
+
const modelConfig = models.find((m) => m.id === model);
|
|
1850
|
+
const provider = modelConfig?.provider || "ollama";
|
|
1851
|
+
const result = await onSendMessageRef.current({
|
|
1852
|
+
messages: [{ role: "user", content: prompt }],
|
|
1853
|
+
model,
|
|
1854
|
+
provider,
|
|
1855
|
+
apiKey
|
|
1856
|
+
});
|
|
1857
|
+
if (typeof result === "string") return result;
|
|
1858
|
+
if (typeof result === "object" && "content" in result) return result.content;
|
|
1859
|
+
return parseSSEResponse(new Response(result));
|
|
1860
|
+
}
|
|
1861
|
+
const response = await fetch(apiEndpoint, {
|
|
1862
|
+
method: "POST",
|
|
1863
|
+
headers: { "Content-Type": "application/json" },
|
|
1864
|
+
body: JSON.stringify({
|
|
1865
|
+
messages: [{ role: "user", content: prompt }],
|
|
1866
|
+
model
|
|
1867
|
+
})
|
|
1868
|
+
});
|
|
1869
|
+
if (!response.ok) return "";
|
|
1870
|
+
return parseSSEResponse(response);
|
|
1871
|
+
}, [apiEndpoint, apiKey, models]);
|
|
1817
1872
|
const infoExtraction = useInfoExtraction({
|
|
1818
1873
|
apiEndpoint,
|
|
1819
1874
|
model: selectedModel,
|
|
1820
1875
|
minConfidence: 0.8,
|
|
1821
|
-
globalMemory
|
|
1876
|
+
globalMemory,
|
|
1877
|
+
onCallLLM: callInternalLLM
|
|
1822
1878
|
});
|
|
1823
1879
|
const currentSession = sessions.find((s) => s.id === currentSessionId) || null;
|
|
1824
1880
|
const messages = currentSession?.messages.filter((m) => !m.hidden) || [];
|
|
@@ -2016,46 +2072,11 @@ ${conversationText}
|
|
|
2016
2072
|
|
|
2017
2073
|
\uC694\uC57D:`;
|
|
2018
2074
|
try {
|
|
2019
|
-
|
|
2020
|
-
method: "POST",
|
|
2021
|
-
headers: { "Content-Type": "application/json" },
|
|
2022
|
-
body: JSON.stringify({
|
|
2023
|
-
messages: [{ role: "user", content: summaryPrompt }],
|
|
2024
|
-
model
|
|
2025
|
-
})
|
|
2026
|
-
});
|
|
2027
|
-
if (!response.ok) return "";
|
|
2028
|
-
const reader = response.body?.getReader();
|
|
2029
|
-
if (!reader) return "";
|
|
2030
|
-
const decoder = new TextDecoder();
|
|
2031
|
-
let buffer = "";
|
|
2032
|
-
let summary = "";
|
|
2033
|
-
while (true) {
|
|
2034
|
-
const { done, value } = await reader.read();
|
|
2035
|
-
if (done) break;
|
|
2036
|
-
buffer += decoder.decode(value, { stream: true });
|
|
2037
|
-
const lines = buffer.split("\n");
|
|
2038
|
-
buffer = lines.pop() || "";
|
|
2039
|
-
for (const line of lines) {
|
|
2040
|
-
if (line.startsWith("data: ")) {
|
|
2041
|
-
const data = line.slice(6);
|
|
2042
|
-
if (data === "[DONE]") continue;
|
|
2043
|
-
try {
|
|
2044
|
-
const parsed = JSON.parse(data);
|
|
2045
|
-
{
|
|
2046
|
-
const chunk = parsed.content ?? parsed.text ?? "";
|
|
2047
|
-
if (chunk) summary += chunk;
|
|
2048
|
-
}
|
|
2049
|
-
} catch {
|
|
2050
|
-
}
|
|
2051
|
-
}
|
|
2052
|
-
}
|
|
2053
|
-
}
|
|
2054
|
-
return summary;
|
|
2075
|
+
return await callInternalLLM(summaryPrompt, model);
|
|
2055
2076
|
} catch {
|
|
2056
2077
|
return "";
|
|
2057
2078
|
}
|
|
2058
|
-
}, [
|
|
2079
|
+
}, [callInternalLLM]);
|
|
2059
2080
|
const incrementalCompressContext = (0, import_react5.useCallback)(
|
|
2060
2081
|
async (existingSummary, newMessages, model) => {
|
|
2061
2082
|
const newConversation = newMessages.map((m) => `${m.role === "user" ? "\uC0AC\uC6A9\uC790" : "AI"}: ${m.content}`).join("\n\n");
|
|
@@ -2075,47 +2096,13 @@ ${newConversation}
|
|
|
2075
2096
|
|
|
2076
2097
|
\uD1B5\uD569 \uC694\uC57D:`;
|
|
2077
2098
|
try {
|
|
2078
|
-
const
|
|
2079
|
-
method: "POST",
|
|
2080
|
-
headers: { "Content-Type": "application/json" },
|
|
2081
|
-
body: JSON.stringify({
|
|
2082
|
-
messages: [{ role: "user", content: mergePrompt }],
|
|
2083
|
-
model
|
|
2084
|
-
})
|
|
2085
|
-
});
|
|
2086
|
-
if (!response.ok) return existingSummary;
|
|
2087
|
-
const reader = response.body?.getReader();
|
|
2088
|
-
if (!reader) return existingSummary;
|
|
2089
|
-
const decoder = new TextDecoder();
|
|
2090
|
-
let buffer = "";
|
|
2091
|
-
let summary = "";
|
|
2092
|
-
while (true) {
|
|
2093
|
-
const { done, value } = await reader.read();
|
|
2094
|
-
if (done) break;
|
|
2095
|
-
buffer += decoder.decode(value, { stream: true });
|
|
2096
|
-
const lines = buffer.split("\n");
|
|
2097
|
-
buffer = lines.pop() || "";
|
|
2098
|
-
for (const line of lines) {
|
|
2099
|
-
if (line.startsWith("data: ")) {
|
|
2100
|
-
const data = line.slice(6);
|
|
2101
|
-
if (data === "[DONE]") continue;
|
|
2102
|
-
try {
|
|
2103
|
-
const parsed = JSON.parse(data);
|
|
2104
|
-
{
|
|
2105
|
-
const chunk = parsed.content ?? parsed.text ?? "";
|
|
2106
|
-
if (chunk) summary += chunk;
|
|
2107
|
-
}
|
|
2108
|
-
} catch {
|
|
2109
|
-
}
|
|
2110
|
-
}
|
|
2111
|
-
}
|
|
2112
|
-
}
|
|
2099
|
+
const summary = await callInternalLLM(mergePrompt, model);
|
|
2113
2100
|
return summary || existingSummary;
|
|
2114
2101
|
} catch {
|
|
2115
2102
|
return existingSummary;
|
|
2116
2103
|
}
|
|
2117
2104
|
},
|
|
2118
|
-
[
|
|
2105
|
+
[callInternalLLM]
|
|
2119
2106
|
);
|
|
2120
2107
|
const estimateTokens = (0, import_react5.useCallback)((messages2) => {
|
|
2121
2108
|
return messages2.reduce((sum, m) => sum + Math.ceil(m.content.length / 4), 0);
|
|
@@ -4717,7 +4704,8 @@ var ChatInput = ({
|
|
|
4717
4704
|
onFileAttach,
|
|
4718
4705
|
onRemoveAttachment,
|
|
4719
4706
|
acceptedFileTypes,
|
|
4720
|
-
onDisclaimerClick
|
|
4707
|
+
onDisclaimerClick,
|
|
4708
|
+
inline = false
|
|
4721
4709
|
}) => {
|
|
4722
4710
|
const [mainMenuOpen, setMainMenuOpen] = import_react9.default.useState(false);
|
|
4723
4711
|
const textareaRef = (0, import_react9.useRef)(null);
|
|
@@ -4806,17 +4794,17 @@ var ChatInput = ({
|
|
|
4806
4794
|
{
|
|
4807
4795
|
className: "chatllm-input-footer",
|
|
4808
4796
|
style: {
|
|
4809
|
-
position: "absolute",
|
|
4810
|
-
bottom: 0,
|
|
4811
|
-
left: 0,
|
|
4812
|
-
right: 0,
|
|
4797
|
+
position: inline ? "relative" : "absolute",
|
|
4798
|
+
bottom: inline ? void 0 : 0,
|
|
4799
|
+
left: inline ? void 0 : 0,
|
|
4800
|
+
right: inline ? void 0 : 0,
|
|
4813
4801
|
display: "flex",
|
|
4814
4802
|
flexDirection: "column",
|
|
4815
4803
|
alignItems: "center",
|
|
4816
|
-
paddingBottom: "16px",
|
|
4817
|
-
paddingTop: "64px",
|
|
4818
|
-
background: "linear-gradient(to top, var(--chatllm-bg) 60%, transparent)",
|
|
4819
|
-
pointerEvents: "none"
|
|
4804
|
+
paddingBottom: inline ? "0px" : "16px",
|
|
4805
|
+
paddingTop: inline ? "0px" : "64px",
|
|
4806
|
+
background: inline ? "transparent" : "linear-gradient(to top, var(--chatllm-bg) 60%, transparent)",
|
|
4807
|
+
pointerEvents: inline ? void 0 : "none"
|
|
4820
4808
|
},
|
|
4821
4809
|
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
4822
4810
|
"div",
|
|
@@ -5417,7 +5405,7 @@ var ChatInput = ({
|
|
|
5417
5405
|
]
|
|
5418
5406
|
}
|
|
5419
5407
|
),
|
|
5420
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
5408
|
+
!inline && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
5421
5409
|
"p",
|
|
5422
5410
|
{
|
|
5423
5411
|
onClick: onDisclaimerClick,
|
|
@@ -9062,147 +9050,9 @@ var MessageList = ({
|
|
|
9062
9050
|
);
|
|
9063
9051
|
};
|
|
9064
9052
|
|
|
9065
|
-
// src/react/components/EmptyState.tsx
|
|
9066
|
-
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
9067
|
-
var EmptyState = ({
|
|
9068
|
-
greeting,
|
|
9069
|
-
templates = [],
|
|
9070
|
-
onTemplateClick,
|
|
9071
|
-
actions = [],
|
|
9072
|
-
onActionSelect
|
|
9073
|
-
}) => {
|
|
9074
|
-
const getActionIcon = (icon) => {
|
|
9075
|
-
const iconMap = {
|
|
9076
|
-
search: "search-line",
|
|
9077
|
-
image: "image-line",
|
|
9078
|
-
code: "code-s-slash-line",
|
|
9079
|
-
document: "file-text-line"
|
|
9080
|
-
};
|
|
9081
|
-
return iconMap[icon] || "sparkling-line";
|
|
9082
|
-
};
|
|
9083
|
-
const hasContent = actions.length > 0 || templates.length > 0;
|
|
9084
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9085
|
-
"div",
|
|
9086
|
-
{
|
|
9087
|
-
className: "chatllm-empty-state",
|
|
9088
|
-
style: {
|
|
9089
|
-
flex: 1,
|
|
9090
|
-
display: "flex",
|
|
9091
|
-
flexDirection: "column",
|
|
9092
|
-
alignItems: "center",
|
|
9093
|
-
justifyContent: hasContent ? "center" : "flex-end",
|
|
9094
|
-
padding: "48px 24px",
|
|
9095
|
-
paddingBottom: hasContent ? "200px" : "32px",
|
|
9096
|
-
textAlign: "center"
|
|
9097
|
-
},
|
|
9098
|
-
children: [
|
|
9099
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9100
|
-
"div",
|
|
9101
|
-
{
|
|
9102
|
-
className: "chatllm-sheet",
|
|
9103
|
-
style: {
|
|
9104
|
-
width: "64px",
|
|
9105
|
-
height: "64px",
|
|
9106
|
-
borderRadius: "16px",
|
|
9107
|
-
display: "flex",
|
|
9108
|
-
alignItems: "center",
|
|
9109
|
-
justifyContent: "center",
|
|
9110
|
-
marginBottom: "32px",
|
|
9111
|
-
color: "var(--chatllm-primary)"
|
|
9112
|
-
},
|
|
9113
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconSvg, { name: "chat-1-line", size: 40 })
|
|
9114
|
-
}
|
|
9115
|
-
),
|
|
9116
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9117
|
-
"h1",
|
|
9118
|
-
{
|
|
9119
|
-
style: {
|
|
9120
|
-
fontSize: "30px",
|
|
9121
|
-
fontWeight: 700,
|
|
9122
|
-
color: "var(--chatllm-text)",
|
|
9123
|
-
marginBottom: hasContent ? "40px" : "0",
|
|
9124
|
-
lineHeight: 1.3
|
|
9125
|
-
},
|
|
9126
|
-
children: "How can I help you today?"
|
|
9127
|
-
}
|
|
9128
|
-
),
|
|
9129
|
-
(actions.length > 0 || templates.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9130
|
-
"div",
|
|
9131
|
-
{
|
|
9132
|
-
style: {
|
|
9133
|
-
display: "flex",
|
|
9134
|
-
flexWrap: "wrap",
|
|
9135
|
-
justifyContent: "center",
|
|
9136
|
-
gap: "12px",
|
|
9137
|
-
maxWidth: "800px",
|
|
9138
|
-
marginBottom: "48px"
|
|
9139
|
-
},
|
|
9140
|
-
children: [
|
|
9141
|
-
actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9142
|
-
"button",
|
|
9143
|
-
{
|
|
9144
|
-
onClick: () => onActionSelect?.(action),
|
|
9145
|
-
className: "chatllm-btn-secondary",
|
|
9146
|
-
style: {
|
|
9147
|
-
display: "flex",
|
|
9148
|
-
alignItems: "center",
|
|
9149
|
-
gap: "8px",
|
|
9150
|
-
padding: "12px 20px",
|
|
9151
|
-
fontSize: "14px",
|
|
9152
|
-
fontWeight: 500
|
|
9153
|
-
},
|
|
9154
|
-
children: [
|
|
9155
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9156
|
-
IconSvg,
|
|
9157
|
-
{
|
|
9158
|
-
name: getActionIcon(action.icon),
|
|
9159
|
-
size: 18,
|
|
9160
|
-
color: "var(--chatllm-primary)"
|
|
9161
|
-
}
|
|
9162
|
-
),
|
|
9163
|
-
action.label
|
|
9164
|
-
]
|
|
9165
|
-
},
|
|
9166
|
-
action.id
|
|
9167
|
-
)),
|
|
9168
|
-
templates.slice(0, 4).map((template) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9169
|
-
"button",
|
|
9170
|
-
{
|
|
9171
|
-
onClick: () => onTemplateClick(template),
|
|
9172
|
-
className: "chatllm-btn-secondary",
|
|
9173
|
-
style: {
|
|
9174
|
-
display: "flex",
|
|
9175
|
-
alignItems: "center",
|
|
9176
|
-
gap: "8px",
|
|
9177
|
-
padding: "12px 20px",
|
|
9178
|
-
fontSize: "14px",
|
|
9179
|
-
fontWeight: 500
|
|
9180
|
-
},
|
|
9181
|
-
children: [
|
|
9182
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9183
|
-
IconSvg,
|
|
9184
|
-
{
|
|
9185
|
-
name: "sparkling-line",
|
|
9186
|
-
size: 18,
|
|
9187
|
-
color: "var(--chatllm-primary)"
|
|
9188
|
-
}
|
|
9189
|
-
),
|
|
9190
|
-
template.title
|
|
9191
|
-
]
|
|
9192
|
-
},
|
|
9193
|
-
template.id
|
|
9194
|
-
))
|
|
9195
|
-
]
|
|
9196
|
-
}
|
|
9197
|
-
)
|
|
9198
|
-
]
|
|
9199
|
-
}
|
|
9200
|
-
);
|
|
9201
|
-
};
|
|
9202
|
-
|
|
9203
9053
|
// src/react/components/SettingsModal.tsx
|
|
9204
9054
|
var import_react18 = require("react");
|
|
9205
|
-
var
|
|
9055
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
9206
9056
|
var DEFAULT_PERSONALIZATION2 = {
|
|
9207
9057
|
responseStyle: {
|
|
9208
9058
|
warmth: "medium",
|
|
@@ -9262,7 +9112,7 @@ var SettingsModal = ({
|
|
|
9262
9112
|
setLocalApiKey(value);
|
|
9263
9113
|
onApiKeyChange?.(value);
|
|
9264
9114
|
};
|
|
9265
|
-
return /* @__PURE__ */ (0,
|
|
9115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9266
9116
|
"div",
|
|
9267
9117
|
{
|
|
9268
9118
|
className: "chatllm-settings-overlay",
|
|
@@ -9276,7 +9126,7 @@ var SettingsModal = ({
|
|
|
9276
9126
|
zIndex: 1e3
|
|
9277
9127
|
},
|
|
9278
9128
|
onClick: onClose,
|
|
9279
|
-
children: /* @__PURE__ */ (0,
|
|
9129
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9280
9130
|
"div",
|
|
9281
9131
|
{
|
|
9282
9132
|
className: "chatllm-settings-modal",
|
|
@@ -9294,7 +9144,7 @@ var SettingsModal = ({
|
|
|
9294
9144
|
},
|
|
9295
9145
|
onClick: (e) => e.stopPropagation(),
|
|
9296
9146
|
children: [
|
|
9297
|
-
/* @__PURE__ */ (0,
|
|
9147
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9298
9148
|
"div",
|
|
9299
9149
|
{
|
|
9300
9150
|
style: {
|
|
@@ -9305,7 +9155,7 @@ var SettingsModal = ({
|
|
|
9305
9155
|
flexDirection: "column"
|
|
9306
9156
|
},
|
|
9307
9157
|
children: [
|
|
9308
|
-
/* @__PURE__ */ (0,
|
|
9158
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { padding: "16px", borderBottom: "1px solid var(--chatllm-border, #e5e7eb)" }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9309
9159
|
"button",
|
|
9310
9160
|
{
|
|
9311
9161
|
onClick: onClose,
|
|
@@ -9319,11 +9169,11 @@ var SettingsModal = ({
|
|
|
9319
9169
|
alignItems: "center",
|
|
9320
9170
|
justifyContent: "center"
|
|
9321
9171
|
},
|
|
9322
|
-
children: /* @__PURE__ */ (0,
|
|
9172
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconSvg, { name: "close-line", size: 20, color: "var(--chatllm-text-muted, #6b7280)" })
|
|
9323
9173
|
}
|
|
9324
9174
|
) }),
|
|
9325
|
-
/* @__PURE__ */ (0,
|
|
9326
|
-
/* @__PURE__ */ (0,
|
|
9175
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("nav", { style: { flex: 1, padding: "8px" }, children: [
|
|
9176
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9327
9177
|
TabButton,
|
|
9328
9178
|
{
|
|
9329
9179
|
active: activeTab === "general",
|
|
@@ -9332,7 +9182,7 @@ var SettingsModal = ({
|
|
|
9332
9182
|
label: "\uC77C\uBC18"
|
|
9333
9183
|
}
|
|
9334
9184
|
),
|
|
9335
|
-
/* @__PURE__ */ (0,
|
|
9185
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9336
9186
|
TabButton,
|
|
9337
9187
|
{
|
|
9338
9188
|
active: activeTab === "personalization",
|
|
@@ -9341,7 +9191,7 @@ var SettingsModal = ({
|
|
|
9341
9191
|
label: "\uAC1C\uC778 \uB9DE\uCDA4 \uC124\uC815"
|
|
9342
9192
|
}
|
|
9343
9193
|
),
|
|
9344
|
-
showMemoryTab && /* @__PURE__ */ (0,
|
|
9194
|
+
showMemoryTab && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9345
9195
|
TabButton,
|
|
9346
9196
|
{
|
|
9347
9197
|
active: activeTab === "memory",
|
|
@@ -9350,7 +9200,7 @@ var SettingsModal = ({
|
|
|
9350
9200
|
label: "AI \uBA54\uBAA8\uB9AC"
|
|
9351
9201
|
}
|
|
9352
9202
|
),
|
|
9353
|
-
showMemoryTab && enableProjects && /* @__PURE__ */ (0,
|
|
9203
|
+
showMemoryTab && enableProjects && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9354
9204
|
TabButton,
|
|
9355
9205
|
{
|
|
9356
9206
|
active: activeTab === "project-memory",
|
|
@@ -9359,7 +9209,7 @@ var SettingsModal = ({
|
|
|
9359
9209
|
label: "\uD504\uB85C\uC81D\uD2B8 \uBA54\uBAA8\uB9AC"
|
|
9360
9210
|
}
|
|
9361
9211
|
),
|
|
9362
|
-
/* @__PURE__ */ (0,
|
|
9212
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9363
9213
|
TabButton,
|
|
9364
9214
|
{
|
|
9365
9215
|
active: activeTab === "data",
|
|
@@ -9372,24 +9222,24 @@ var SettingsModal = ({
|
|
|
9372
9222
|
]
|
|
9373
9223
|
}
|
|
9374
9224
|
),
|
|
9375
|
-
/* @__PURE__ */ (0,
|
|
9376
|
-
activeTab === "general" && /* @__PURE__ */ (0,
|
|
9377
|
-
/* @__PURE__ */ (0,
|
|
9378
|
-
/* @__PURE__ */ (0,
|
|
9225
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1, overflow: "auto", padding: "24px" }, children: [
|
|
9226
|
+
activeTab === "general" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
9227
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { style: { fontSize: "20px", fontWeight: 600, marginBottom: "24px", color: "var(--chatllm-text, #1f2937)" }, children: "\uC77C\uBC18" }),
|
|
9228
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SettingRow, { label: "\uC5B8\uC5B4", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9379
9229
|
"select",
|
|
9380
9230
|
{
|
|
9381
9231
|
value: personalization.language,
|
|
9382
9232
|
onChange: (e) => onPersonalizationChange({ ...personalization, language: e.target.value }),
|
|
9383
9233
|
style: selectStyle,
|
|
9384
9234
|
children: [
|
|
9385
|
-
/* @__PURE__ */ (0,
|
|
9386
|
-
/* @__PURE__ */ (0,
|
|
9387
|
-
/* @__PURE__ */ (0,
|
|
9388
|
-
/* @__PURE__ */ (0,
|
|
9235
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "auto", children: "\uC790\uB3D9 \uD0D0\uC9C0" }),
|
|
9236
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "ko", children: "\uD55C\uAD6D\uC5B4" }),
|
|
9237
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "en", children: "English" }),
|
|
9238
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "ja", children: "\u65E5\u672C\u8A9E" })
|
|
9389
9239
|
]
|
|
9390
9240
|
}
|
|
9391
9241
|
) }),
|
|
9392
|
-
/* @__PURE__ */ (0,
|
|
9242
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SettingRow, { label: "\uAE30\uBCF8\uAC12\uC73C\uB85C \uCD08\uAE30\uD654", description: "\uBAA8\uB4E0 \uC124\uC815\uC744 \uCD08\uAE30 \uC0C1\uD0DC\uB85C \uB418\uB3CC\uB9BD\uB2C8\uB2E4", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9393
9243
|
"button",
|
|
9394
9244
|
{
|
|
9395
9245
|
onClick: () => onPersonalizationChange(DEFAULT_PERSONALIZATION2),
|
|
@@ -9397,11 +9247,11 @@ var SettingsModal = ({
|
|
|
9397
9247
|
children: "\uCD08\uAE30\uD654"
|
|
9398
9248
|
}
|
|
9399
9249
|
) }),
|
|
9400
|
-
onApiKeyChange && /* @__PURE__ */ (0,
|
|
9401
|
-
/* @__PURE__ */ (0,
|
|
9402
|
-
/* @__PURE__ */ (0,
|
|
9403
|
-
/* @__PURE__ */ (0,
|
|
9404
|
-
/* @__PURE__ */ (0,
|
|
9250
|
+
onApiKeyChange && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { marginTop: "32px", paddingTop: "24px", borderTop: "1px solid var(--chatllm-border, #e5e7eb)" }, children: [
|
|
9251
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { style: { fontSize: "16px", fontWeight: 500, marginBottom: "16px", color: "var(--chatllm-text, #1f2937)" }, children: "API \uC124\uC815" }),
|
|
9252
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
9253
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { style: { display: "block", fontSize: "14px", marginBottom: "8px", color: "var(--chatllm-text, #374151)" }, children: apiKeyLabel }),
|
|
9254
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9405
9255
|
"input",
|
|
9406
9256
|
{
|
|
9407
9257
|
type: "password",
|
|
@@ -9411,18 +9261,18 @@ var SettingsModal = ({
|
|
|
9411
9261
|
style: inputStyle
|
|
9412
9262
|
}
|
|
9413
9263
|
),
|
|
9414
|
-
/* @__PURE__ */ (0,
|
|
9264
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #9ca3af)", marginTop: "4px" }, children: apiKeyDescription })
|
|
9415
9265
|
] })
|
|
9416
9266
|
] })
|
|
9417
9267
|
] }),
|
|
9418
|
-
activeTab === "personalization" && /* @__PURE__ */ (0,
|
|
9419
|
-
/* @__PURE__ */ (0,
|
|
9420
|
-
/* @__PURE__ */ (0,
|
|
9421
|
-
/* @__PURE__ */ (0,
|
|
9422
|
-
/* @__PURE__ */ (0,
|
|
9423
|
-
/* @__PURE__ */ (0,
|
|
9424
|
-
/* @__PURE__ */ (0,
|
|
9425
|
-
/* @__PURE__ */ (0,
|
|
9268
|
+
activeTab === "personalization" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
9269
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { style: { fontSize: "20px", fontWeight: 600, marginBottom: "24px", color: "var(--chatllm-text, #1f2937)" }, children: "\uAC1C\uC778 \uB9DE\uCDA4 \uC124\uC815" }),
|
|
9270
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { style: { marginBottom: "32px" }, children: [
|
|
9271
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { style: { fontSize: "14px", fontWeight: 500, color: "var(--chatllm-text-muted, #6b7280)", marginBottom: "16px" }, children: "\uC0AC\uC6A9\uC790 \uD504\uB85C\uD544" }),
|
|
9272
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
9273
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
9274
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { style: labelStyle, children: "\uB2C9\uB124\uC784" }),
|
|
9275
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9426
9276
|
"input",
|
|
9427
9277
|
{
|
|
9428
9278
|
type: "text",
|
|
@@ -9433,9 +9283,9 @@ var SettingsModal = ({
|
|
|
9433
9283
|
}
|
|
9434
9284
|
)
|
|
9435
9285
|
] }),
|
|
9436
|
-
/* @__PURE__ */ (0,
|
|
9437
|
-
/* @__PURE__ */ (0,
|
|
9438
|
-
/* @__PURE__ */ (0,
|
|
9286
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
9287
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { style: labelStyle, children: "\uC9C1\uC5C5" }),
|
|
9288
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9439
9289
|
"input",
|
|
9440
9290
|
{
|
|
9441
9291
|
type: "text",
|
|
@@ -9446,9 +9296,9 @@ var SettingsModal = ({
|
|
|
9446
9296
|
}
|
|
9447
9297
|
)
|
|
9448
9298
|
] }),
|
|
9449
|
-
/* @__PURE__ */ (0,
|
|
9450
|
-
/* @__PURE__ */ (0,
|
|
9451
|
-
/* @__PURE__ */ (0,
|
|
9299
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
9300
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { style: labelStyle, children: "\uCD94\uAC00 \uC815\uBCF4" }),
|
|
9301
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9452
9302
|
"textarea",
|
|
9453
9303
|
{
|
|
9454
9304
|
value: personalization.userProfile.additionalInfo || "",
|
|
@@ -9461,62 +9311,62 @@ var SettingsModal = ({
|
|
|
9461
9311
|
] })
|
|
9462
9312
|
] })
|
|
9463
9313
|
] }),
|
|
9464
|
-
/* @__PURE__ */ (0,
|
|
9465
|
-
/* @__PURE__ */ (0,
|
|
9466
|
-
/* @__PURE__ */ (0,
|
|
9314
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("section", { children: [
|
|
9315
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { style: { fontSize: "14px", fontWeight: 500, color: "var(--chatllm-text-muted, #6b7280)", marginBottom: "16px" }, children: "\uC751\uB2F5 \uC2A4\uD0C0\uC77C" }),
|
|
9316
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SettingRow, { label: "\uB530\uB73B\uD568", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9467
9317
|
"select",
|
|
9468
9318
|
{
|
|
9469
9319
|
value: personalization.responseStyle.warmth,
|
|
9470
9320
|
onChange: (e) => updateResponseStyle("warmth", e.target.value),
|
|
9471
9321
|
style: selectStyle,
|
|
9472
9322
|
children: [
|
|
9473
|
-
/* @__PURE__ */ (0,
|
|
9474
|
-
/* @__PURE__ */ (0,
|
|
9475
|
-
/* @__PURE__ */ (0,
|
|
9323
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "high", children: "\uB192\uC74C - \uCE5C\uADFC\uD558\uACE0 \uB530\uB73B\uD558\uAC8C" }),
|
|
9324
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "medium", children: "\uAE30\uBCF8\uAC12" }),
|
|
9325
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "low", children: "\uB0AE\uC74C - \uAC04\uACB0\uD558\uACE0 \uC0AC\uBB34\uC801\uC73C\uB85C" })
|
|
9476
9326
|
]
|
|
9477
9327
|
}
|
|
9478
9328
|
) }),
|
|
9479
|
-
/* @__PURE__ */ (0,
|
|
9329
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SettingRow, { label: "\uC5F4\uC815\uC801", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9480
9330
|
"select",
|
|
9481
9331
|
{
|
|
9482
9332
|
value: personalization.responseStyle.enthusiasm,
|
|
9483
9333
|
onChange: (e) => updateResponseStyle("enthusiasm", e.target.value),
|
|
9484
9334
|
style: selectStyle,
|
|
9485
9335
|
children: [
|
|
9486
|
-
/* @__PURE__ */ (0,
|
|
9487
|
-
/* @__PURE__ */ (0,
|
|
9488
|
-
/* @__PURE__ */ (0,
|
|
9336
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "high", children: "\uB192\uC74C - \uC801\uADF9\uC801\uC774\uACE0 \uD65C\uBC1C\uD558\uAC8C" }),
|
|
9337
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "medium", children: "\uAE30\uBCF8\uAC12" }),
|
|
9338
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "low", children: "\uB0AE\uC74C - \uCC28\uBD84\uD558\uACE0 \uC808\uC81C\uC788\uAC8C" })
|
|
9489
9339
|
]
|
|
9490
9340
|
}
|
|
9491
9341
|
) }),
|
|
9492
|
-
/* @__PURE__ */ (0,
|
|
9342
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SettingRow, { label: "\uC774\uBAA8\uC9C0 \uC0AC\uC6A9", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9493
9343
|
"select",
|
|
9494
9344
|
{
|
|
9495
9345
|
value: personalization.responseStyle.emojiUsage,
|
|
9496
9346
|
onChange: (e) => updateResponseStyle("emojiUsage", e.target.value),
|
|
9497
9347
|
style: selectStyle,
|
|
9498
9348
|
children: [
|
|
9499
|
-
/* @__PURE__ */ (0,
|
|
9500
|
-
/* @__PURE__ */ (0,
|
|
9501
|
-
/* @__PURE__ */ (0,
|
|
9349
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "high", children: "\uB192\uC74C - \uC790\uC8FC \uC0AC\uC6A9" }),
|
|
9350
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "medium", children: "\uAE30\uBCF8\uAC12" }),
|
|
9351
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "low", children: "\uB0AE\uC74C - \uAC70\uC758 \uC0AC\uC6A9 \uC548 \uD568" })
|
|
9502
9352
|
]
|
|
9503
9353
|
}
|
|
9504
9354
|
) }),
|
|
9505
|
-
/* @__PURE__ */ (0,
|
|
9355
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SettingRow, { label: "\uC751\uB2F5 \uAE38\uC774", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9506
9356
|
"select",
|
|
9507
9357
|
{
|
|
9508
9358
|
value: personalization.responseStyle.verbosity,
|
|
9509
9359
|
onChange: (e) => updateResponseStyle("verbosity", e.target.value),
|
|
9510
9360
|
style: selectStyle,
|
|
9511
9361
|
children: [
|
|
9512
|
-
/* @__PURE__ */ (0,
|
|
9513
|
-
/* @__PURE__ */ (0,
|
|
9514
|
-
/* @__PURE__ */ (0,
|
|
9362
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "detailed", children: "\uC0C1\uC138 - \uC790\uC138\uD558\uAC8C \uC124\uBA85" }),
|
|
9363
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "balanced", children: "\uAE30\uBCF8\uAC12" }),
|
|
9364
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("option", { value: "concise", children: "\uAC04\uACB0 - \uD575\uC2EC\uB9CC \uC694\uC57D" })
|
|
9515
9365
|
]
|
|
9516
9366
|
}
|
|
9517
9367
|
) })
|
|
9518
9368
|
] }),
|
|
9519
|
-
onSave && /* @__PURE__ */ (0,
|
|
9369
|
+
onSave && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { marginTop: "24px", display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9520
9370
|
"button",
|
|
9521
9371
|
{
|
|
9522
9372
|
onClick: onSave,
|
|
@@ -9537,7 +9387,7 @@ var SettingsModal = ({
|
|
|
9537
9387
|
}
|
|
9538
9388
|
) })
|
|
9539
9389
|
] }),
|
|
9540
|
-
activeTab === "memory" && showMemoryTab && /* @__PURE__ */ (0,
|
|
9390
|
+
activeTab === "memory" && showMemoryTab && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9541
9391
|
MemoryTabContent,
|
|
9542
9392
|
{
|
|
9543
9393
|
items: memoryItems,
|
|
@@ -9546,7 +9396,7 @@ var SettingsModal = ({
|
|
|
9546
9396
|
onClearAll: onClearMemory
|
|
9547
9397
|
}
|
|
9548
9398
|
),
|
|
9549
|
-
activeTab === "project-memory" && showMemoryTab && enableProjects && /* @__PURE__ */ (0,
|
|
9399
|
+
activeTab === "project-memory" && showMemoryTab && enableProjects && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9550
9400
|
MemoryTabContent,
|
|
9551
9401
|
{
|
|
9552
9402
|
items: projectMemoryItems,
|
|
@@ -9557,9 +9407,9 @@ var SettingsModal = ({
|
|
|
9557
9407
|
emptyDescription: "\uB300\uD654\uAC00 \uC9C4\uD589\uB418\uBA74 AI\uAC00 \uD504\uB85C\uC81D\uD2B8 \uB9E5\uB77D\uC744 \uC790\uB3D9\uC73C\uB85C \uD559\uC2B5\uD569\uB2C8\uB2E4"
|
|
9558
9408
|
}
|
|
9559
9409
|
),
|
|
9560
|
-
activeTab === "data" && /* @__PURE__ */ (0,
|
|
9561
|
-
/* @__PURE__ */ (0,
|
|
9562
|
-
/* @__PURE__ */ (0,
|
|
9410
|
+
activeTab === "data" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
9411
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { style: { fontSize: "20px", fontWeight: 600, marginBottom: "24px", color: "var(--chatllm-text, #1f2937)" }, children: "\uB370\uC774\uD130 \uC81C\uC5B4" }),
|
|
9412
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SettingRow, { label: "\uBA54\uBAA8\uB9AC \uC0AC\uC6A9", description: "\uB300\uD654 \uCEE8\uD14D\uC2A4\uD2B8\uB97C \uAE30\uC5B5\uD569\uB2C8\uB2E4", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9563
9413
|
"button",
|
|
9564
9414
|
{
|
|
9565
9415
|
onClick: () => onPersonalizationChange({ ...personalization, useMemory: !personalization.useMemory }),
|
|
@@ -9573,7 +9423,7 @@ var SettingsModal = ({
|
|
|
9573
9423
|
position: "relative",
|
|
9574
9424
|
transition: "background-color 0.2s"
|
|
9575
9425
|
},
|
|
9576
|
-
children: /* @__PURE__ */ (0,
|
|
9426
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9577
9427
|
"div",
|
|
9578
9428
|
{
|
|
9579
9429
|
style: {
|
|
@@ -9591,7 +9441,7 @@ var SettingsModal = ({
|
|
|
9591
9441
|
)
|
|
9592
9442
|
}
|
|
9593
9443
|
) }),
|
|
9594
|
-
onClearAllData && /* @__PURE__ */ (0,
|
|
9444
|
+
onClearAllData && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SettingRow, { label: "\uB300\uD654 \uAE30\uB85D \uC0AD\uC81C", description: "\uBAA8\uB4E0 \uB300\uD654 \uAE30\uB85D\uC744 \uC0AD\uC81C\uD569\uB2C8\uB2E4", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9595
9445
|
"button",
|
|
9596
9446
|
{
|
|
9597
9447
|
onClick: () => {
|
|
@@ -9611,7 +9461,7 @@ var SettingsModal = ({
|
|
|
9611
9461
|
}
|
|
9612
9462
|
);
|
|
9613
9463
|
};
|
|
9614
|
-
var TabButton = ({ active, onClick, icon, label }) => /* @__PURE__ */ (0,
|
|
9464
|
+
var TabButton = ({ active, onClick, icon, label }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9615
9465
|
"button",
|
|
9616
9466
|
{
|
|
9617
9467
|
onClick,
|
|
@@ -9632,12 +9482,12 @@ var TabButton = ({ active, onClick, icon, label }) => /* @__PURE__ */ (0, import
|
|
|
9632
9482
|
marginBottom: "4px"
|
|
9633
9483
|
},
|
|
9634
9484
|
children: [
|
|
9635
|
-
/* @__PURE__ */ (0,
|
|
9485
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconSvg, { name: icon, size: 20 }),
|
|
9636
9486
|
label
|
|
9637
9487
|
]
|
|
9638
9488
|
}
|
|
9639
9489
|
);
|
|
9640
|
-
var SettingRow = ({ label, description, children }) => /* @__PURE__ */ (0,
|
|
9490
|
+
var SettingRow = ({ label, description, children }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9641
9491
|
"div",
|
|
9642
9492
|
{
|
|
9643
9493
|
style: {
|
|
@@ -9648,9 +9498,9 @@ var SettingRow = ({ label, description, children }) => /* @__PURE__ */ (0, impor
|
|
|
9648
9498
|
borderBottom: "1px solid var(--chatllm-border-light, #f3f4f6)"
|
|
9649
9499
|
},
|
|
9650
9500
|
children: [
|
|
9651
|
-
/* @__PURE__ */ (0,
|
|
9652
|
-
/* @__PURE__ */ (0,
|
|
9653
|
-
description && /* @__PURE__ */ (0,
|
|
9501
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
9502
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { fontSize: "14px", color: "var(--chatllm-text, #374151)" }, children: label }),
|
|
9503
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #9ca3af)", marginTop: "2px" }, children: description })
|
|
9654
9504
|
] }),
|
|
9655
9505
|
children
|
|
9656
9506
|
]
|
|
@@ -9722,15 +9572,15 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9722
9572
|
minute: "2-digit"
|
|
9723
9573
|
});
|
|
9724
9574
|
};
|
|
9725
|
-
return /* @__PURE__ */ (0,
|
|
9726
|
-
/* @__PURE__ */ (0,
|
|
9727
|
-
/* @__PURE__ */ (0,
|
|
9728
|
-
/* @__PURE__ */ (0,
|
|
9575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { children: [
|
|
9576
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "24px" }, children: [
|
|
9577
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { style: { fontSize: "20px", fontWeight: 600, color: "var(--chatllm-text, #1f2937)", margin: 0 }, children: title }),
|
|
9578
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { style: { fontSize: "13px", color: "var(--chatllm-text-muted, #9ca3af)" }, children: [
|
|
9729
9579
|
items.length,
|
|
9730
9580
|
"\uAC1C \uD56D\uBAA9"
|
|
9731
9581
|
] })
|
|
9732
9582
|
] }),
|
|
9733
|
-
/* @__PURE__ */ (0,
|
|
9583
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { display: "flex", gap: "6px", marginBottom: "20px", flexWrap: "wrap" }, children: ["all", "fact", "skill", "preference"].map((tab) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9734
9584
|
"button",
|
|
9735
9585
|
{
|
|
9736
9586
|
onClick: () => setActiveFilter(tab),
|
|
@@ -9748,7 +9598,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9748
9598
|
},
|
|
9749
9599
|
tab
|
|
9750
9600
|
)) }),
|
|
9751
|
-
contextSummary && activeFilter === "all" && /* @__PURE__ */ (0,
|
|
9601
|
+
contextSummary && activeFilter === "all" && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9752
9602
|
"div",
|
|
9753
9603
|
{
|
|
9754
9604
|
style: {
|
|
@@ -9759,19 +9609,19 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9759
9609
|
borderLeft: "3px solid var(--chatllm-primary, #3b82f6)"
|
|
9760
9610
|
},
|
|
9761
9611
|
children: [
|
|
9762
|
-
/* @__PURE__ */ (0,
|
|
9763
|
-
/* @__PURE__ */ (0,
|
|
9764
|
-
/* @__PURE__ */ (0,
|
|
9612
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "6px", marginBottom: "8px" }, children: [
|
|
9613
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconSvg, { name: "file-text-line", size: 14, color: "var(--chatllm-primary, #3b82f6)" }),
|
|
9614
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { fontSize: "12px", fontWeight: 500, color: "var(--chatllm-primary, #3b82f6)" }, children: "\uB300\uD654 \uC694\uC57D" })
|
|
9765
9615
|
] }),
|
|
9766
|
-
/* @__PURE__ */ (0,
|
|
9616
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { style: { fontSize: "13px", lineHeight: "1.6", color: "var(--chatllm-text, #374151)", margin: 0 }, children: contextSummary })
|
|
9767
9617
|
]
|
|
9768
9618
|
}
|
|
9769
9619
|
),
|
|
9770
|
-
filteredItems.length === 0 ? /* @__PURE__ */ (0,
|
|
9771
|
-
/* @__PURE__ */ (0,
|
|
9772
|
-
/* @__PURE__ */ (0,
|
|
9773
|
-
/* @__PURE__ */ (0,
|
|
9774
|
-
] }) : /* @__PURE__ */ (0,
|
|
9620
|
+
filteredItems.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { padding: "40px 16px", textAlign: "center" }, children: [
|
|
9621
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconSvg, { name: "robot-line", size: 40, color: "var(--chatllm-text-muted, #d1d5db)" }),
|
|
9622
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { style: { fontSize: "14px", color: "var(--chatllm-text-muted, #9ca3af)", marginTop: "12px" }, children: emptyMessage }),
|
|
9623
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #d1d5db)", marginTop: "4px" }, children: emptyDescription })
|
|
9624
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: filteredItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
9775
9625
|
"div",
|
|
9776
9626
|
{
|
|
9777
9627
|
style: {
|
|
@@ -9784,10 +9634,10 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9784
9634
|
},
|
|
9785
9635
|
onClick: () => setExpandedId(expandedId === item.id ? null : item.id),
|
|
9786
9636
|
children: [
|
|
9787
|
-
/* @__PURE__ */ (0,
|
|
9788
|
-
/* @__PURE__ */ (0,
|
|
9789
|
-
/* @__PURE__ */ (0,
|
|
9790
|
-
item.category && /* @__PURE__ */ (0,
|
|
9637
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between" }, children: [
|
|
9638
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
9639
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [
|
|
9640
|
+
item.category && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9791
9641
|
"span",
|
|
9792
9642
|
{
|
|
9793
9643
|
style: {
|
|
@@ -9801,12 +9651,12 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9801
9651
|
children: memoryCategoryLabels[item.category]
|
|
9802
9652
|
}
|
|
9803
9653
|
),
|
|
9804
|
-
/* @__PURE__ */ (0,
|
|
9654
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { style: { fontSize: "11px", color: "var(--chatllm-text-muted, #9ca3af)" }, children: formatDate(item.timestamp) })
|
|
9805
9655
|
] }),
|
|
9806
|
-
/* @__PURE__ */ (0,
|
|
9656
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { fontSize: "13px", fontWeight: 500, color: "var(--chatllm-text, #1f2937)" }, children: item.key })
|
|
9807
9657
|
] }),
|
|
9808
|
-
/* @__PURE__ */ (0,
|
|
9809
|
-
onDelete && /* @__PURE__ */ (0,
|
|
9658
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
9659
|
+
onDelete && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9810
9660
|
"button",
|
|
9811
9661
|
{
|
|
9812
9662
|
onClick: (e) => {
|
|
@@ -9822,10 +9672,10 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9822
9672
|
opacity: 0.5
|
|
9823
9673
|
},
|
|
9824
9674
|
"aria-label": "\uBA54\uBAA8\uB9AC \uC0AD\uC81C",
|
|
9825
|
-
children: /* @__PURE__ */ (0,
|
|
9675
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconSvg, { name: "delete-bin-line", size: 14, color: "var(--chatllm-text-muted, #9ca3af)" })
|
|
9826
9676
|
}
|
|
9827
9677
|
),
|
|
9828
|
-
/* @__PURE__ */ (0,
|
|
9678
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9829
9679
|
IconSvg,
|
|
9830
9680
|
{
|
|
9831
9681
|
name: expandedId === item.id ? "arrow-up-s-line" : "arrow-down-s-line",
|
|
@@ -9835,7 +9685,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9835
9685
|
)
|
|
9836
9686
|
] })
|
|
9837
9687
|
] }),
|
|
9838
|
-
expandedId === item.id && /* @__PURE__ */ (0,
|
|
9688
|
+
expandedId === item.id && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9839
9689
|
"div",
|
|
9840
9690
|
{
|
|
9841
9691
|
style: {
|
|
@@ -9843,7 +9693,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9843
9693
|
paddingTop: "12px",
|
|
9844
9694
|
borderTop: "1px solid var(--chatllm-border-light, #f3f4f6)"
|
|
9845
9695
|
},
|
|
9846
|
-
children: /* @__PURE__ */ (0,
|
|
9696
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9847
9697
|
"p",
|
|
9848
9698
|
{
|
|
9849
9699
|
style: {
|
|
@@ -9862,7 +9712,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9862
9712
|
},
|
|
9863
9713
|
item.id
|
|
9864
9714
|
)) }),
|
|
9865
|
-
onClearAll && items.length > 0 && /* @__PURE__ */ (0,
|
|
9715
|
+
onClearAll && items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { marginTop: "24px", paddingTop: "16px", borderTop: "1px solid var(--chatllm-border, #e5e7eb)" }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
9866
9716
|
"button",
|
|
9867
9717
|
{
|
|
9868
9718
|
onClick: () => {
|
|
@@ -9879,7 +9729,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9879
9729
|
|
|
9880
9730
|
// src/react/components/ProjectSettingsModal.tsx
|
|
9881
9731
|
var import_react19 = require("react");
|
|
9882
|
-
var
|
|
9732
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
9883
9733
|
var COLOR_PRESETS = [
|
|
9884
9734
|
"#2563eb",
|
|
9885
9735
|
"#7c3aed",
|
|
@@ -9960,7 +9810,7 @@ var ProjectSettingsModal = ({
|
|
|
9960
9810
|
cursor: "pointer",
|
|
9961
9811
|
fontFamily: "inherit"
|
|
9962
9812
|
});
|
|
9963
|
-
return /* @__PURE__ */ (0,
|
|
9813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
9964
9814
|
"div",
|
|
9965
9815
|
{
|
|
9966
9816
|
style: {
|
|
@@ -9975,7 +9825,7 @@ var ProjectSettingsModal = ({
|
|
|
9975
9825
|
onClick: (e) => {
|
|
9976
9826
|
if (e.target === e.currentTarget) onClose();
|
|
9977
9827
|
},
|
|
9978
|
-
children: /* @__PURE__ */ (0,
|
|
9828
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
9979
9829
|
"div",
|
|
9980
9830
|
{
|
|
9981
9831
|
style: {
|
|
@@ -9989,7 +9839,7 @@ var ProjectSettingsModal = ({
|
|
|
9989
9839
|
overflow: "hidden"
|
|
9990
9840
|
},
|
|
9991
9841
|
children: [
|
|
9992
|
-
/* @__PURE__ */ (0,
|
|
9842
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
9993
9843
|
"div",
|
|
9994
9844
|
{
|
|
9995
9845
|
style: {
|
|
@@ -9999,8 +9849,8 @@ var ProjectSettingsModal = ({
|
|
|
9999
9849
|
padding: "20px 24px 0"
|
|
10000
9850
|
},
|
|
10001
9851
|
children: [
|
|
10002
|
-
/* @__PURE__ */ (0,
|
|
10003
|
-
/* @__PURE__ */ (0,
|
|
9852
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { style: { fontSize: "16px", fontWeight: 600, margin: 0, color: "var(--chatllm-text, #1a1a1a)" }, children: "\uD504\uB85C\uC81D\uD2B8 \uC124\uC815" }),
|
|
9853
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10004
9854
|
"button",
|
|
10005
9855
|
{
|
|
10006
9856
|
onClick: onClose,
|
|
@@ -10013,13 +9863,13 @@ var ProjectSettingsModal = ({
|
|
|
10013
9863
|
alignItems: "center"
|
|
10014
9864
|
},
|
|
10015
9865
|
"aria-label": "\uB2EB\uAE30",
|
|
10016
|
-
children: /* @__PURE__ */ (0,
|
|
9866
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconSvg, { name: "close-line", size: 20, color: "var(--chatllm-text-muted, #999)" })
|
|
10017
9867
|
}
|
|
10018
9868
|
)
|
|
10019
9869
|
]
|
|
10020
9870
|
}
|
|
10021
9871
|
),
|
|
10022
|
-
/* @__PURE__ */ (0,
|
|
9872
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
10023
9873
|
"div",
|
|
10024
9874
|
{
|
|
10025
9875
|
style: {
|
|
@@ -10029,9 +9879,9 @@ var ProjectSettingsModal = ({
|
|
|
10029
9879
|
borderBottom: "1px solid var(--chatllm-border, #e0e0e0)"
|
|
10030
9880
|
},
|
|
10031
9881
|
children: [
|
|
10032
|
-
/* @__PURE__ */ (0,
|
|
10033
|
-
/* @__PURE__ */ (0,
|
|
10034
|
-
/* @__PURE__ */ (0,
|
|
9882
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { onClick: () => setActiveTab("general"), style: tabStyle("general"), children: "\uC77C\uBC18" }),
|
|
9883
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("button", { onClick: () => setActiveTab("instructions"), style: tabStyle("instructions"), children: "\uC9C0\uCE68" }),
|
|
9884
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("button", { onClick: () => setActiveTab("files"), style: tabStyle("files"), children: [
|
|
10035
9885
|
"\uD30C\uC77C (",
|
|
10036
9886
|
project.files.length,
|
|
10037
9887
|
")"
|
|
@@ -10039,11 +9889,11 @@ var ProjectSettingsModal = ({
|
|
|
10039
9889
|
]
|
|
10040
9890
|
}
|
|
10041
9891
|
),
|
|
10042
|
-
/* @__PURE__ */ (0,
|
|
10043
|
-
activeTab === "general" && /* @__PURE__ */ (0,
|
|
10044
|
-
/* @__PURE__ */ (0,
|
|
10045
|
-
/* @__PURE__ */ (0,
|
|
10046
|
-
/* @__PURE__ */ (0,
|
|
9892
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: { padding: "24px", overflowY: "auto", flex: 1 }, children: [
|
|
9893
|
+
activeTab === "general" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
9894
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
9895
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { style: { display: "block", fontSize: "13px", fontWeight: 500, marginBottom: "6px", color: "var(--chatllm-text, #1a1a1a)" }, children: "\uD504\uB85C\uC81D\uD2B8 \uC774\uB984" }),
|
|
9896
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10047
9897
|
"input",
|
|
10048
9898
|
{
|
|
10049
9899
|
type: "text",
|
|
@@ -10065,9 +9915,9 @@ var ProjectSettingsModal = ({
|
|
|
10065
9915
|
}
|
|
10066
9916
|
)
|
|
10067
9917
|
] }),
|
|
10068
|
-
/* @__PURE__ */ (0,
|
|
10069
|
-
/* @__PURE__ */ (0,
|
|
10070
|
-
/* @__PURE__ */ (0,
|
|
9918
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
9919
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { style: { display: "block", fontSize: "13px", fontWeight: 500, marginBottom: "6px", color: "var(--chatllm-text, #1a1a1a)" }, children: "\uC124\uBA85" }),
|
|
9920
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10071
9921
|
"textarea",
|
|
10072
9922
|
{
|
|
10073
9923
|
value: description,
|
|
@@ -10088,9 +9938,9 @@ var ProjectSettingsModal = ({
|
|
|
10088
9938
|
}
|
|
10089
9939
|
)
|
|
10090
9940
|
] }),
|
|
10091
|
-
/* @__PURE__ */ (0,
|
|
10092
|
-
/* @__PURE__ */ (0,
|
|
10093
|
-
/* @__PURE__ */ (0,
|
|
9941
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
9942
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { style: { display: "block", fontSize: "13px", fontWeight: 500, marginBottom: "6px", color: "var(--chatllm-text, #1a1a1a)" }, children: "\uC0C9\uC0C1" }),
|
|
9943
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap" }, children: COLOR_PRESETS.map((c) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10094
9944
|
"button",
|
|
10095
9945
|
{
|
|
10096
9946
|
onClick: () => setColor(c),
|
|
@@ -10108,8 +9958,8 @@ var ProjectSettingsModal = ({
|
|
|
10108
9958
|
c
|
|
10109
9959
|
)) })
|
|
10110
9960
|
] }),
|
|
10111
|
-
/* @__PURE__ */ (0,
|
|
10112
|
-
!isDefaultProject && onDeleteProject && /* @__PURE__ */ (0,
|
|
9961
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: { display: "flex", gap: "8px", justifyContent: "flex-end", marginTop: "8px" }, children: [
|
|
9962
|
+
!isDefaultProject && onDeleteProject && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10113
9963
|
"button",
|
|
10114
9964
|
{
|
|
10115
9965
|
onClick: () => {
|
|
@@ -10132,7 +9982,7 @@ var ProjectSettingsModal = ({
|
|
|
10132
9982
|
children: "\uD504\uB85C\uC81D\uD2B8 \uC0AD\uC81C"
|
|
10133
9983
|
}
|
|
10134
9984
|
),
|
|
10135
|
-
/* @__PURE__ */ (0,
|
|
9985
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10136
9986
|
"button",
|
|
10137
9987
|
{
|
|
10138
9988
|
onClick: handleSaveGeneral,
|
|
@@ -10152,9 +10002,9 @@ var ProjectSettingsModal = ({
|
|
|
10152
10002
|
)
|
|
10153
10003
|
] })
|
|
10154
10004
|
] }),
|
|
10155
|
-
activeTab === "instructions" && /* @__PURE__ */ (0,
|
|
10156
|
-
/* @__PURE__ */ (0,
|
|
10157
|
-
/* @__PURE__ */ (0,
|
|
10005
|
+
activeTab === "instructions" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
10006
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { style: { fontSize: "13px", color: "var(--chatllm-text-muted, #999)", margin: 0 }, children: "\uC774 \uD504\uB85C\uC81D\uD2B8\uC758 \uBAA8\uB4E0 \uB300\uD654\uC5D0\uC11C AI\uAC00 \uB530\uB77C\uC57C \uD560 \uC9C0\uCE68\uC744 \uC785\uB825\uD558\uC138\uC694." }),
|
|
10007
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10158
10008
|
"textarea",
|
|
10159
10009
|
{
|
|
10160
10010
|
value: instructions,
|
|
@@ -10175,7 +10025,7 @@ var ProjectSettingsModal = ({
|
|
|
10175
10025
|
}
|
|
10176
10026
|
}
|
|
10177
10027
|
),
|
|
10178
|
-
/* @__PURE__ */ (0,
|
|
10028
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10179
10029
|
"button",
|
|
10180
10030
|
{
|
|
10181
10031
|
onClick: handleSaveInstructions,
|
|
@@ -10194,10 +10044,10 @@ var ProjectSettingsModal = ({
|
|
|
10194
10044
|
}
|
|
10195
10045
|
) })
|
|
10196
10046
|
] }),
|
|
10197
|
-
activeTab === "files" && /* @__PURE__ */ (0,
|
|
10198
|
-
/* @__PURE__ */ (0,
|
|
10199
|
-
/* @__PURE__ */ (0,
|
|
10200
|
-
/* @__PURE__ */ (0,
|
|
10047
|
+
activeTab === "files" && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
10048
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
10049
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { style: { fontSize: "13px", color: "var(--chatllm-text-muted, #999)", margin: 0 }, children: "\uD504\uB85C\uC81D\uD2B8 \uCEE8\uD14D\uC2A4\uD2B8\uB85C \uC0AC\uC6A9\uD560 \uD30C\uC77C\uC744 \uAD00\uB9AC\uD569\uB2C8\uB2E4." }),
|
|
10050
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
10201
10051
|
"button",
|
|
10202
10052
|
{
|
|
10203
10053
|
onClick: handleFileUpload,
|
|
@@ -10215,13 +10065,13 @@ var ProjectSettingsModal = ({
|
|
|
10215
10065
|
color: "var(--chatllm-text, #1a1a1a)"
|
|
10216
10066
|
},
|
|
10217
10067
|
children: [
|
|
10218
|
-
/* @__PURE__ */ (0,
|
|
10068
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconSvg, { name: "upload-line", size: 14 }),
|
|
10219
10069
|
"\uC5C5\uB85C\uB4DC"
|
|
10220
10070
|
]
|
|
10221
10071
|
}
|
|
10222
10072
|
)
|
|
10223
10073
|
] }),
|
|
10224
|
-
project.files.length === 0 ? /* @__PURE__ */ (0,
|
|
10074
|
+
project.files.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10225
10075
|
"div",
|
|
10226
10076
|
{
|
|
10227
10077
|
style: {
|
|
@@ -10234,7 +10084,7 @@ var ProjectSettingsModal = ({
|
|
|
10234
10084
|
},
|
|
10235
10085
|
children: "\uC544\uC9C1 \uD30C\uC77C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"
|
|
10236
10086
|
}
|
|
10237
|
-
) : /* @__PURE__ */ (0,
|
|
10087
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: project.files.map((file) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
10238
10088
|
"div",
|
|
10239
10089
|
{
|
|
10240
10090
|
style: {
|
|
@@ -10246,10 +10096,10 @@ var ProjectSettingsModal = ({
|
|
|
10246
10096
|
borderRadius: "6px"
|
|
10247
10097
|
},
|
|
10248
10098
|
children: [
|
|
10249
|
-
/* @__PURE__ */ (0,
|
|
10250
|
-
/* @__PURE__ */ (0,
|
|
10251
|
-
/* @__PURE__ */ (0,
|
|
10252
|
-
/* @__PURE__ */ (0,
|
|
10099
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "10px", overflow: "hidden" }, children: [
|
|
10100
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconSvg, { name: getFileIcon2(file.type), size: 18, color: "var(--chatllm-text-muted, #999)" }),
|
|
10101
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: { overflow: "hidden" }, children: [
|
|
10102
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10253
10103
|
"div",
|
|
10254
10104
|
{
|
|
10255
10105
|
style: {
|
|
@@ -10263,13 +10113,13 @@ var ProjectSettingsModal = ({
|
|
|
10263
10113
|
children: file.name
|
|
10264
10114
|
}
|
|
10265
10115
|
),
|
|
10266
|
-
/* @__PURE__ */ (0,
|
|
10116
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: { fontSize: "11px", color: "var(--chatllm-text-muted, #999)" }, children: [
|
|
10267
10117
|
file.type,
|
|
10268
10118
|
formatSize(file.size) ? ` \xB7 ${formatSize(file.size)}` : ""
|
|
10269
10119
|
] })
|
|
10270
10120
|
] })
|
|
10271
10121
|
] }),
|
|
10272
|
-
/* @__PURE__ */ (0,
|
|
10122
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
10273
10123
|
"button",
|
|
10274
10124
|
{
|
|
10275
10125
|
onClick: () => onDeleteFile(project.id, file.id),
|
|
@@ -10290,7 +10140,7 @@ var ProjectSettingsModal = ({
|
|
|
10290
10140
|
e.currentTarget.style.opacity = "0.5";
|
|
10291
10141
|
},
|
|
10292
10142
|
"aria-label": `${file.name} \uC0AD\uC81C`,
|
|
10293
|
-
children: /* @__PURE__ */ (0,
|
|
10143
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconSvg, { name: "delete-bin-line", size: 16, color: "#dc2626" })
|
|
10294
10144
|
}
|
|
10295
10145
|
)
|
|
10296
10146
|
]
|
|
@@ -10307,14 +10157,14 @@ var ProjectSettingsModal = ({
|
|
|
10307
10157
|
};
|
|
10308
10158
|
|
|
10309
10159
|
// src/react/components/DisclaimerModal.tsx
|
|
10310
|
-
var
|
|
10160
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
10311
10161
|
var highlightStyle = {
|
|
10312
10162
|
color: "var(--chatllm-text, #1e293b)",
|
|
10313
10163
|
fontWeight: 600
|
|
10314
10164
|
};
|
|
10315
10165
|
var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
10316
10166
|
if (!isOpen) return null;
|
|
10317
|
-
return /* @__PURE__ */ (0,
|
|
10167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10318
10168
|
"div",
|
|
10319
10169
|
{
|
|
10320
10170
|
className: "chatllm-disclaimer-overlay",
|
|
@@ -10328,7 +10178,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10328
10178
|
zIndex: 1e3
|
|
10329
10179
|
},
|
|
10330
10180
|
onClick: onClose,
|
|
10331
|
-
children: /* @__PURE__ */ (0,
|
|
10181
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
10332
10182
|
"div",
|
|
10333
10183
|
{
|
|
10334
10184
|
className: "chatllm-disclaimer-modal",
|
|
@@ -10346,7 +10196,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10346
10196
|
},
|
|
10347
10197
|
onClick: (e) => e.stopPropagation(),
|
|
10348
10198
|
children: [
|
|
10349
|
-
/* @__PURE__ */ (0,
|
|
10199
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
10350
10200
|
"div",
|
|
10351
10201
|
{
|
|
10352
10202
|
style: {
|
|
@@ -10357,9 +10207,9 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10357
10207
|
borderBottom: "1px solid var(--chatllm-border, #e5e7eb)"
|
|
10358
10208
|
},
|
|
10359
10209
|
children: [
|
|
10360
|
-
/* @__PURE__ */ (0,
|
|
10361
|
-
/* @__PURE__ */ (0,
|
|
10362
|
-
/* @__PURE__ */ (0,
|
|
10210
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
10211
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(IconSvg, { name: "error-warning-line", size: 20, color: "var(--chatllm-primary, #4A90E2)" }),
|
|
10212
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10363
10213
|
"h2",
|
|
10364
10214
|
{
|
|
10365
10215
|
style: {
|
|
@@ -10372,7 +10222,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10372
10222
|
}
|
|
10373
10223
|
)
|
|
10374
10224
|
] }),
|
|
10375
|
-
/* @__PURE__ */ (0,
|
|
10225
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10376
10226
|
"button",
|
|
10377
10227
|
{
|
|
10378
10228
|
onClick: onClose,
|
|
@@ -10387,13 +10237,13 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10387
10237
|
alignItems: "center",
|
|
10388
10238
|
justifyContent: "center"
|
|
10389
10239
|
},
|
|
10390
|
-
children: /* @__PURE__ */ (0,
|
|
10240
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(IconSvg, { name: "close-line", size: 20, color: "var(--chatllm-text-muted, #64748b)" })
|
|
10391
10241
|
}
|
|
10392
10242
|
)
|
|
10393
10243
|
]
|
|
10394
10244
|
}
|
|
10395
10245
|
),
|
|
10396
|
-
/* @__PURE__ */ (0,
|
|
10246
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
10397
10247
|
"div",
|
|
10398
10248
|
{
|
|
10399
10249
|
className: "chatllm-scrollbar",
|
|
@@ -10405,12 +10255,12 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10405
10255
|
color: "var(--chatllm-text-secondary, #475569)"
|
|
10406
10256
|
},
|
|
10407
10257
|
children: [
|
|
10408
|
-
/* @__PURE__ */ (0,
|
|
10258
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { style: { margin: "0 0 16px" }, children: [
|
|
10409
10259
|
"\uC800\uB294 \uC5EC\uB7EC\uBD84\uC758 \uC9C8\uBB38\uC5D0 ",
|
|
10410
|
-
/* @__PURE__ */ (0,
|
|
10260
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { style: highlightStyle, children: "\uCD5C\uC120\uC758 \uB2F5\uBCC0\uC744 \uB4DC\uB9AC\uAE30 \uC704\uD574 \uD56D\uC0C1 \uB178\uB825" }),
|
|
10411
10261
|
"\uD558\uACE0 \uC788\uC5B4\uC694. \uD558\uC9C0\uB9CC \uC194\uC9C1\uD558\uAC8C \uB9D0\uC500\uB4DC\uB9AC\uBA74, \uC800\uB3C4 \uB54C\uB54C\uB85C \uC2E4\uC218\uB97C \uD558\uAC70\uB098 \uC815\uD655\uD558\uC9C0 \uC54A\uC740 \uB2F5\uBCC0\uC744 \uB4DC\uB9B4 \uC218 \uC788\uC2B5\uB2C8\uB2E4."
|
|
10412
10262
|
] }),
|
|
10413
|
-
/* @__PURE__ */ (0,
|
|
10263
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
10414
10264
|
"div",
|
|
10415
10265
|
{
|
|
10416
10266
|
style: {
|
|
@@ -10423,33 +10273,33 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10423
10273
|
lineHeight: 1.7
|
|
10424
10274
|
},
|
|
10425
10275
|
children: [
|
|
10426
|
-
/* @__PURE__ */ (0,
|
|
10427
|
-
/* @__PURE__ */ (0,
|
|
10428
|
-
/* @__PURE__ */ (0,
|
|
10429
|
-
/* @__PURE__ */ (0,
|
|
10430
|
-
/* @__PURE__ */ (0,
|
|
10276
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { style: { margin: "0 0 8px", fontWeight: 600, color: "var(--chatllm-text, #1e293b)" }, children: "\uC81C\uAC00 \uC774\uB7F0 \uC2E4\uC218\uB97C \uD560 \uC218 \uC788\uC5B4\uC694" }),
|
|
10277
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("ul", { style: { margin: 0, paddingLeft: "18px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
10278
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("li", { children: "\uCD5C\uC2E0 \uC815\uBCF4\uB97C \uBC18\uC601\uD558\uC9C0 \uBABB\uD55C \uB2F5\uBCC0\uC744 \uB4DC\uB9AC\uB294 \uACBD\uC6B0" }),
|
|
10279
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("li", { children: "\uADF8\uB7F4\uB4EF\uD558\uAC8C \uB4E4\uB9AC\uC9C0\uB9CC \uC2E4\uC81C\uB85C\uB294 \uC815\uD655\uD558\uC9C0 \uC54A\uC740 \uB0B4\uC6A9" }),
|
|
10280
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("li", { children: "\uC2E4\uC81C\uB85C \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 \uCD9C\uCC98\uB098 \uC778\uC6A9\uC744 \uB9CC\uB4E4\uC5B4\uB0B4\uB294 \uACBD\uC6B0" })
|
|
10431
10281
|
] })
|
|
10432
10282
|
]
|
|
10433
10283
|
}
|
|
10434
10284
|
),
|
|
10435
|
-
/* @__PURE__ */ (0,
|
|
10285
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { style: { margin: "0 0 16px" }, children: [
|
|
10436
10286
|
"\uC774\uB7F0 \uD604\uC0C1\uC744 ",
|
|
10437
|
-
/* @__PURE__ */ (0,
|
|
10287
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { style: highlightStyle, children: "'\uD658\uAC01(Hallucination)'" }),
|
|
10438
10288
|
"\uC774\uB77C\uACE0 \uBD80\uB974\uB294\uB370\uC694, \uC544\uC9C1\uC740 \uC800\uC640 \uAC19\uC740 AI\uAC00 \uAC00\uC9C4 \uADFC\uBCF8\uC801\uC778 \uD55C\uACC4\uC608\uC694. \uC81C \uB2F5\uBCC0\uC774 \uC544\uBB34\uB9AC \uC790\uC5F0\uC2A4\uB7EC\uC6CC \uBCF4\uC5EC\uB3C4, ",
|
|
10439
|
-
/* @__PURE__ */ (0,
|
|
10289
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { style: highlightStyle, children: "\uD55C \uBC88 \uB354 \uD655\uC778" }),
|
|
10440
10290
|
"\uD574 \uC8FC\uC2DC\uBA74 \uAC10\uC0AC\uD558\uACA0\uC2B5\uB2C8\uB2E4."
|
|
10441
10291
|
] }),
|
|
10442
|
-
/* @__PURE__ */ (0,
|
|
10443
|
-
/* @__PURE__ */ (0,
|
|
10292
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { style: { margin: "0 0 16px" }, children: [
|
|
10293
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { style: highlightStyle, children: "\uC81C \uB2F5\uBCC0\uC740 \uCC38\uACE0 \uC790\uB8CC" }),
|
|
10444
10294
|
"\uB85C \uD65C\uC6A9\uD574 \uC8FC\uC2DC\uACE0, \uC911\uC694\uD55C \uD310\uB2E8\uC744 \uB0B4\uB9AC\uC2E4 \uB54C\uB294 \uAF2D \uCD94\uAC00\uB85C \uD655\uC778\uD574 \uC8FC\uC138\uC694. \uC800\uB3C4 \uB354 \uC815\uD655\uD55C \uB2F5\uBCC0\uC744 \uB4DC\uB9AC\uAE30 \uC704\uD574 \uACC4\uC18D \uBC1C\uC804\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4."
|
|
10445
10295
|
] }),
|
|
10446
|
-
/* @__PURE__ */ (0,
|
|
10296
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { style: { margin: "0 0 16px" }, children: [
|
|
10447
10297
|
"\uC81C\uAC00 \uC6F9 \uAC80\uC0C9 \uACB0\uACFC\uB97C \uC54C\uB824\uB4DC\uB9B4 \uB54C\uB3C4,",
|
|
10448
10298
|
" ",
|
|
10449
|
-
/* @__PURE__ */ (0,
|
|
10299
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { style: highlightStyle, children: "\uC6D0\uBCF8 \uCD9C\uCC98\uB97C \uC9C1\uC811 \uD655\uC778" }),
|
|
10450
10300
|
"\uD574 \uBCF4\uC2DC\uB294 \uAC78 \uCD94\uCC9C\uB4DC\uB824\uC694. \uC694\uC57D \uACFC\uC815\uC5D0\uC11C \uB193\uCE60 \uC218 \uC788\uB294 \uC911\uC694\uD55C \uB9E5\uB77D\uC774 \uC6D0\uBCF8\uC5D0 \uB2F4\uACA8 \uC788\uC744 \uC218 \uC788\uAC70\uB4E0\uC694."
|
|
10451
10301
|
] }),
|
|
10452
|
-
/* @__PURE__ */ (0,
|
|
10302
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10453
10303
|
"div",
|
|
10454
10304
|
{
|
|
10455
10305
|
style: {
|
|
@@ -10460,10 +10310,10 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10460
10310
|
lineHeight: 1.7,
|
|
10461
10311
|
textAlign: "center"
|
|
10462
10312
|
},
|
|
10463
|
-
children: /* @__PURE__ */ (0,
|
|
10313
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("p", { style: { margin: 0 }, children: [
|
|
10464
10314
|
"\uC800\uC5D0 \uB300\uD55C \uC758\uACAC\uC774\uB098 \uAC1C\uC120 \uC81C\uC548\uC774 \uC788\uC73C\uC2DC\uB2E4\uBA74",
|
|
10465
10315
|
" ",
|
|
10466
|
-
/* @__PURE__ */ (0,
|
|
10316
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10467
10317
|
"a",
|
|
10468
10318
|
{
|
|
10469
10319
|
href: "mailto:info@gendive.ai",
|
|
@@ -10476,7 +10326,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10476
10326
|
}
|
|
10477
10327
|
),
|
|
10478
10328
|
"\uB85C \uC54C\uB824\uC8FC\uC138\uC694.",
|
|
10479
|
-
/* @__PURE__ */ (0,
|
|
10329
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("br", {}),
|
|
10480
10330
|
"\uC5EC\uB7EC\uBD84\uC758 \uD53C\uB4DC\uBC31 \uD558\uB098\uD558\uB098\uAC00 \uC81C\uAC00 \uC131\uC7A5\uD558\uB294 \uB370 \uD070 \uD798\uC774 \uB429\uB2C8\uB2E4."
|
|
10481
10331
|
] })
|
|
10482
10332
|
}
|
|
@@ -10492,7 +10342,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10492
10342
|
};
|
|
10493
10343
|
|
|
10494
10344
|
// src/react/ChatUI.tsx
|
|
10495
|
-
var
|
|
10345
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
10496
10346
|
var DEFAULT_ACTIONS = [];
|
|
10497
10347
|
var DEFAULT_TEMPLATES = [];
|
|
10498
10348
|
var DEFAULT_MODELS = [
|
|
@@ -10535,6 +10385,16 @@ var injectStyles = () => {
|
|
|
10535
10385
|
100% { transform: rotate(360deg); }
|
|
10536
10386
|
}
|
|
10537
10387
|
|
|
10388
|
+
@keyframes chatllm-welcome-exit {
|
|
10389
|
+
from { opacity: 1; transform: translateY(0); }
|
|
10390
|
+
to { opacity: 0; transform: translateY(-16px); }
|
|
10391
|
+
}
|
|
10392
|
+
|
|
10393
|
+
@keyframes chatllm-chat-enter {
|
|
10394
|
+
from { opacity: 0; }
|
|
10395
|
+
to { opacity: 1; }
|
|
10396
|
+
}
|
|
10397
|
+
|
|
10538
10398
|
.chatllm-root {
|
|
10539
10399
|
--chatllm-primary: #4A90E2;
|
|
10540
10400
|
--chatllm-primary-hover: #357ABD;
|
|
@@ -10740,7 +10600,8 @@ var ChatUIView = ({
|
|
|
10740
10600
|
className,
|
|
10741
10601
|
apiKey,
|
|
10742
10602
|
onApiKeyChange,
|
|
10743
|
-
deepResearchEnabled
|
|
10603
|
+
deepResearchEnabled,
|
|
10604
|
+
suggestedPrompts
|
|
10744
10605
|
}) => {
|
|
10745
10606
|
const {
|
|
10746
10607
|
sessions,
|
|
@@ -10808,6 +10669,19 @@ var ChatUIView = ({
|
|
|
10808
10669
|
isSessionsLoading
|
|
10809
10670
|
} = state;
|
|
10810
10671
|
const [disclaimerOpen, setDisclaimerOpen] = import_react20.default.useState(false);
|
|
10672
|
+
const [welcomeExiting, setWelcomeExiting] = import_react20.default.useState(false);
|
|
10673
|
+
const prevMessageCountRef = import_react20.default.useRef(messages.length);
|
|
10674
|
+
import_react20.default.useEffect(() => {
|
|
10675
|
+
let timer;
|
|
10676
|
+
if (prevMessageCountRef.current === 0 && messages.length > 0) {
|
|
10677
|
+
setWelcomeExiting(true);
|
|
10678
|
+
timer = setTimeout(() => setWelcomeExiting(false), 400);
|
|
10679
|
+
}
|
|
10680
|
+
prevMessageCountRef.current = messages.length;
|
|
10681
|
+
return () => {
|
|
10682
|
+
if (timer) clearTimeout(timer);
|
|
10683
|
+
};
|
|
10684
|
+
}, [messages.length]);
|
|
10811
10685
|
const greeting = currentPersonalization.userProfile.nickname ? `\uC548\uB155\uD558\uC138\uC694, ${currentPersonalization.userProfile.nickname}\uB2D8` : "\uC548\uB155\uD558\uC138\uC694";
|
|
10812
10686
|
const handleTemplateClick = (template) => {
|
|
10813
10687
|
setInput(template.prompt);
|
|
@@ -10850,7 +10724,7 @@ var ChatUIView = ({
|
|
|
10850
10724
|
return items;
|
|
10851
10725
|
}, [projectMemory?.state.entries]);
|
|
10852
10726
|
const themeClass = theme?.mode === "dark" ? "chatllm-dark" : "";
|
|
10853
|
-
return /* @__PURE__ */ (0,
|
|
10727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
10854
10728
|
"div",
|
|
10855
10729
|
{
|
|
10856
10730
|
className: `chatllm-root ${themeClass} ${className}`,
|
|
@@ -10863,7 +10737,7 @@ var ChatUIView = ({
|
|
|
10863
10737
|
position: "relative"
|
|
10864
10738
|
},
|
|
10865
10739
|
children: [
|
|
10866
|
-
showSidebar && /* @__PURE__ */ (0,
|
|
10740
|
+
showSidebar && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10867
10741
|
ChatSidebar,
|
|
10868
10742
|
{
|
|
10869
10743
|
sessions,
|
|
@@ -10895,7 +10769,7 @@ var ChatUIView = ({
|
|
|
10895
10769
|
isLoading: isSessionsLoading
|
|
10896
10770
|
}
|
|
10897
10771
|
),
|
|
10898
|
-
/* @__PURE__ */ (0,
|
|
10772
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
10899
10773
|
"main",
|
|
10900
10774
|
{
|
|
10901
10775
|
style: {
|
|
@@ -10907,7 +10781,7 @@ var ChatUIView = ({
|
|
|
10907
10781
|
minWidth: 0
|
|
10908
10782
|
},
|
|
10909
10783
|
children: [
|
|
10910
|
-
/* @__PURE__ */ (0,
|
|
10784
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10911
10785
|
ChatHeader,
|
|
10912
10786
|
{
|
|
10913
10787
|
title: currentSession?.title || "\uC0C8 \uB300\uD654",
|
|
@@ -10921,68 +10795,158 @@ var ChatUIView = ({
|
|
|
10921
10795
|
showSettings
|
|
10922
10796
|
}
|
|
10923
10797
|
),
|
|
10924
|
-
messages.length === 0
|
|
10925
|
-
|
|
10926
|
-
{
|
|
10927
|
-
greeting,
|
|
10928
|
-
templates,
|
|
10929
|
-
onTemplateClick: handleTemplateClick,
|
|
10930
|
-
actions,
|
|
10931
|
-
onActionSelect: handleActionSelect
|
|
10932
|
-
}
|
|
10933
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
10934
|
-
MessageList,
|
|
10798
|
+
(messages.length === 0 || welcomeExiting) && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
10799
|
+
"div",
|
|
10935
10800
|
{
|
|
10936
|
-
|
|
10937
|
-
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
10945
|
-
|
|
10946
|
-
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
|
|
10801
|
+
style: {
|
|
10802
|
+
...messages.length > 0 ? { position: "absolute", inset: 0, zIndex: 5, background: "var(--chatllm-bg)" } : { flex: 1 },
|
|
10803
|
+
display: "flex",
|
|
10804
|
+
flexDirection: "column",
|
|
10805
|
+
justifyContent: "center",
|
|
10806
|
+
alignItems: "center",
|
|
10807
|
+
padding: "24px",
|
|
10808
|
+
gap: "24px",
|
|
10809
|
+
animation: welcomeExiting ? "chatllm-welcome-exit 0.3s ease forwards" : "none",
|
|
10810
|
+
pointerEvents: welcomeExiting ? "none" : "auto"
|
|
10811
|
+
},
|
|
10812
|
+
children: [
|
|
10813
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10814
|
+
"h1",
|
|
10815
|
+
{
|
|
10816
|
+
style: {
|
|
10817
|
+
fontSize: "26px",
|
|
10818
|
+
fontWeight: 600,
|
|
10819
|
+
color: "var(--chatllm-text)",
|
|
10820
|
+
margin: 0,
|
|
10821
|
+
textAlign: "center",
|
|
10822
|
+
lineHeight: 1.4
|
|
10823
|
+
},
|
|
10824
|
+
children: greeting ? `${greeting} \u273A` : "\u273A \uBB34\uC5C7\uC744 \uC0DD\uAC01\uD574 \uBCFC\uAE4C\uC694?"
|
|
10825
|
+
}
|
|
10826
|
+
),
|
|
10827
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { width: "100%", maxWidth: "680px" }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10828
|
+
ChatInput,
|
|
10829
|
+
{
|
|
10830
|
+
value: input,
|
|
10831
|
+
onChange: setInput,
|
|
10832
|
+
onSubmit: handleSubmit,
|
|
10833
|
+
onStop: stopGeneration,
|
|
10834
|
+
isLoading,
|
|
10835
|
+
placeholder: "\uBA54\uC2DC\uC9C0\uB97C \uC785\uB825\uD558\uC138\uC694...",
|
|
10836
|
+
quotedText,
|
|
10837
|
+
onClearQuote: () => setQuotedText(null),
|
|
10838
|
+
selectedAction,
|
|
10839
|
+
onClearAction: () => setSelectedAction(null),
|
|
10840
|
+
onActionSelect: setSelectedAction,
|
|
10841
|
+
actions,
|
|
10842
|
+
onDeepResearch: toggleDeepResearchMode,
|
|
10843
|
+
isDeepResearchMode,
|
|
10844
|
+
deepResearchEnabled,
|
|
10845
|
+
manualSkills,
|
|
10846
|
+
onSkillSelect: executeManualSkill,
|
|
10847
|
+
activeSkillExecution,
|
|
10848
|
+
attachments,
|
|
10849
|
+
onFileAttach: addAttachments,
|
|
10850
|
+
onRemoveAttachment: removeAttachment,
|
|
10851
|
+
onDisclaimerClick: () => setDisclaimerOpen(true),
|
|
10852
|
+
inline: true
|
|
10853
|
+
}
|
|
10854
|
+
) }),
|
|
10855
|
+
suggestedPrompts && suggestedPrompts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10856
|
+
"div",
|
|
10857
|
+
{
|
|
10858
|
+
style: {
|
|
10859
|
+
display: "flex",
|
|
10860
|
+
flexWrap: "wrap",
|
|
10861
|
+
gap: "8px",
|
|
10862
|
+
justifyContent: "center",
|
|
10863
|
+
maxWidth: "680px"
|
|
10864
|
+
},
|
|
10865
|
+
children: suggestedPrompts.map((sp) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
10866
|
+
"button",
|
|
10867
|
+
{
|
|
10868
|
+
onClick: () => setInput(sp.prompt),
|
|
10869
|
+
style: {
|
|
10870
|
+
display: "flex",
|
|
10871
|
+
alignItems: "center",
|
|
10872
|
+
gap: "6px",
|
|
10873
|
+
padding: "8px 16px",
|
|
10874
|
+
borderRadius: "20px",
|
|
10875
|
+
border: "1px solid var(--chatllm-border)",
|
|
10876
|
+
background: "var(--chatllm-content-bg)",
|
|
10877
|
+
color: "var(--chatllm-text-secondary)",
|
|
10878
|
+
fontSize: "13px",
|
|
10879
|
+
fontFamily: "inherit",
|
|
10880
|
+
cursor: "pointer",
|
|
10881
|
+
transition: "all 0.2s"
|
|
10882
|
+
},
|
|
10883
|
+
children: [
|
|
10884
|
+
sp.icon && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(IconSvg, { name: sp.icon, size: 16, color: "var(--chatllm-text-muted)" }),
|
|
10885
|
+
sp.label
|
|
10886
|
+
]
|
|
10887
|
+
},
|
|
10888
|
+
sp.id
|
|
10889
|
+
))
|
|
10890
|
+
}
|
|
10891
|
+
)
|
|
10892
|
+
]
|
|
10953
10893
|
}
|
|
10954
10894
|
),
|
|
10955
|
-
/* @__PURE__ */ (0,
|
|
10956
|
-
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10966
|
-
|
|
10967
|
-
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
|
|
10971
|
-
|
|
10972
|
-
|
|
10973
|
-
|
|
10974
|
-
|
|
10975
|
-
|
|
10976
|
-
|
|
10977
|
-
|
|
10978
|
-
|
|
10979
|
-
|
|
10980
|
-
|
|
10981
|
-
|
|
10895
|
+
messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
10896
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10897
|
+
MessageList,
|
|
10898
|
+
{
|
|
10899
|
+
messages,
|
|
10900
|
+
isLoading,
|
|
10901
|
+
onCopy: copyMessage,
|
|
10902
|
+
onEdit: startEdit,
|
|
10903
|
+
onRegenerate: regenerate,
|
|
10904
|
+
onQuote: setQuotedText,
|
|
10905
|
+
onAskOtherModel: (userMessageId, assistantMessageId, targetModel) => askOtherModel(assistantMessageId, targetModel),
|
|
10906
|
+
onSetActiveAlternative: setActiveAlternative,
|
|
10907
|
+
activeAlternatives,
|
|
10908
|
+
models: hookModels,
|
|
10909
|
+
copiedId: copiedMessageId,
|
|
10910
|
+
editingId: editingMessageId,
|
|
10911
|
+
onChoiceClick: handleChoiceClick,
|
|
10912
|
+
showThinking,
|
|
10913
|
+
thinkingDefaultOpen,
|
|
10914
|
+
loadingAlternativeFor,
|
|
10915
|
+
onPollSubmit: handlePollSubmit
|
|
10916
|
+
}
|
|
10917
|
+
),
|
|
10918
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10919
|
+
ChatInput,
|
|
10920
|
+
{
|
|
10921
|
+
value: input,
|
|
10922
|
+
onChange: setInput,
|
|
10923
|
+
onSubmit: handleSubmit,
|
|
10924
|
+
onStop: stopGeneration,
|
|
10925
|
+
isLoading,
|
|
10926
|
+
placeholder: "\uBA54\uC2DC\uC9C0\uB97C \uC785\uB825\uD558\uC138\uC694...",
|
|
10927
|
+
quotedText,
|
|
10928
|
+
onClearQuote: () => setQuotedText(null),
|
|
10929
|
+
selectedAction,
|
|
10930
|
+
onClearAction: () => setSelectedAction(null),
|
|
10931
|
+
onActionSelect: setSelectedAction,
|
|
10932
|
+
actions,
|
|
10933
|
+
onDeepResearch: toggleDeepResearchMode,
|
|
10934
|
+
isDeepResearchMode,
|
|
10935
|
+
deepResearchEnabled,
|
|
10936
|
+
manualSkills,
|
|
10937
|
+
onSkillSelect: executeManualSkill,
|
|
10938
|
+
activeSkillExecution,
|
|
10939
|
+
attachments,
|
|
10940
|
+
onFileAttach: addAttachments,
|
|
10941
|
+
onRemoveAttachment: removeAttachment,
|
|
10942
|
+
onDisclaimerClick: () => setDisclaimerOpen(true)
|
|
10943
|
+
}
|
|
10944
|
+
)
|
|
10945
|
+
] })
|
|
10982
10946
|
]
|
|
10983
10947
|
}
|
|
10984
10948
|
),
|
|
10985
|
-
showSettings && /* @__PURE__ */ (0,
|
|
10949
|
+
showSettings && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
10986
10950
|
SettingsModal,
|
|
10987
10951
|
{
|
|
10988
10952
|
isOpen: settingsOpen,
|
|
@@ -11009,7 +10973,7 @@ var ChatUIView = ({
|
|
|
11009
10973
|
currentProjectTitle: currentProject?.title
|
|
11010
10974
|
}
|
|
11011
10975
|
),
|
|
11012
|
-
/* @__PURE__ */ (0,
|
|
10976
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
11013
10977
|
ProjectSettingsModal,
|
|
11014
10978
|
{
|
|
11015
10979
|
isOpen: projectSettingsOpen,
|
|
@@ -11021,7 +10985,7 @@ var ChatUIView = ({
|
|
|
11021
10985
|
onDeleteProject: deleteProject
|
|
11022
10986
|
}
|
|
11023
10987
|
),
|
|
11024
|
-
/* @__PURE__ */ (0,
|
|
10988
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DisclaimerModal, { isOpen: disclaimerOpen, onClose: () => setDisclaimerOpen(false) })
|
|
11025
10989
|
]
|
|
11026
10990
|
}
|
|
11027
10991
|
);
|
|
@@ -11030,6 +10994,7 @@ var ChatUIWithHook = ({
|
|
|
11030
10994
|
models = DEFAULT_MODELS,
|
|
11031
10995
|
actions = DEFAULT_ACTIONS,
|
|
11032
10996
|
templates = DEFAULT_TEMPLATES,
|
|
10997
|
+
suggestedPrompts,
|
|
11033
10998
|
personalization,
|
|
11034
10999
|
onPersonalizationChange,
|
|
11035
11000
|
onPersonalizationSave,
|
|
@@ -11123,7 +11088,7 @@ var ChatUIWithHook = ({
|
|
|
11123
11088
|
onDeleteProjectFile
|
|
11124
11089
|
};
|
|
11125
11090
|
const state = useChatUI(hookOptions);
|
|
11126
|
-
return /* @__PURE__ */ (0,
|
|
11091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
11127
11092
|
ChatUIView,
|
|
11128
11093
|
{
|
|
11129
11094
|
state,
|
|
@@ -11143,7 +11108,8 @@ var ChatUIWithHook = ({
|
|
|
11143
11108
|
className,
|
|
11144
11109
|
apiKey,
|
|
11145
11110
|
onApiKeyChange,
|
|
11146
|
-
deepResearchEnabled: !!deepResearch?.onWebSearch
|
|
11111
|
+
deepResearchEnabled: !!deepResearch?.onWebSearch,
|
|
11112
|
+
suggestedPrompts
|
|
11147
11113
|
}
|
|
11148
11114
|
);
|
|
11149
11115
|
};
|
|
@@ -11167,9 +11133,10 @@ var ChatUI = (props) => {
|
|
|
11167
11133
|
className = "",
|
|
11168
11134
|
apiKey,
|
|
11169
11135
|
onApiKeyChange,
|
|
11170
|
-
deepResearch
|
|
11136
|
+
deepResearch,
|
|
11137
|
+
suggestedPrompts: chatStateSuggestedPrompts
|
|
11171
11138
|
} = props;
|
|
11172
|
-
return /* @__PURE__ */ (0,
|
|
11139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
11173
11140
|
ChatUIView,
|
|
11174
11141
|
{
|
|
11175
11142
|
state: props.chatState,
|
|
@@ -11189,11 +11156,12 @@ var ChatUI = (props) => {
|
|
|
11189
11156
|
className,
|
|
11190
11157
|
apiKey,
|
|
11191
11158
|
onApiKeyChange,
|
|
11192
|
-
deepResearchEnabled: !!deepResearch?.onWebSearch
|
|
11159
|
+
deepResearchEnabled: !!deepResearch?.onWebSearch,
|
|
11160
|
+
suggestedPrompts: chatStateSuggestedPrompts
|
|
11193
11161
|
}
|
|
11194
11162
|
);
|
|
11195
11163
|
}
|
|
11196
|
-
return /* @__PURE__ */ (0,
|
|
11164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChatUIWithHook, { ...props });
|
|
11197
11165
|
};
|
|
11198
11166
|
|
|
11199
11167
|
// src/react/hooks/useDeepResearch.ts
|
|
@@ -11510,6 +11478,144 @@ var useDeepResearch = (options) => {
|
|
|
11510
11478
|
};
|
|
11511
11479
|
};
|
|
11512
11480
|
|
|
11481
|
+
// src/react/components/EmptyState.tsx
|
|
11482
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
11483
|
+
var EmptyState = ({
|
|
11484
|
+
greeting,
|
|
11485
|
+
templates = [],
|
|
11486
|
+
onTemplateClick,
|
|
11487
|
+
actions = [],
|
|
11488
|
+
onActionSelect
|
|
11489
|
+
}) => {
|
|
11490
|
+
const getActionIcon = (icon) => {
|
|
11491
|
+
const iconMap = {
|
|
11492
|
+
search: "search-line",
|
|
11493
|
+
image: "image-line",
|
|
11494
|
+
code: "code-s-slash-line",
|
|
11495
|
+
document: "file-text-line"
|
|
11496
|
+
};
|
|
11497
|
+
return iconMap[icon] || "sparkling-line";
|
|
11498
|
+
};
|
|
11499
|
+
const hasContent = actions.length > 0 || templates.length > 0;
|
|
11500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
11501
|
+
"div",
|
|
11502
|
+
{
|
|
11503
|
+
className: "chatllm-empty-state",
|
|
11504
|
+
style: {
|
|
11505
|
+
flex: 1,
|
|
11506
|
+
display: "flex",
|
|
11507
|
+
flexDirection: "column",
|
|
11508
|
+
alignItems: "center",
|
|
11509
|
+
justifyContent: hasContent ? "center" : "flex-end",
|
|
11510
|
+
padding: "48px 24px",
|
|
11511
|
+
paddingBottom: hasContent ? "200px" : "32px",
|
|
11512
|
+
textAlign: "center"
|
|
11513
|
+
},
|
|
11514
|
+
children: [
|
|
11515
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
11516
|
+
"div",
|
|
11517
|
+
{
|
|
11518
|
+
className: "chatllm-sheet",
|
|
11519
|
+
style: {
|
|
11520
|
+
width: "64px",
|
|
11521
|
+
height: "64px",
|
|
11522
|
+
borderRadius: "16px",
|
|
11523
|
+
display: "flex",
|
|
11524
|
+
alignItems: "center",
|
|
11525
|
+
justifyContent: "center",
|
|
11526
|
+
marginBottom: "32px",
|
|
11527
|
+
color: "var(--chatllm-primary)"
|
|
11528
|
+
},
|
|
11529
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(IconSvg, { name: "chat-1-line", size: 40 })
|
|
11530
|
+
}
|
|
11531
|
+
),
|
|
11532
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
11533
|
+
"h1",
|
|
11534
|
+
{
|
|
11535
|
+
style: {
|
|
11536
|
+
fontSize: "30px",
|
|
11537
|
+
fontWeight: 700,
|
|
11538
|
+
color: "var(--chatllm-text)",
|
|
11539
|
+
marginBottom: hasContent ? "40px" : "0",
|
|
11540
|
+
lineHeight: 1.3
|
|
11541
|
+
},
|
|
11542
|
+
children: "How can I help you today?"
|
|
11543
|
+
}
|
|
11544
|
+
),
|
|
11545
|
+
(actions.length > 0 || templates.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
11546
|
+
"div",
|
|
11547
|
+
{
|
|
11548
|
+
style: {
|
|
11549
|
+
display: "flex",
|
|
11550
|
+
flexWrap: "wrap",
|
|
11551
|
+
justifyContent: "center",
|
|
11552
|
+
gap: "12px",
|
|
11553
|
+
maxWidth: "800px",
|
|
11554
|
+
marginBottom: "48px"
|
|
11555
|
+
},
|
|
11556
|
+
children: [
|
|
11557
|
+
actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
11558
|
+
"button",
|
|
11559
|
+
{
|
|
11560
|
+
onClick: () => onActionSelect?.(action),
|
|
11561
|
+
className: "chatllm-btn-secondary",
|
|
11562
|
+
style: {
|
|
11563
|
+
display: "flex",
|
|
11564
|
+
alignItems: "center",
|
|
11565
|
+
gap: "8px",
|
|
11566
|
+
padding: "12px 20px",
|
|
11567
|
+
fontSize: "14px",
|
|
11568
|
+
fontWeight: 500
|
|
11569
|
+
},
|
|
11570
|
+
children: [
|
|
11571
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
11572
|
+
IconSvg,
|
|
11573
|
+
{
|
|
11574
|
+
name: getActionIcon(action.icon),
|
|
11575
|
+
size: 18,
|
|
11576
|
+
color: "var(--chatllm-primary)"
|
|
11577
|
+
}
|
|
11578
|
+
),
|
|
11579
|
+
action.label
|
|
11580
|
+
]
|
|
11581
|
+
},
|
|
11582
|
+
action.id
|
|
11583
|
+
)),
|
|
11584
|
+
templates.slice(0, 4).map((template) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
11585
|
+
"button",
|
|
11586
|
+
{
|
|
11587
|
+
onClick: () => onTemplateClick(template),
|
|
11588
|
+
className: "chatllm-btn-secondary",
|
|
11589
|
+
style: {
|
|
11590
|
+
display: "flex",
|
|
11591
|
+
alignItems: "center",
|
|
11592
|
+
gap: "8px",
|
|
11593
|
+
padding: "12px 20px",
|
|
11594
|
+
fontSize: "14px",
|
|
11595
|
+
fontWeight: 500
|
|
11596
|
+
},
|
|
11597
|
+
children: [
|
|
11598
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
11599
|
+
IconSvg,
|
|
11600
|
+
{
|
|
11601
|
+
name: "sparkling-line",
|
|
11602
|
+
size: 18,
|
|
11603
|
+
color: "var(--chatllm-primary)"
|
|
11604
|
+
}
|
|
11605
|
+
),
|
|
11606
|
+
template.title
|
|
11607
|
+
]
|
|
11608
|
+
},
|
|
11609
|
+
template.id
|
|
11610
|
+
))
|
|
11611
|
+
]
|
|
11612
|
+
}
|
|
11613
|
+
)
|
|
11614
|
+
]
|
|
11615
|
+
}
|
|
11616
|
+
);
|
|
11617
|
+
};
|
|
11618
|
+
|
|
11513
11619
|
// src/react/components/MemoryPanel.tsx
|
|
11514
11620
|
var import_react22 = require("react");
|
|
11515
11621
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|