@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.mjs
CHANGED
|
@@ -417,7 +417,7 @@ var parseExtractionResult = (text) => {
|
|
|
417
417
|
function useInfoExtraction(options) {
|
|
418
418
|
const [isExtracting, setIsExtracting] = useState2(false);
|
|
419
419
|
const [lastExtraction, setLastExtraction] = useState2(null);
|
|
420
|
-
const { apiEndpoint, model, minConfidence = 0.8, globalMemory } = options;
|
|
420
|
+
const { apiEndpoint, model, minConfidence = 0.8, globalMemory, onCallLLM } = options;
|
|
421
421
|
const extractInfo = useCallback2(
|
|
422
422
|
async (messages) => {
|
|
423
423
|
if (messages.length === 0) {
|
|
@@ -426,41 +426,44 @@ function useInfoExtraction(options) {
|
|
|
426
426
|
setIsExtracting(true);
|
|
427
427
|
try {
|
|
428
428
|
const prompt = buildExtractionPrompt(messages);
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
const
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
429
|
+
let fullResponse;
|
|
430
|
+
if (onCallLLM) {
|
|
431
|
+
fullResponse = await onCallLLM(prompt, model || "default");
|
|
432
|
+
} else {
|
|
433
|
+
const response = await fetch(apiEndpoint, {
|
|
434
|
+
method: "POST",
|
|
435
|
+
headers: { "Content-Type": "application/json" },
|
|
436
|
+
body: JSON.stringify({
|
|
437
|
+
messages: [{ role: "user", content: prompt }],
|
|
438
|
+
model: model || "default"
|
|
439
|
+
})
|
|
440
|
+
});
|
|
441
|
+
if (!response.ok) {
|
|
442
|
+
throw new Error(`API error: ${response.status}`);
|
|
443
|
+
}
|
|
444
|
+
const reader = response.body?.getReader();
|
|
445
|
+
if (!reader) {
|
|
446
|
+
return [];
|
|
447
|
+
}
|
|
448
|
+
const decoder = new TextDecoder();
|
|
449
|
+
let buffer = "";
|
|
450
|
+
fullResponse = "";
|
|
451
|
+
while (true) {
|
|
452
|
+
const { done, value } = await reader.read();
|
|
453
|
+
if (done) break;
|
|
454
|
+
buffer += decoder.decode(value, { stream: true });
|
|
455
|
+
const lines = buffer.split("\n");
|
|
456
|
+
buffer = lines.pop() || "";
|
|
457
|
+
for (const line of lines) {
|
|
458
|
+
if (line.startsWith("data: ")) {
|
|
459
|
+
const data = line.slice(6);
|
|
460
|
+
if (data === "[DONE]") continue;
|
|
461
|
+
try {
|
|
462
|
+
const parsed = JSON.parse(data);
|
|
460
463
|
const chunk = parsed.content ?? parsed.text ?? "";
|
|
461
464
|
if (chunk) fullResponse += chunk;
|
|
465
|
+
} catch {
|
|
462
466
|
}
|
|
463
|
-
} catch {
|
|
464
467
|
}
|
|
465
468
|
}
|
|
466
469
|
}
|
|
@@ -487,7 +490,7 @@ function useInfoExtraction(options) {
|
|
|
487
490
|
setIsExtracting(false);
|
|
488
491
|
}
|
|
489
492
|
},
|
|
490
|
-
[apiEndpoint, model, minConfidence, globalMemory]
|
|
493
|
+
[apiEndpoint, model, minConfidence, globalMemory, onCallLLM]
|
|
491
494
|
);
|
|
492
495
|
return {
|
|
493
496
|
extractInfo,
|
|
@@ -1543,6 +1546,33 @@ var removeSessionCache = (storageKey, sessionId) => {
|
|
|
1543
1546
|
};
|
|
1544
1547
|
|
|
1545
1548
|
// src/react/hooks/useChatUI.ts
|
|
1549
|
+
var parseSSEResponse = async (response) => {
|
|
1550
|
+
const reader = response.body?.getReader();
|
|
1551
|
+
if (!reader) return "";
|
|
1552
|
+
const decoder = new TextDecoder();
|
|
1553
|
+
let buffer = "";
|
|
1554
|
+
let result = "";
|
|
1555
|
+
while (true) {
|
|
1556
|
+
const { done, value } = await reader.read();
|
|
1557
|
+
if (done) break;
|
|
1558
|
+
buffer += decoder.decode(value, { stream: true });
|
|
1559
|
+
const lines = buffer.split("\n");
|
|
1560
|
+
buffer = lines.pop() || "";
|
|
1561
|
+
for (const line of lines) {
|
|
1562
|
+
if (line.startsWith("data: ")) {
|
|
1563
|
+
const data = line.slice(6);
|
|
1564
|
+
if (data === "[DONE]") continue;
|
|
1565
|
+
try {
|
|
1566
|
+
const parsed = JSON.parse(data);
|
|
1567
|
+
const chunk = parsed.content ?? parsed.text ?? "";
|
|
1568
|
+
if (chunk) result += chunk;
|
|
1569
|
+
} catch {
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
return result;
|
|
1575
|
+
};
|
|
1546
1576
|
var DEFAULT_STORAGE_KEY = "chatllm_sessions";
|
|
1547
1577
|
var DEFAULT_COMPRESSION_THRESHOLD = 20;
|
|
1548
1578
|
var DEFAULT_KEEP_RECENT = 6;
|
|
@@ -1748,11 +1778,37 @@ var useChatUI = (options) => {
|
|
|
1748
1778
|
);
|
|
1749
1779
|
const projectMemoryRaw = useGlobalMemory(projectMemoryOptions);
|
|
1750
1780
|
const projectMemory = enableProjects ? projectMemoryRaw : null;
|
|
1781
|
+
const callInternalLLM = useCallback5(async (prompt, model) => {
|
|
1782
|
+
if (onSendMessageRef.current) {
|
|
1783
|
+
const modelConfig = models.find((m) => m.id === model);
|
|
1784
|
+
const provider = modelConfig?.provider || "ollama";
|
|
1785
|
+
const result = await onSendMessageRef.current({
|
|
1786
|
+
messages: [{ role: "user", content: prompt }],
|
|
1787
|
+
model,
|
|
1788
|
+
provider,
|
|
1789
|
+
apiKey
|
|
1790
|
+
});
|
|
1791
|
+
if (typeof result === "string") return result;
|
|
1792
|
+
if (typeof result === "object" && "content" in result) return result.content;
|
|
1793
|
+
return parseSSEResponse(new Response(result));
|
|
1794
|
+
}
|
|
1795
|
+
const response = await fetch(apiEndpoint, {
|
|
1796
|
+
method: "POST",
|
|
1797
|
+
headers: { "Content-Type": "application/json" },
|
|
1798
|
+
body: JSON.stringify({
|
|
1799
|
+
messages: [{ role: "user", content: prompt }],
|
|
1800
|
+
model
|
|
1801
|
+
})
|
|
1802
|
+
});
|
|
1803
|
+
if (!response.ok) return "";
|
|
1804
|
+
return parseSSEResponse(response);
|
|
1805
|
+
}, [apiEndpoint, apiKey, models]);
|
|
1751
1806
|
const infoExtraction = useInfoExtraction({
|
|
1752
1807
|
apiEndpoint,
|
|
1753
1808
|
model: selectedModel,
|
|
1754
1809
|
minConfidence: 0.8,
|
|
1755
|
-
globalMemory
|
|
1810
|
+
globalMemory,
|
|
1811
|
+
onCallLLM: callInternalLLM
|
|
1756
1812
|
});
|
|
1757
1813
|
const currentSession = sessions.find((s) => s.id === currentSessionId) || null;
|
|
1758
1814
|
const messages = currentSession?.messages.filter((m) => !m.hidden) || [];
|
|
@@ -1950,46 +2006,11 @@ ${conversationText}
|
|
|
1950
2006
|
|
|
1951
2007
|
\uC694\uC57D:`;
|
|
1952
2008
|
try {
|
|
1953
|
-
|
|
1954
|
-
method: "POST",
|
|
1955
|
-
headers: { "Content-Type": "application/json" },
|
|
1956
|
-
body: JSON.stringify({
|
|
1957
|
-
messages: [{ role: "user", content: summaryPrompt }],
|
|
1958
|
-
model
|
|
1959
|
-
})
|
|
1960
|
-
});
|
|
1961
|
-
if (!response.ok) return "";
|
|
1962
|
-
const reader = response.body?.getReader();
|
|
1963
|
-
if (!reader) return "";
|
|
1964
|
-
const decoder = new TextDecoder();
|
|
1965
|
-
let buffer = "";
|
|
1966
|
-
let summary = "";
|
|
1967
|
-
while (true) {
|
|
1968
|
-
const { done, value } = await reader.read();
|
|
1969
|
-
if (done) break;
|
|
1970
|
-
buffer += decoder.decode(value, { stream: true });
|
|
1971
|
-
const lines = buffer.split("\n");
|
|
1972
|
-
buffer = lines.pop() || "";
|
|
1973
|
-
for (const line of lines) {
|
|
1974
|
-
if (line.startsWith("data: ")) {
|
|
1975
|
-
const data = line.slice(6);
|
|
1976
|
-
if (data === "[DONE]") continue;
|
|
1977
|
-
try {
|
|
1978
|
-
const parsed = JSON.parse(data);
|
|
1979
|
-
{
|
|
1980
|
-
const chunk = parsed.content ?? parsed.text ?? "";
|
|
1981
|
-
if (chunk) summary += chunk;
|
|
1982
|
-
}
|
|
1983
|
-
} catch {
|
|
1984
|
-
}
|
|
1985
|
-
}
|
|
1986
|
-
}
|
|
1987
|
-
}
|
|
1988
|
-
return summary;
|
|
2009
|
+
return await callInternalLLM(summaryPrompt, model);
|
|
1989
2010
|
} catch {
|
|
1990
2011
|
return "";
|
|
1991
2012
|
}
|
|
1992
|
-
}, [
|
|
2013
|
+
}, [callInternalLLM]);
|
|
1993
2014
|
const incrementalCompressContext = useCallback5(
|
|
1994
2015
|
async (existingSummary, newMessages, model) => {
|
|
1995
2016
|
const newConversation = newMessages.map((m) => `${m.role === "user" ? "\uC0AC\uC6A9\uC790" : "AI"}: ${m.content}`).join("\n\n");
|
|
@@ -2009,47 +2030,13 @@ ${newConversation}
|
|
|
2009
2030
|
|
|
2010
2031
|
\uD1B5\uD569 \uC694\uC57D:`;
|
|
2011
2032
|
try {
|
|
2012
|
-
const
|
|
2013
|
-
method: "POST",
|
|
2014
|
-
headers: { "Content-Type": "application/json" },
|
|
2015
|
-
body: JSON.stringify({
|
|
2016
|
-
messages: [{ role: "user", content: mergePrompt }],
|
|
2017
|
-
model
|
|
2018
|
-
})
|
|
2019
|
-
});
|
|
2020
|
-
if (!response.ok) return existingSummary;
|
|
2021
|
-
const reader = response.body?.getReader();
|
|
2022
|
-
if (!reader) return existingSummary;
|
|
2023
|
-
const decoder = new TextDecoder();
|
|
2024
|
-
let buffer = "";
|
|
2025
|
-
let summary = "";
|
|
2026
|
-
while (true) {
|
|
2027
|
-
const { done, value } = await reader.read();
|
|
2028
|
-
if (done) break;
|
|
2029
|
-
buffer += decoder.decode(value, { stream: true });
|
|
2030
|
-
const lines = buffer.split("\n");
|
|
2031
|
-
buffer = lines.pop() || "";
|
|
2032
|
-
for (const line of lines) {
|
|
2033
|
-
if (line.startsWith("data: ")) {
|
|
2034
|
-
const data = line.slice(6);
|
|
2035
|
-
if (data === "[DONE]") continue;
|
|
2036
|
-
try {
|
|
2037
|
-
const parsed = JSON.parse(data);
|
|
2038
|
-
{
|
|
2039
|
-
const chunk = parsed.content ?? parsed.text ?? "";
|
|
2040
|
-
if (chunk) summary += chunk;
|
|
2041
|
-
}
|
|
2042
|
-
} catch {
|
|
2043
|
-
}
|
|
2044
|
-
}
|
|
2045
|
-
}
|
|
2046
|
-
}
|
|
2033
|
+
const summary = await callInternalLLM(mergePrompt, model);
|
|
2047
2034
|
return summary || existingSummary;
|
|
2048
2035
|
} catch {
|
|
2049
2036
|
return existingSummary;
|
|
2050
2037
|
}
|
|
2051
2038
|
},
|
|
2052
|
-
[
|
|
2039
|
+
[callInternalLLM]
|
|
2053
2040
|
);
|
|
2054
2041
|
const estimateTokens = useCallback5((messages2) => {
|
|
2055
2042
|
return messages2.reduce((sum, m) => sum + Math.ceil(m.content.length / 4), 0);
|
|
@@ -4651,7 +4638,8 @@ var ChatInput = ({
|
|
|
4651
4638
|
onFileAttach,
|
|
4652
4639
|
onRemoveAttachment,
|
|
4653
4640
|
acceptedFileTypes,
|
|
4654
|
-
onDisclaimerClick
|
|
4641
|
+
onDisclaimerClick,
|
|
4642
|
+
inline = false
|
|
4655
4643
|
}) => {
|
|
4656
4644
|
const [mainMenuOpen, setMainMenuOpen] = React4.useState(false);
|
|
4657
4645
|
const textareaRef = useRef7(null);
|
|
@@ -4740,17 +4728,17 @@ var ChatInput = ({
|
|
|
4740
4728
|
{
|
|
4741
4729
|
className: "chatllm-input-footer",
|
|
4742
4730
|
style: {
|
|
4743
|
-
position: "absolute",
|
|
4744
|
-
bottom: 0,
|
|
4745
|
-
left: 0,
|
|
4746
|
-
right: 0,
|
|
4731
|
+
position: inline ? "relative" : "absolute",
|
|
4732
|
+
bottom: inline ? void 0 : 0,
|
|
4733
|
+
left: inline ? void 0 : 0,
|
|
4734
|
+
right: inline ? void 0 : 0,
|
|
4747
4735
|
display: "flex",
|
|
4748
4736
|
flexDirection: "column",
|
|
4749
4737
|
alignItems: "center",
|
|
4750
|
-
paddingBottom: "16px",
|
|
4751
|
-
paddingTop: "64px",
|
|
4752
|
-
background: "linear-gradient(to top, var(--chatllm-bg) 60%, transparent)",
|
|
4753
|
-
pointerEvents: "none"
|
|
4738
|
+
paddingBottom: inline ? "0px" : "16px",
|
|
4739
|
+
paddingTop: inline ? "0px" : "64px",
|
|
4740
|
+
background: inline ? "transparent" : "linear-gradient(to top, var(--chatllm-bg) 60%, transparent)",
|
|
4741
|
+
pointerEvents: inline ? void 0 : "none"
|
|
4754
4742
|
},
|
|
4755
4743
|
children: /* @__PURE__ */ jsxs4(
|
|
4756
4744
|
"div",
|
|
@@ -5351,7 +5339,7 @@ var ChatInput = ({
|
|
|
5351
5339
|
]
|
|
5352
5340
|
}
|
|
5353
5341
|
),
|
|
5354
|
-
/* @__PURE__ */ jsx5(
|
|
5342
|
+
!inline && /* @__PURE__ */ jsx5(
|
|
5355
5343
|
"p",
|
|
5356
5344
|
{
|
|
5357
5345
|
onClick: onDisclaimerClick,
|
|
@@ -8996,147 +8984,9 @@ var MessageList = ({
|
|
|
8996
8984
|
);
|
|
8997
8985
|
};
|
|
8998
8986
|
|
|
8999
|
-
// src/react/components/EmptyState.tsx
|
|
9000
|
-
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
9001
|
-
var EmptyState = ({
|
|
9002
|
-
greeting,
|
|
9003
|
-
templates = [],
|
|
9004
|
-
onTemplateClick,
|
|
9005
|
-
actions = [],
|
|
9006
|
-
onActionSelect
|
|
9007
|
-
}) => {
|
|
9008
|
-
const getActionIcon = (icon) => {
|
|
9009
|
-
const iconMap = {
|
|
9010
|
-
search: "search-line",
|
|
9011
|
-
image: "image-line",
|
|
9012
|
-
code: "code-s-slash-line",
|
|
9013
|
-
document: "file-text-line"
|
|
9014
|
-
};
|
|
9015
|
-
return iconMap[icon] || "sparkling-line";
|
|
9016
|
-
};
|
|
9017
|
-
const hasContent = actions.length > 0 || templates.length > 0;
|
|
9018
|
-
return /* @__PURE__ */ jsxs16(
|
|
9019
|
-
"div",
|
|
9020
|
-
{
|
|
9021
|
-
className: "chatllm-empty-state",
|
|
9022
|
-
style: {
|
|
9023
|
-
flex: 1,
|
|
9024
|
-
display: "flex",
|
|
9025
|
-
flexDirection: "column",
|
|
9026
|
-
alignItems: "center",
|
|
9027
|
-
justifyContent: hasContent ? "center" : "flex-end",
|
|
9028
|
-
padding: "48px 24px",
|
|
9029
|
-
paddingBottom: hasContent ? "200px" : "32px",
|
|
9030
|
-
textAlign: "center"
|
|
9031
|
-
},
|
|
9032
|
-
children: [
|
|
9033
|
-
/* @__PURE__ */ jsx17(
|
|
9034
|
-
"div",
|
|
9035
|
-
{
|
|
9036
|
-
className: "chatllm-sheet",
|
|
9037
|
-
style: {
|
|
9038
|
-
width: "64px",
|
|
9039
|
-
height: "64px",
|
|
9040
|
-
borderRadius: "16px",
|
|
9041
|
-
display: "flex",
|
|
9042
|
-
alignItems: "center",
|
|
9043
|
-
justifyContent: "center",
|
|
9044
|
-
marginBottom: "32px",
|
|
9045
|
-
color: "var(--chatllm-primary)"
|
|
9046
|
-
},
|
|
9047
|
-
children: /* @__PURE__ */ jsx17(IconSvg, { name: "chat-1-line", size: 40 })
|
|
9048
|
-
}
|
|
9049
|
-
),
|
|
9050
|
-
/* @__PURE__ */ jsx17(
|
|
9051
|
-
"h1",
|
|
9052
|
-
{
|
|
9053
|
-
style: {
|
|
9054
|
-
fontSize: "30px",
|
|
9055
|
-
fontWeight: 700,
|
|
9056
|
-
color: "var(--chatllm-text)",
|
|
9057
|
-
marginBottom: hasContent ? "40px" : "0",
|
|
9058
|
-
lineHeight: 1.3
|
|
9059
|
-
},
|
|
9060
|
-
children: "How can I help you today?"
|
|
9061
|
-
}
|
|
9062
|
-
),
|
|
9063
|
-
(actions.length > 0 || templates.length > 0) && /* @__PURE__ */ jsxs16(
|
|
9064
|
-
"div",
|
|
9065
|
-
{
|
|
9066
|
-
style: {
|
|
9067
|
-
display: "flex",
|
|
9068
|
-
flexWrap: "wrap",
|
|
9069
|
-
justifyContent: "center",
|
|
9070
|
-
gap: "12px",
|
|
9071
|
-
maxWidth: "800px",
|
|
9072
|
-
marginBottom: "48px"
|
|
9073
|
-
},
|
|
9074
|
-
children: [
|
|
9075
|
-
actions.map((action) => /* @__PURE__ */ jsxs16(
|
|
9076
|
-
"button",
|
|
9077
|
-
{
|
|
9078
|
-
onClick: () => onActionSelect?.(action),
|
|
9079
|
-
className: "chatllm-btn-secondary",
|
|
9080
|
-
style: {
|
|
9081
|
-
display: "flex",
|
|
9082
|
-
alignItems: "center",
|
|
9083
|
-
gap: "8px",
|
|
9084
|
-
padding: "12px 20px",
|
|
9085
|
-
fontSize: "14px",
|
|
9086
|
-
fontWeight: 500
|
|
9087
|
-
},
|
|
9088
|
-
children: [
|
|
9089
|
-
/* @__PURE__ */ jsx17(
|
|
9090
|
-
IconSvg,
|
|
9091
|
-
{
|
|
9092
|
-
name: getActionIcon(action.icon),
|
|
9093
|
-
size: 18,
|
|
9094
|
-
color: "var(--chatllm-primary)"
|
|
9095
|
-
}
|
|
9096
|
-
),
|
|
9097
|
-
action.label
|
|
9098
|
-
]
|
|
9099
|
-
},
|
|
9100
|
-
action.id
|
|
9101
|
-
)),
|
|
9102
|
-
templates.slice(0, 4).map((template) => /* @__PURE__ */ jsxs16(
|
|
9103
|
-
"button",
|
|
9104
|
-
{
|
|
9105
|
-
onClick: () => onTemplateClick(template),
|
|
9106
|
-
className: "chatllm-btn-secondary",
|
|
9107
|
-
style: {
|
|
9108
|
-
display: "flex",
|
|
9109
|
-
alignItems: "center",
|
|
9110
|
-
gap: "8px",
|
|
9111
|
-
padding: "12px 20px",
|
|
9112
|
-
fontSize: "14px",
|
|
9113
|
-
fontWeight: 500
|
|
9114
|
-
},
|
|
9115
|
-
children: [
|
|
9116
|
-
/* @__PURE__ */ jsx17(
|
|
9117
|
-
IconSvg,
|
|
9118
|
-
{
|
|
9119
|
-
name: "sparkling-line",
|
|
9120
|
-
size: 18,
|
|
9121
|
-
color: "var(--chatllm-primary)"
|
|
9122
|
-
}
|
|
9123
|
-
),
|
|
9124
|
-
template.title
|
|
9125
|
-
]
|
|
9126
|
-
},
|
|
9127
|
-
template.id
|
|
9128
|
-
))
|
|
9129
|
-
]
|
|
9130
|
-
}
|
|
9131
|
-
)
|
|
9132
|
-
]
|
|
9133
|
-
}
|
|
9134
|
-
);
|
|
9135
|
-
};
|
|
9136
|
-
|
|
9137
8987
|
// src/react/components/SettingsModal.tsx
|
|
9138
8988
|
import { useState as useState16 } from "react";
|
|
9139
|
-
import { jsx as
|
|
8989
|
+
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
9140
8990
|
var DEFAULT_PERSONALIZATION2 = {
|
|
9141
8991
|
responseStyle: {
|
|
9142
8992
|
warmth: "medium",
|
|
@@ -9196,7 +9046,7 @@ var SettingsModal = ({
|
|
|
9196
9046
|
setLocalApiKey(value);
|
|
9197
9047
|
onApiKeyChange?.(value);
|
|
9198
9048
|
};
|
|
9199
|
-
return /* @__PURE__ */
|
|
9049
|
+
return /* @__PURE__ */ jsx17(
|
|
9200
9050
|
"div",
|
|
9201
9051
|
{
|
|
9202
9052
|
className: "chatllm-settings-overlay",
|
|
@@ -9210,7 +9060,7 @@ var SettingsModal = ({
|
|
|
9210
9060
|
zIndex: 1e3
|
|
9211
9061
|
},
|
|
9212
9062
|
onClick: onClose,
|
|
9213
|
-
children: /* @__PURE__ */
|
|
9063
|
+
children: /* @__PURE__ */ jsxs16(
|
|
9214
9064
|
"div",
|
|
9215
9065
|
{
|
|
9216
9066
|
className: "chatllm-settings-modal",
|
|
@@ -9228,7 +9078,7 @@ var SettingsModal = ({
|
|
|
9228
9078
|
},
|
|
9229
9079
|
onClick: (e) => e.stopPropagation(),
|
|
9230
9080
|
children: [
|
|
9231
|
-
/* @__PURE__ */
|
|
9081
|
+
/* @__PURE__ */ jsxs16(
|
|
9232
9082
|
"div",
|
|
9233
9083
|
{
|
|
9234
9084
|
style: {
|
|
@@ -9239,7 +9089,7 @@ var SettingsModal = ({
|
|
|
9239
9089
|
flexDirection: "column"
|
|
9240
9090
|
},
|
|
9241
9091
|
children: [
|
|
9242
|
-
/* @__PURE__ */
|
|
9092
|
+
/* @__PURE__ */ jsx17("div", { style: { padding: "16px", borderBottom: "1px solid var(--chatllm-border, #e5e7eb)" }, children: /* @__PURE__ */ jsx17(
|
|
9243
9093
|
"button",
|
|
9244
9094
|
{
|
|
9245
9095
|
onClick: onClose,
|
|
@@ -9253,11 +9103,11 @@ var SettingsModal = ({
|
|
|
9253
9103
|
alignItems: "center",
|
|
9254
9104
|
justifyContent: "center"
|
|
9255
9105
|
},
|
|
9256
|
-
children: /* @__PURE__ */
|
|
9106
|
+
children: /* @__PURE__ */ jsx17(IconSvg, { name: "close-line", size: 20, color: "var(--chatllm-text-muted, #6b7280)" })
|
|
9257
9107
|
}
|
|
9258
9108
|
) }),
|
|
9259
|
-
/* @__PURE__ */
|
|
9260
|
-
/* @__PURE__ */
|
|
9109
|
+
/* @__PURE__ */ jsxs16("nav", { style: { flex: 1, padding: "8px" }, children: [
|
|
9110
|
+
/* @__PURE__ */ jsx17(
|
|
9261
9111
|
TabButton,
|
|
9262
9112
|
{
|
|
9263
9113
|
active: activeTab === "general",
|
|
@@ -9266,7 +9116,7 @@ var SettingsModal = ({
|
|
|
9266
9116
|
label: "\uC77C\uBC18"
|
|
9267
9117
|
}
|
|
9268
9118
|
),
|
|
9269
|
-
/* @__PURE__ */
|
|
9119
|
+
/* @__PURE__ */ jsx17(
|
|
9270
9120
|
TabButton,
|
|
9271
9121
|
{
|
|
9272
9122
|
active: activeTab === "personalization",
|
|
@@ -9275,7 +9125,7 @@ var SettingsModal = ({
|
|
|
9275
9125
|
label: "\uAC1C\uC778 \uB9DE\uCDA4 \uC124\uC815"
|
|
9276
9126
|
}
|
|
9277
9127
|
),
|
|
9278
|
-
showMemoryTab && /* @__PURE__ */
|
|
9128
|
+
showMemoryTab && /* @__PURE__ */ jsx17(
|
|
9279
9129
|
TabButton,
|
|
9280
9130
|
{
|
|
9281
9131
|
active: activeTab === "memory",
|
|
@@ -9284,7 +9134,7 @@ var SettingsModal = ({
|
|
|
9284
9134
|
label: "AI \uBA54\uBAA8\uB9AC"
|
|
9285
9135
|
}
|
|
9286
9136
|
),
|
|
9287
|
-
showMemoryTab && enableProjects && /* @__PURE__ */
|
|
9137
|
+
showMemoryTab && enableProjects && /* @__PURE__ */ jsx17(
|
|
9288
9138
|
TabButton,
|
|
9289
9139
|
{
|
|
9290
9140
|
active: activeTab === "project-memory",
|
|
@@ -9293,7 +9143,7 @@ var SettingsModal = ({
|
|
|
9293
9143
|
label: "\uD504\uB85C\uC81D\uD2B8 \uBA54\uBAA8\uB9AC"
|
|
9294
9144
|
}
|
|
9295
9145
|
),
|
|
9296
|
-
/* @__PURE__ */
|
|
9146
|
+
/* @__PURE__ */ jsx17(
|
|
9297
9147
|
TabButton,
|
|
9298
9148
|
{
|
|
9299
9149
|
active: activeTab === "data",
|
|
@@ -9306,24 +9156,24 @@ var SettingsModal = ({
|
|
|
9306
9156
|
]
|
|
9307
9157
|
}
|
|
9308
9158
|
),
|
|
9309
|
-
/* @__PURE__ */
|
|
9310
|
-
activeTab === "general" && /* @__PURE__ */
|
|
9311
|
-
/* @__PURE__ */
|
|
9312
|
-
/* @__PURE__ */
|
|
9159
|
+
/* @__PURE__ */ jsxs16("div", { style: { flex: 1, overflow: "auto", padding: "24px" }, children: [
|
|
9160
|
+
activeTab === "general" && /* @__PURE__ */ jsxs16("div", { children: [
|
|
9161
|
+
/* @__PURE__ */ jsx17("h2", { style: { fontSize: "20px", fontWeight: 600, marginBottom: "24px", color: "var(--chatllm-text, #1f2937)" }, children: "\uC77C\uBC18" }),
|
|
9162
|
+
/* @__PURE__ */ jsx17(SettingRow, { label: "\uC5B8\uC5B4", children: /* @__PURE__ */ jsxs16(
|
|
9313
9163
|
"select",
|
|
9314
9164
|
{
|
|
9315
9165
|
value: personalization.language,
|
|
9316
9166
|
onChange: (e) => onPersonalizationChange({ ...personalization, language: e.target.value }),
|
|
9317
9167
|
style: selectStyle,
|
|
9318
9168
|
children: [
|
|
9319
|
-
/* @__PURE__ */
|
|
9320
|
-
/* @__PURE__ */
|
|
9321
|
-
/* @__PURE__ */
|
|
9322
|
-
/* @__PURE__ */
|
|
9169
|
+
/* @__PURE__ */ jsx17("option", { value: "auto", children: "\uC790\uB3D9 \uD0D0\uC9C0" }),
|
|
9170
|
+
/* @__PURE__ */ jsx17("option", { value: "ko", children: "\uD55C\uAD6D\uC5B4" }),
|
|
9171
|
+
/* @__PURE__ */ jsx17("option", { value: "en", children: "English" }),
|
|
9172
|
+
/* @__PURE__ */ jsx17("option", { value: "ja", children: "\u65E5\u672C\u8A9E" })
|
|
9323
9173
|
]
|
|
9324
9174
|
}
|
|
9325
9175
|
) }),
|
|
9326
|
-
/* @__PURE__ */
|
|
9176
|
+
/* @__PURE__ */ jsx17(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__ */ jsx17(
|
|
9327
9177
|
"button",
|
|
9328
9178
|
{
|
|
9329
9179
|
onClick: () => onPersonalizationChange(DEFAULT_PERSONALIZATION2),
|
|
@@ -9331,11 +9181,11 @@ var SettingsModal = ({
|
|
|
9331
9181
|
children: "\uCD08\uAE30\uD654"
|
|
9332
9182
|
}
|
|
9333
9183
|
) }),
|
|
9334
|
-
onApiKeyChange && /* @__PURE__ */
|
|
9335
|
-
/* @__PURE__ */
|
|
9336
|
-
/* @__PURE__ */
|
|
9337
|
-
/* @__PURE__ */
|
|
9338
|
-
/* @__PURE__ */
|
|
9184
|
+
onApiKeyChange && /* @__PURE__ */ jsxs16("div", { style: { marginTop: "32px", paddingTop: "24px", borderTop: "1px solid var(--chatllm-border, #e5e7eb)" }, children: [
|
|
9185
|
+
/* @__PURE__ */ jsx17("h3", { style: { fontSize: "16px", fontWeight: 500, marginBottom: "16px", color: "var(--chatllm-text, #1f2937)" }, children: "API \uC124\uC815" }),
|
|
9186
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
9187
|
+
/* @__PURE__ */ jsx17("label", { style: { display: "block", fontSize: "14px", marginBottom: "8px", color: "var(--chatllm-text, #374151)" }, children: apiKeyLabel }),
|
|
9188
|
+
/* @__PURE__ */ jsx17(
|
|
9339
9189
|
"input",
|
|
9340
9190
|
{
|
|
9341
9191
|
type: "password",
|
|
@@ -9345,18 +9195,18 @@ var SettingsModal = ({
|
|
|
9345
9195
|
style: inputStyle
|
|
9346
9196
|
}
|
|
9347
9197
|
),
|
|
9348
|
-
/* @__PURE__ */
|
|
9198
|
+
/* @__PURE__ */ jsx17("p", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #9ca3af)", marginTop: "4px" }, children: apiKeyDescription })
|
|
9349
9199
|
] })
|
|
9350
9200
|
] })
|
|
9351
9201
|
] }),
|
|
9352
|
-
activeTab === "personalization" && /* @__PURE__ */
|
|
9353
|
-
/* @__PURE__ */
|
|
9354
|
-
/* @__PURE__ */
|
|
9355
|
-
/* @__PURE__ */
|
|
9356
|
-
/* @__PURE__ */
|
|
9357
|
-
/* @__PURE__ */
|
|
9358
|
-
/* @__PURE__ */
|
|
9359
|
-
/* @__PURE__ */
|
|
9202
|
+
activeTab === "personalization" && /* @__PURE__ */ jsxs16("div", { children: [
|
|
9203
|
+
/* @__PURE__ */ jsx17("h2", { style: { fontSize: "20px", fontWeight: 600, marginBottom: "24px", color: "var(--chatllm-text, #1f2937)" }, children: "\uAC1C\uC778 \uB9DE\uCDA4 \uC124\uC815" }),
|
|
9204
|
+
/* @__PURE__ */ jsxs16("section", { style: { marginBottom: "32px" }, children: [
|
|
9205
|
+
/* @__PURE__ */ jsx17("h3", { style: { fontSize: "14px", fontWeight: 500, color: "var(--chatllm-text-muted, #6b7280)", marginBottom: "16px" }, children: "\uC0AC\uC6A9\uC790 \uD504\uB85C\uD544" }),
|
|
9206
|
+
/* @__PURE__ */ jsxs16("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
9207
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
9208
|
+
/* @__PURE__ */ jsx17("label", { style: labelStyle, children: "\uB2C9\uB124\uC784" }),
|
|
9209
|
+
/* @__PURE__ */ jsx17(
|
|
9360
9210
|
"input",
|
|
9361
9211
|
{
|
|
9362
9212
|
type: "text",
|
|
@@ -9367,9 +9217,9 @@ var SettingsModal = ({
|
|
|
9367
9217
|
}
|
|
9368
9218
|
)
|
|
9369
9219
|
] }),
|
|
9370
|
-
/* @__PURE__ */
|
|
9371
|
-
/* @__PURE__ */
|
|
9372
|
-
/* @__PURE__ */
|
|
9220
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
9221
|
+
/* @__PURE__ */ jsx17("label", { style: labelStyle, children: "\uC9C1\uC5C5" }),
|
|
9222
|
+
/* @__PURE__ */ jsx17(
|
|
9373
9223
|
"input",
|
|
9374
9224
|
{
|
|
9375
9225
|
type: "text",
|
|
@@ -9380,9 +9230,9 @@ var SettingsModal = ({
|
|
|
9380
9230
|
}
|
|
9381
9231
|
)
|
|
9382
9232
|
] }),
|
|
9383
|
-
/* @__PURE__ */
|
|
9384
|
-
/* @__PURE__ */
|
|
9385
|
-
/* @__PURE__ */
|
|
9233
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
9234
|
+
/* @__PURE__ */ jsx17("label", { style: labelStyle, children: "\uCD94\uAC00 \uC815\uBCF4" }),
|
|
9235
|
+
/* @__PURE__ */ jsx17(
|
|
9386
9236
|
"textarea",
|
|
9387
9237
|
{
|
|
9388
9238
|
value: personalization.userProfile.additionalInfo || "",
|
|
@@ -9395,62 +9245,62 @@ var SettingsModal = ({
|
|
|
9395
9245
|
] })
|
|
9396
9246
|
] })
|
|
9397
9247
|
] }),
|
|
9398
|
-
/* @__PURE__ */
|
|
9399
|
-
/* @__PURE__ */
|
|
9400
|
-
/* @__PURE__ */
|
|
9248
|
+
/* @__PURE__ */ jsxs16("section", { children: [
|
|
9249
|
+
/* @__PURE__ */ jsx17("h3", { style: { fontSize: "14px", fontWeight: 500, color: "var(--chatllm-text-muted, #6b7280)", marginBottom: "16px" }, children: "\uC751\uB2F5 \uC2A4\uD0C0\uC77C" }),
|
|
9250
|
+
/* @__PURE__ */ jsx17(SettingRow, { label: "\uB530\uB73B\uD568", children: /* @__PURE__ */ jsxs16(
|
|
9401
9251
|
"select",
|
|
9402
9252
|
{
|
|
9403
9253
|
value: personalization.responseStyle.warmth,
|
|
9404
9254
|
onChange: (e) => updateResponseStyle("warmth", e.target.value),
|
|
9405
9255
|
style: selectStyle,
|
|
9406
9256
|
children: [
|
|
9407
|
-
/* @__PURE__ */
|
|
9408
|
-
/* @__PURE__ */
|
|
9409
|
-
/* @__PURE__ */
|
|
9257
|
+
/* @__PURE__ */ jsx17("option", { value: "high", children: "\uB192\uC74C - \uCE5C\uADFC\uD558\uACE0 \uB530\uB73B\uD558\uAC8C" }),
|
|
9258
|
+
/* @__PURE__ */ jsx17("option", { value: "medium", children: "\uAE30\uBCF8\uAC12" }),
|
|
9259
|
+
/* @__PURE__ */ jsx17("option", { value: "low", children: "\uB0AE\uC74C - \uAC04\uACB0\uD558\uACE0 \uC0AC\uBB34\uC801\uC73C\uB85C" })
|
|
9410
9260
|
]
|
|
9411
9261
|
}
|
|
9412
9262
|
) }),
|
|
9413
|
-
/* @__PURE__ */
|
|
9263
|
+
/* @__PURE__ */ jsx17(SettingRow, { label: "\uC5F4\uC815\uC801", children: /* @__PURE__ */ jsxs16(
|
|
9414
9264
|
"select",
|
|
9415
9265
|
{
|
|
9416
9266
|
value: personalization.responseStyle.enthusiasm,
|
|
9417
9267
|
onChange: (e) => updateResponseStyle("enthusiasm", e.target.value),
|
|
9418
9268
|
style: selectStyle,
|
|
9419
9269
|
children: [
|
|
9420
|
-
/* @__PURE__ */
|
|
9421
|
-
/* @__PURE__ */
|
|
9422
|
-
/* @__PURE__ */
|
|
9270
|
+
/* @__PURE__ */ jsx17("option", { value: "high", children: "\uB192\uC74C - \uC801\uADF9\uC801\uC774\uACE0 \uD65C\uBC1C\uD558\uAC8C" }),
|
|
9271
|
+
/* @__PURE__ */ jsx17("option", { value: "medium", children: "\uAE30\uBCF8\uAC12" }),
|
|
9272
|
+
/* @__PURE__ */ jsx17("option", { value: "low", children: "\uB0AE\uC74C - \uCC28\uBD84\uD558\uACE0 \uC808\uC81C\uC788\uAC8C" })
|
|
9423
9273
|
]
|
|
9424
9274
|
}
|
|
9425
9275
|
) }),
|
|
9426
|
-
/* @__PURE__ */
|
|
9276
|
+
/* @__PURE__ */ jsx17(SettingRow, { label: "\uC774\uBAA8\uC9C0 \uC0AC\uC6A9", children: /* @__PURE__ */ jsxs16(
|
|
9427
9277
|
"select",
|
|
9428
9278
|
{
|
|
9429
9279
|
value: personalization.responseStyle.emojiUsage,
|
|
9430
9280
|
onChange: (e) => updateResponseStyle("emojiUsage", e.target.value),
|
|
9431
9281
|
style: selectStyle,
|
|
9432
9282
|
children: [
|
|
9433
|
-
/* @__PURE__ */
|
|
9434
|
-
/* @__PURE__ */
|
|
9435
|
-
/* @__PURE__ */
|
|
9283
|
+
/* @__PURE__ */ jsx17("option", { value: "high", children: "\uB192\uC74C - \uC790\uC8FC \uC0AC\uC6A9" }),
|
|
9284
|
+
/* @__PURE__ */ jsx17("option", { value: "medium", children: "\uAE30\uBCF8\uAC12" }),
|
|
9285
|
+
/* @__PURE__ */ jsx17("option", { value: "low", children: "\uB0AE\uC74C - \uAC70\uC758 \uC0AC\uC6A9 \uC548 \uD568" })
|
|
9436
9286
|
]
|
|
9437
9287
|
}
|
|
9438
9288
|
) }),
|
|
9439
|
-
/* @__PURE__ */
|
|
9289
|
+
/* @__PURE__ */ jsx17(SettingRow, { label: "\uC751\uB2F5 \uAE38\uC774", children: /* @__PURE__ */ jsxs16(
|
|
9440
9290
|
"select",
|
|
9441
9291
|
{
|
|
9442
9292
|
value: personalization.responseStyle.verbosity,
|
|
9443
9293
|
onChange: (e) => updateResponseStyle("verbosity", e.target.value),
|
|
9444
9294
|
style: selectStyle,
|
|
9445
9295
|
children: [
|
|
9446
|
-
/* @__PURE__ */
|
|
9447
|
-
/* @__PURE__ */
|
|
9448
|
-
/* @__PURE__ */
|
|
9296
|
+
/* @__PURE__ */ jsx17("option", { value: "detailed", children: "\uC0C1\uC138 - \uC790\uC138\uD558\uAC8C \uC124\uBA85" }),
|
|
9297
|
+
/* @__PURE__ */ jsx17("option", { value: "balanced", children: "\uAE30\uBCF8\uAC12" }),
|
|
9298
|
+
/* @__PURE__ */ jsx17("option", { value: "concise", children: "\uAC04\uACB0 - \uD575\uC2EC\uB9CC \uC694\uC57D" })
|
|
9449
9299
|
]
|
|
9450
9300
|
}
|
|
9451
9301
|
) })
|
|
9452
9302
|
] }),
|
|
9453
|
-
onSave && /* @__PURE__ */
|
|
9303
|
+
onSave && /* @__PURE__ */ jsx17("div", { style: { marginTop: "24px", display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ jsx17(
|
|
9454
9304
|
"button",
|
|
9455
9305
|
{
|
|
9456
9306
|
onClick: onSave,
|
|
@@ -9471,7 +9321,7 @@ var SettingsModal = ({
|
|
|
9471
9321
|
}
|
|
9472
9322
|
) })
|
|
9473
9323
|
] }),
|
|
9474
|
-
activeTab === "memory" && showMemoryTab && /* @__PURE__ */
|
|
9324
|
+
activeTab === "memory" && showMemoryTab && /* @__PURE__ */ jsx17(
|
|
9475
9325
|
MemoryTabContent,
|
|
9476
9326
|
{
|
|
9477
9327
|
items: memoryItems,
|
|
@@ -9480,7 +9330,7 @@ var SettingsModal = ({
|
|
|
9480
9330
|
onClearAll: onClearMemory
|
|
9481
9331
|
}
|
|
9482
9332
|
),
|
|
9483
|
-
activeTab === "project-memory" && showMemoryTab && enableProjects && /* @__PURE__ */
|
|
9333
|
+
activeTab === "project-memory" && showMemoryTab && enableProjects && /* @__PURE__ */ jsx17(
|
|
9484
9334
|
MemoryTabContent,
|
|
9485
9335
|
{
|
|
9486
9336
|
items: projectMemoryItems,
|
|
@@ -9491,9 +9341,9 @@ var SettingsModal = ({
|
|
|
9491
9341
|
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"
|
|
9492
9342
|
}
|
|
9493
9343
|
),
|
|
9494
|
-
activeTab === "data" && /* @__PURE__ */
|
|
9495
|
-
/* @__PURE__ */
|
|
9496
|
-
/* @__PURE__ */
|
|
9344
|
+
activeTab === "data" && /* @__PURE__ */ jsxs16("div", { children: [
|
|
9345
|
+
/* @__PURE__ */ jsx17("h2", { style: { fontSize: "20px", fontWeight: 600, marginBottom: "24px", color: "var(--chatllm-text, #1f2937)" }, children: "\uB370\uC774\uD130 \uC81C\uC5B4" }),
|
|
9346
|
+
/* @__PURE__ */ jsx17(SettingRow, { label: "\uBA54\uBAA8\uB9AC \uC0AC\uC6A9", description: "\uB300\uD654 \uCEE8\uD14D\uC2A4\uD2B8\uB97C \uAE30\uC5B5\uD569\uB2C8\uB2E4", children: /* @__PURE__ */ jsx17(
|
|
9497
9347
|
"button",
|
|
9498
9348
|
{
|
|
9499
9349
|
onClick: () => onPersonalizationChange({ ...personalization, useMemory: !personalization.useMemory }),
|
|
@@ -9507,7 +9357,7 @@ var SettingsModal = ({
|
|
|
9507
9357
|
position: "relative",
|
|
9508
9358
|
transition: "background-color 0.2s"
|
|
9509
9359
|
},
|
|
9510
|
-
children: /* @__PURE__ */
|
|
9360
|
+
children: /* @__PURE__ */ jsx17(
|
|
9511
9361
|
"div",
|
|
9512
9362
|
{
|
|
9513
9363
|
style: {
|
|
@@ -9525,7 +9375,7 @@ var SettingsModal = ({
|
|
|
9525
9375
|
)
|
|
9526
9376
|
}
|
|
9527
9377
|
) }),
|
|
9528
|
-
onClearAllData && /* @__PURE__ */
|
|
9378
|
+
onClearAllData && /* @__PURE__ */ jsx17(SettingRow, { label: "\uB300\uD654 \uAE30\uB85D \uC0AD\uC81C", description: "\uBAA8\uB4E0 \uB300\uD654 \uAE30\uB85D\uC744 \uC0AD\uC81C\uD569\uB2C8\uB2E4", children: /* @__PURE__ */ jsx17(
|
|
9529
9379
|
"button",
|
|
9530
9380
|
{
|
|
9531
9381
|
onClick: () => {
|
|
@@ -9545,7 +9395,7 @@ var SettingsModal = ({
|
|
|
9545
9395
|
}
|
|
9546
9396
|
);
|
|
9547
9397
|
};
|
|
9548
|
-
var TabButton = ({ active, onClick, icon, label }) => /* @__PURE__ */
|
|
9398
|
+
var TabButton = ({ active, onClick, icon, label }) => /* @__PURE__ */ jsxs16(
|
|
9549
9399
|
"button",
|
|
9550
9400
|
{
|
|
9551
9401
|
onClick,
|
|
@@ -9566,12 +9416,12 @@ var TabButton = ({ active, onClick, icon, label }) => /* @__PURE__ */ jsxs17(
|
|
|
9566
9416
|
marginBottom: "4px"
|
|
9567
9417
|
},
|
|
9568
9418
|
children: [
|
|
9569
|
-
/* @__PURE__ */
|
|
9419
|
+
/* @__PURE__ */ jsx17(IconSvg, { name: icon, size: 20 }),
|
|
9570
9420
|
label
|
|
9571
9421
|
]
|
|
9572
9422
|
}
|
|
9573
9423
|
);
|
|
9574
|
-
var SettingRow = ({ label, description, children }) => /* @__PURE__ */
|
|
9424
|
+
var SettingRow = ({ label, description, children }) => /* @__PURE__ */ jsxs16(
|
|
9575
9425
|
"div",
|
|
9576
9426
|
{
|
|
9577
9427
|
style: {
|
|
@@ -9582,9 +9432,9 @@ var SettingRow = ({ label, description, children }) => /* @__PURE__ */ jsxs17(
|
|
|
9582
9432
|
borderBottom: "1px solid var(--chatllm-border-light, #f3f4f6)"
|
|
9583
9433
|
},
|
|
9584
9434
|
children: [
|
|
9585
|
-
/* @__PURE__ */
|
|
9586
|
-
/* @__PURE__ */
|
|
9587
|
-
description && /* @__PURE__ */
|
|
9435
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
9436
|
+
/* @__PURE__ */ jsx17("span", { style: { fontSize: "14px", color: "var(--chatllm-text, #374151)" }, children: label }),
|
|
9437
|
+
description && /* @__PURE__ */ jsx17("p", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #9ca3af)", marginTop: "2px" }, children: description })
|
|
9588
9438
|
] }),
|
|
9589
9439
|
children
|
|
9590
9440
|
]
|
|
@@ -9656,15 +9506,15 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9656
9506
|
minute: "2-digit"
|
|
9657
9507
|
});
|
|
9658
9508
|
};
|
|
9659
|
-
return /* @__PURE__ */
|
|
9660
|
-
/* @__PURE__ */
|
|
9661
|
-
/* @__PURE__ */
|
|
9662
|
-
/* @__PURE__ */
|
|
9509
|
+
return /* @__PURE__ */ jsxs16("div", { children: [
|
|
9510
|
+
/* @__PURE__ */ jsxs16("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "24px" }, children: [
|
|
9511
|
+
/* @__PURE__ */ jsx17("h2", { style: { fontSize: "20px", fontWeight: 600, color: "var(--chatllm-text, #1f2937)", margin: 0 }, children: title }),
|
|
9512
|
+
/* @__PURE__ */ jsxs16("span", { style: { fontSize: "13px", color: "var(--chatllm-text-muted, #9ca3af)" }, children: [
|
|
9663
9513
|
items.length,
|
|
9664
9514
|
"\uAC1C \uD56D\uBAA9"
|
|
9665
9515
|
] })
|
|
9666
9516
|
] }),
|
|
9667
|
-
/* @__PURE__ */
|
|
9517
|
+
/* @__PURE__ */ jsx17("div", { style: { display: "flex", gap: "6px", marginBottom: "20px", flexWrap: "wrap" }, children: ["all", "fact", "skill", "preference"].map((tab) => /* @__PURE__ */ jsx17(
|
|
9668
9518
|
"button",
|
|
9669
9519
|
{
|
|
9670
9520
|
onClick: () => setActiveFilter(tab),
|
|
@@ -9682,7 +9532,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9682
9532
|
},
|
|
9683
9533
|
tab
|
|
9684
9534
|
)) }),
|
|
9685
|
-
contextSummary && activeFilter === "all" && /* @__PURE__ */
|
|
9535
|
+
contextSummary && activeFilter === "all" && /* @__PURE__ */ jsxs16(
|
|
9686
9536
|
"div",
|
|
9687
9537
|
{
|
|
9688
9538
|
style: {
|
|
@@ -9693,19 +9543,19 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9693
9543
|
borderLeft: "3px solid var(--chatllm-primary, #3b82f6)"
|
|
9694
9544
|
},
|
|
9695
9545
|
children: [
|
|
9696
|
-
/* @__PURE__ */
|
|
9697
|
-
/* @__PURE__ */
|
|
9698
|
-
/* @__PURE__ */
|
|
9546
|
+
/* @__PURE__ */ jsxs16("div", { style: { display: "flex", alignItems: "center", gap: "6px", marginBottom: "8px" }, children: [
|
|
9547
|
+
/* @__PURE__ */ jsx17(IconSvg, { name: "file-text-line", size: 14, color: "var(--chatllm-primary, #3b82f6)" }),
|
|
9548
|
+
/* @__PURE__ */ jsx17("span", { style: { fontSize: "12px", fontWeight: 500, color: "var(--chatllm-primary, #3b82f6)" }, children: "\uB300\uD654 \uC694\uC57D" })
|
|
9699
9549
|
] }),
|
|
9700
|
-
/* @__PURE__ */
|
|
9550
|
+
/* @__PURE__ */ jsx17("p", { style: { fontSize: "13px", lineHeight: "1.6", color: "var(--chatllm-text, #374151)", margin: 0 }, children: contextSummary })
|
|
9701
9551
|
]
|
|
9702
9552
|
}
|
|
9703
9553
|
),
|
|
9704
|
-
filteredItems.length === 0 ? /* @__PURE__ */
|
|
9705
|
-
/* @__PURE__ */
|
|
9706
|
-
/* @__PURE__ */
|
|
9707
|
-
/* @__PURE__ */
|
|
9708
|
-
] }) : /* @__PURE__ */
|
|
9554
|
+
filteredItems.length === 0 ? /* @__PURE__ */ jsxs16("div", { style: { padding: "40px 16px", textAlign: "center" }, children: [
|
|
9555
|
+
/* @__PURE__ */ jsx17(IconSvg, { name: "robot-line", size: 40, color: "var(--chatllm-text-muted, #d1d5db)" }),
|
|
9556
|
+
/* @__PURE__ */ jsx17("p", { style: { fontSize: "14px", color: "var(--chatllm-text-muted, #9ca3af)", marginTop: "12px" }, children: emptyMessage }),
|
|
9557
|
+
/* @__PURE__ */ jsx17("p", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #d1d5db)", marginTop: "4px" }, children: emptyDescription })
|
|
9558
|
+
] }) : /* @__PURE__ */ jsx17("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: filteredItems.map((item) => /* @__PURE__ */ jsxs16(
|
|
9709
9559
|
"div",
|
|
9710
9560
|
{
|
|
9711
9561
|
style: {
|
|
@@ -9718,10 +9568,10 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9718
9568
|
},
|
|
9719
9569
|
onClick: () => setExpandedId(expandedId === item.id ? null : item.id),
|
|
9720
9570
|
children: [
|
|
9721
|
-
/* @__PURE__ */
|
|
9722
|
-
/* @__PURE__ */
|
|
9723
|
-
/* @__PURE__ */
|
|
9724
|
-
item.category && /* @__PURE__ */
|
|
9571
|
+
/* @__PURE__ */ jsxs16("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between" }, children: [
|
|
9572
|
+
/* @__PURE__ */ jsxs16("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
9573
|
+
/* @__PURE__ */ jsxs16("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [
|
|
9574
|
+
item.category && /* @__PURE__ */ jsx17(
|
|
9725
9575
|
"span",
|
|
9726
9576
|
{
|
|
9727
9577
|
style: {
|
|
@@ -9735,12 +9585,12 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9735
9585
|
children: memoryCategoryLabels[item.category]
|
|
9736
9586
|
}
|
|
9737
9587
|
),
|
|
9738
|
-
/* @__PURE__ */
|
|
9588
|
+
/* @__PURE__ */ jsx17("span", { style: { fontSize: "11px", color: "var(--chatllm-text-muted, #9ca3af)" }, children: formatDate(item.timestamp) })
|
|
9739
9589
|
] }),
|
|
9740
|
-
/* @__PURE__ */
|
|
9590
|
+
/* @__PURE__ */ jsx17("div", { style: { fontSize: "13px", fontWeight: 500, color: "var(--chatllm-text, #1f2937)" }, children: item.key })
|
|
9741
9591
|
] }),
|
|
9742
|
-
/* @__PURE__ */
|
|
9743
|
-
onDelete && /* @__PURE__ */
|
|
9592
|
+
/* @__PURE__ */ jsxs16("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
9593
|
+
onDelete && /* @__PURE__ */ jsx17(
|
|
9744
9594
|
"button",
|
|
9745
9595
|
{
|
|
9746
9596
|
onClick: (e) => {
|
|
@@ -9756,10 +9606,10 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9756
9606
|
opacity: 0.5
|
|
9757
9607
|
},
|
|
9758
9608
|
"aria-label": "\uBA54\uBAA8\uB9AC \uC0AD\uC81C",
|
|
9759
|
-
children: /* @__PURE__ */
|
|
9609
|
+
children: /* @__PURE__ */ jsx17(IconSvg, { name: "delete-bin-line", size: 14, color: "var(--chatllm-text-muted, #9ca3af)" })
|
|
9760
9610
|
}
|
|
9761
9611
|
),
|
|
9762
|
-
/* @__PURE__ */
|
|
9612
|
+
/* @__PURE__ */ jsx17(
|
|
9763
9613
|
IconSvg,
|
|
9764
9614
|
{
|
|
9765
9615
|
name: expandedId === item.id ? "arrow-up-s-line" : "arrow-down-s-line",
|
|
@@ -9769,7 +9619,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9769
9619
|
)
|
|
9770
9620
|
] })
|
|
9771
9621
|
] }),
|
|
9772
|
-
expandedId === item.id && /* @__PURE__ */
|
|
9622
|
+
expandedId === item.id && /* @__PURE__ */ jsx17(
|
|
9773
9623
|
"div",
|
|
9774
9624
|
{
|
|
9775
9625
|
style: {
|
|
@@ -9777,7 +9627,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9777
9627
|
paddingTop: "12px",
|
|
9778
9628
|
borderTop: "1px solid var(--chatllm-border-light, #f3f4f6)"
|
|
9779
9629
|
},
|
|
9780
|
-
children: /* @__PURE__ */
|
|
9630
|
+
children: /* @__PURE__ */ jsx17(
|
|
9781
9631
|
"p",
|
|
9782
9632
|
{
|
|
9783
9633
|
style: {
|
|
@@ -9796,7 +9646,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9796
9646
|
},
|
|
9797
9647
|
item.id
|
|
9798
9648
|
)) }),
|
|
9799
|
-
onClearAll && items.length > 0 && /* @__PURE__ */
|
|
9649
|
+
onClearAll && items.length > 0 && /* @__PURE__ */ jsx17("div", { style: { marginTop: "24px", paddingTop: "16px", borderTop: "1px solid var(--chatllm-border, #e5e7eb)" }, children: /* @__PURE__ */ jsx17(
|
|
9800
9650
|
"button",
|
|
9801
9651
|
{
|
|
9802
9652
|
onClick: () => {
|
|
@@ -9813,7 +9663,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9813
9663
|
|
|
9814
9664
|
// src/react/components/ProjectSettingsModal.tsx
|
|
9815
9665
|
import { useState as useState17, useEffect as useEffect9 } from "react";
|
|
9816
|
-
import { jsx as
|
|
9666
|
+
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
9817
9667
|
var COLOR_PRESETS = [
|
|
9818
9668
|
"#2563eb",
|
|
9819
9669
|
"#7c3aed",
|
|
@@ -9894,7 +9744,7 @@ var ProjectSettingsModal = ({
|
|
|
9894
9744
|
cursor: "pointer",
|
|
9895
9745
|
fontFamily: "inherit"
|
|
9896
9746
|
});
|
|
9897
|
-
return /* @__PURE__ */
|
|
9747
|
+
return /* @__PURE__ */ jsx18(
|
|
9898
9748
|
"div",
|
|
9899
9749
|
{
|
|
9900
9750
|
style: {
|
|
@@ -9909,7 +9759,7 @@ var ProjectSettingsModal = ({
|
|
|
9909
9759
|
onClick: (e) => {
|
|
9910
9760
|
if (e.target === e.currentTarget) onClose();
|
|
9911
9761
|
},
|
|
9912
|
-
children: /* @__PURE__ */
|
|
9762
|
+
children: /* @__PURE__ */ jsxs17(
|
|
9913
9763
|
"div",
|
|
9914
9764
|
{
|
|
9915
9765
|
style: {
|
|
@@ -9923,7 +9773,7 @@ var ProjectSettingsModal = ({
|
|
|
9923
9773
|
overflow: "hidden"
|
|
9924
9774
|
},
|
|
9925
9775
|
children: [
|
|
9926
|
-
/* @__PURE__ */
|
|
9776
|
+
/* @__PURE__ */ jsxs17(
|
|
9927
9777
|
"div",
|
|
9928
9778
|
{
|
|
9929
9779
|
style: {
|
|
@@ -9933,8 +9783,8 @@ var ProjectSettingsModal = ({
|
|
|
9933
9783
|
padding: "20px 24px 0"
|
|
9934
9784
|
},
|
|
9935
9785
|
children: [
|
|
9936
|
-
/* @__PURE__ */
|
|
9937
|
-
/* @__PURE__ */
|
|
9786
|
+
/* @__PURE__ */ jsx18("h2", { style: { fontSize: "16px", fontWeight: 600, margin: 0, color: "var(--chatllm-text, #1a1a1a)" }, children: "\uD504\uB85C\uC81D\uD2B8 \uC124\uC815" }),
|
|
9787
|
+
/* @__PURE__ */ jsx18(
|
|
9938
9788
|
"button",
|
|
9939
9789
|
{
|
|
9940
9790
|
onClick: onClose,
|
|
@@ -9947,13 +9797,13 @@ var ProjectSettingsModal = ({
|
|
|
9947
9797
|
alignItems: "center"
|
|
9948
9798
|
},
|
|
9949
9799
|
"aria-label": "\uB2EB\uAE30",
|
|
9950
|
-
children: /* @__PURE__ */
|
|
9800
|
+
children: /* @__PURE__ */ jsx18(IconSvg, { name: "close-line", size: 20, color: "var(--chatllm-text-muted, #999)" })
|
|
9951
9801
|
}
|
|
9952
9802
|
)
|
|
9953
9803
|
]
|
|
9954
9804
|
}
|
|
9955
9805
|
),
|
|
9956
|
-
/* @__PURE__ */
|
|
9806
|
+
/* @__PURE__ */ jsxs17(
|
|
9957
9807
|
"div",
|
|
9958
9808
|
{
|
|
9959
9809
|
style: {
|
|
@@ -9963,9 +9813,9 @@ var ProjectSettingsModal = ({
|
|
|
9963
9813
|
borderBottom: "1px solid var(--chatllm-border, #e0e0e0)"
|
|
9964
9814
|
},
|
|
9965
9815
|
children: [
|
|
9966
|
-
/* @__PURE__ */
|
|
9967
|
-
/* @__PURE__ */
|
|
9968
|
-
/* @__PURE__ */
|
|
9816
|
+
/* @__PURE__ */ jsx18("button", { onClick: () => setActiveTab("general"), style: tabStyle("general"), children: "\uC77C\uBC18" }),
|
|
9817
|
+
/* @__PURE__ */ jsx18("button", { onClick: () => setActiveTab("instructions"), style: tabStyle("instructions"), children: "\uC9C0\uCE68" }),
|
|
9818
|
+
/* @__PURE__ */ jsxs17("button", { onClick: () => setActiveTab("files"), style: tabStyle("files"), children: [
|
|
9969
9819
|
"\uD30C\uC77C (",
|
|
9970
9820
|
project.files.length,
|
|
9971
9821
|
")"
|
|
@@ -9973,11 +9823,11 @@ var ProjectSettingsModal = ({
|
|
|
9973
9823
|
]
|
|
9974
9824
|
}
|
|
9975
9825
|
),
|
|
9976
|
-
/* @__PURE__ */
|
|
9977
|
-
activeTab === "general" && /* @__PURE__ */
|
|
9978
|
-
/* @__PURE__ */
|
|
9979
|
-
/* @__PURE__ */
|
|
9980
|
-
/* @__PURE__ */
|
|
9826
|
+
/* @__PURE__ */ jsxs17("div", { style: { padding: "24px", overflowY: "auto", flex: 1 }, children: [
|
|
9827
|
+
activeTab === "general" && /* @__PURE__ */ jsxs17("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
9828
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
9829
|
+
/* @__PURE__ */ jsx18("label", { style: { display: "block", fontSize: "13px", fontWeight: 500, marginBottom: "6px", color: "var(--chatllm-text, #1a1a1a)" }, children: "\uD504\uB85C\uC81D\uD2B8 \uC774\uB984" }),
|
|
9830
|
+
/* @__PURE__ */ jsx18(
|
|
9981
9831
|
"input",
|
|
9982
9832
|
{
|
|
9983
9833
|
type: "text",
|
|
@@ -9999,9 +9849,9 @@ var ProjectSettingsModal = ({
|
|
|
9999
9849
|
}
|
|
10000
9850
|
)
|
|
10001
9851
|
] }),
|
|
10002
|
-
/* @__PURE__ */
|
|
10003
|
-
/* @__PURE__ */
|
|
10004
|
-
/* @__PURE__ */
|
|
9852
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
9853
|
+
/* @__PURE__ */ jsx18("label", { style: { display: "block", fontSize: "13px", fontWeight: 500, marginBottom: "6px", color: "var(--chatllm-text, #1a1a1a)" }, children: "\uC124\uBA85" }),
|
|
9854
|
+
/* @__PURE__ */ jsx18(
|
|
10005
9855
|
"textarea",
|
|
10006
9856
|
{
|
|
10007
9857
|
value: description,
|
|
@@ -10022,9 +9872,9 @@ var ProjectSettingsModal = ({
|
|
|
10022
9872
|
}
|
|
10023
9873
|
)
|
|
10024
9874
|
] }),
|
|
10025
|
-
/* @__PURE__ */
|
|
10026
|
-
/* @__PURE__ */
|
|
10027
|
-
/* @__PURE__ */
|
|
9875
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
9876
|
+
/* @__PURE__ */ jsx18("label", { style: { display: "block", fontSize: "13px", fontWeight: 500, marginBottom: "6px", color: "var(--chatllm-text, #1a1a1a)" }, children: "\uC0C9\uC0C1" }),
|
|
9877
|
+
/* @__PURE__ */ jsx18("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap" }, children: COLOR_PRESETS.map((c) => /* @__PURE__ */ jsx18(
|
|
10028
9878
|
"button",
|
|
10029
9879
|
{
|
|
10030
9880
|
onClick: () => setColor(c),
|
|
@@ -10042,8 +9892,8 @@ var ProjectSettingsModal = ({
|
|
|
10042
9892
|
c
|
|
10043
9893
|
)) })
|
|
10044
9894
|
] }),
|
|
10045
|
-
/* @__PURE__ */
|
|
10046
|
-
!isDefaultProject && onDeleteProject && /* @__PURE__ */
|
|
9895
|
+
/* @__PURE__ */ jsxs17("div", { style: { display: "flex", gap: "8px", justifyContent: "flex-end", marginTop: "8px" }, children: [
|
|
9896
|
+
!isDefaultProject && onDeleteProject && /* @__PURE__ */ jsx18(
|
|
10047
9897
|
"button",
|
|
10048
9898
|
{
|
|
10049
9899
|
onClick: () => {
|
|
@@ -10066,7 +9916,7 @@ var ProjectSettingsModal = ({
|
|
|
10066
9916
|
children: "\uD504\uB85C\uC81D\uD2B8 \uC0AD\uC81C"
|
|
10067
9917
|
}
|
|
10068
9918
|
),
|
|
10069
|
-
/* @__PURE__ */
|
|
9919
|
+
/* @__PURE__ */ jsx18(
|
|
10070
9920
|
"button",
|
|
10071
9921
|
{
|
|
10072
9922
|
onClick: handleSaveGeneral,
|
|
@@ -10086,9 +9936,9 @@ var ProjectSettingsModal = ({
|
|
|
10086
9936
|
)
|
|
10087
9937
|
] })
|
|
10088
9938
|
] }),
|
|
10089
|
-
activeTab === "instructions" && /* @__PURE__ */
|
|
10090
|
-
/* @__PURE__ */
|
|
10091
|
-
/* @__PURE__ */
|
|
9939
|
+
activeTab === "instructions" && /* @__PURE__ */ jsxs17("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
9940
|
+
/* @__PURE__ */ jsx18("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." }),
|
|
9941
|
+
/* @__PURE__ */ jsx18(
|
|
10092
9942
|
"textarea",
|
|
10093
9943
|
{
|
|
10094
9944
|
value: instructions,
|
|
@@ -10109,7 +9959,7 @@ var ProjectSettingsModal = ({
|
|
|
10109
9959
|
}
|
|
10110
9960
|
}
|
|
10111
9961
|
),
|
|
10112
|
-
/* @__PURE__ */
|
|
9962
|
+
/* @__PURE__ */ jsx18("div", { style: { display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ jsx18(
|
|
10113
9963
|
"button",
|
|
10114
9964
|
{
|
|
10115
9965
|
onClick: handleSaveInstructions,
|
|
@@ -10128,10 +9978,10 @@ var ProjectSettingsModal = ({
|
|
|
10128
9978
|
}
|
|
10129
9979
|
) })
|
|
10130
9980
|
] }),
|
|
10131
|
-
activeTab === "files" && /* @__PURE__ */
|
|
10132
|
-
/* @__PURE__ */
|
|
10133
|
-
/* @__PURE__ */
|
|
10134
|
-
/* @__PURE__ */
|
|
9981
|
+
activeTab === "files" && /* @__PURE__ */ jsxs17("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
9982
|
+
/* @__PURE__ */ jsxs17("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
9983
|
+
/* @__PURE__ */ jsx18("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." }),
|
|
9984
|
+
/* @__PURE__ */ jsxs17(
|
|
10135
9985
|
"button",
|
|
10136
9986
|
{
|
|
10137
9987
|
onClick: handleFileUpload,
|
|
@@ -10149,13 +9999,13 @@ var ProjectSettingsModal = ({
|
|
|
10149
9999
|
color: "var(--chatllm-text, #1a1a1a)"
|
|
10150
10000
|
},
|
|
10151
10001
|
children: [
|
|
10152
|
-
/* @__PURE__ */
|
|
10002
|
+
/* @__PURE__ */ jsx18(IconSvg, { name: "upload-line", size: 14 }),
|
|
10153
10003
|
"\uC5C5\uB85C\uB4DC"
|
|
10154
10004
|
]
|
|
10155
10005
|
}
|
|
10156
10006
|
)
|
|
10157
10007
|
] }),
|
|
10158
|
-
project.files.length === 0 ? /* @__PURE__ */
|
|
10008
|
+
project.files.length === 0 ? /* @__PURE__ */ jsx18(
|
|
10159
10009
|
"div",
|
|
10160
10010
|
{
|
|
10161
10011
|
style: {
|
|
@@ -10168,7 +10018,7 @@ var ProjectSettingsModal = ({
|
|
|
10168
10018
|
},
|
|
10169
10019
|
children: "\uC544\uC9C1 \uD30C\uC77C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"
|
|
10170
10020
|
}
|
|
10171
|
-
) : /* @__PURE__ */
|
|
10021
|
+
) : /* @__PURE__ */ jsx18("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: project.files.map((file) => /* @__PURE__ */ jsxs17(
|
|
10172
10022
|
"div",
|
|
10173
10023
|
{
|
|
10174
10024
|
style: {
|
|
@@ -10180,10 +10030,10 @@ var ProjectSettingsModal = ({
|
|
|
10180
10030
|
borderRadius: "6px"
|
|
10181
10031
|
},
|
|
10182
10032
|
children: [
|
|
10183
|
-
/* @__PURE__ */
|
|
10184
|
-
/* @__PURE__ */
|
|
10185
|
-
/* @__PURE__ */
|
|
10186
|
-
/* @__PURE__ */
|
|
10033
|
+
/* @__PURE__ */ jsxs17("div", { style: { display: "flex", alignItems: "center", gap: "10px", overflow: "hidden" }, children: [
|
|
10034
|
+
/* @__PURE__ */ jsx18(IconSvg, { name: getFileIcon2(file.type), size: 18, color: "var(--chatllm-text-muted, #999)" }),
|
|
10035
|
+
/* @__PURE__ */ jsxs17("div", { style: { overflow: "hidden" }, children: [
|
|
10036
|
+
/* @__PURE__ */ jsx18(
|
|
10187
10037
|
"div",
|
|
10188
10038
|
{
|
|
10189
10039
|
style: {
|
|
@@ -10197,13 +10047,13 @@ var ProjectSettingsModal = ({
|
|
|
10197
10047
|
children: file.name
|
|
10198
10048
|
}
|
|
10199
10049
|
),
|
|
10200
|
-
/* @__PURE__ */
|
|
10050
|
+
/* @__PURE__ */ jsxs17("div", { style: { fontSize: "11px", color: "var(--chatllm-text-muted, #999)" }, children: [
|
|
10201
10051
|
file.type,
|
|
10202
10052
|
formatSize(file.size) ? ` \xB7 ${formatSize(file.size)}` : ""
|
|
10203
10053
|
] })
|
|
10204
10054
|
] })
|
|
10205
10055
|
] }),
|
|
10206
|
-
/* @__PURE__ */
|
|
10056
|
+
/* @__PURE__ */ jsx18(
|
|
10207
10057
|
"button",
|
|
10208
10058
|
{
|
|
10209
10059
|
onClick: () => onDeleteFile(project.id, file.id),
|
|
@@ -10224,7 +10074,7 @@ var ProjectSettingsModal = ({
|
|
|
10224
10074
|
e.currentTarget.style.opacity = "0.5";
|
|
10225
10075
|
},
|
|
10226
10076
|
"aria-label": `${file.name} \uC0AD\uC81C`,
|
|
10227
|
-
children: /* @__PURE__ */
|
|
10077
|
+
children: /* @__PURE__ */ jsx18(IconSvg, { name: "delete-bin-line", size: 16, color: "#dc2626" })
|
|
10228
10078
|
}
|
|
10229
10079
|
)
|
|
10230
10080
|
]
|
|
@@ -10241,14 +10091,14 @@ var ProjectSettingsModal = ({
|
|
|
10241
10091
|
};
|
|
10242
10092
|
|
|
10243
10093
|
// src/react/components/DisclaimerModal.tsx
|
|
10244
|
-
import { jsx as
|
|
10094
|
+
import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
10245
10095
|
var highlightStyle = {
|
|
10246
10096
|
color: "var(--chatllm-text, #1e293b)",
|
|
10247
10097
|
fontWeight: 600
|
|
10248
10098
|
};
|
|
10249
10099
|
var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
10250
10100
|
if (!isOpen) return null;
|
|
10251
|
-
return /* @__PURE__ */
|
|
10101
|
+
return /* @__PURE__ */ jsx19(
|
|
10252
10102
|
"div",
|
|
10253
10103
|
{
|
|
10254
10104
|
className: "chatllm-disclaimer-overlay",
|
|
@@ -10262,7 +10112,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10262
10112
|
zIndex: 1e3
|
|
10263
10113
|
},
|
|
10264
10114
|
onClick: onClose,
|
|
10265
|
-
children: /* @__PURE__ */
|
|
10115
|
+
children: /* @__PURE__ */ jsxs18(
|
|
10266
10116
|
"div",
|
|
10267
10117
|
{
|
|
10268
10118
|
className: "chatllm-disclaimer-modal",
|
|
@@ -10280,7 +10130,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10280
10130
|
},
|
|
10281
10131
|
onClick: (e) => e.stopPropagation(),
|
|
10282
10132
|
children: [
|
|
10283
|
-
/* @__PURE__ */
|
|
10133
|
+
/* @__PURE__ */ jsxs18(
|
|
10284
10134
|
"div",
|
|
10285
10135
|
{
|
|
10286
10136
|
style: {
|
|
@@ -10291,9 +10141,9 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10291
10141
|
borderBottom: "1px solid var(--chatllm-border, #e5e7eb)"
|
|
10292
10142
|
},
|
|
10293
10143
|
children: [
|
|
10294
|
-
/* @__PURE__ */
|
|
10295
|
-
/* @__PURE__ */
|
|
10296
|
-
/* @__PURE__ */
|
|
10144
|
+
/* @__PURE__ */ jsxs18("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
10145
|
+
/* @__PURE__ */ jsx19(IconSvg, { name: "error-warning-line", size: 20, color: "var(--chatllm-primary, #4A90E2)" }),
|
|
10146
|
+
/* @__PURE__ */ jsx19(
|
|
10297
10147
|
"h2",
|
|
10298
10148
|
{
|
|
10299
10149
|
style: {
|
|
@@ -10306,7 +10156,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10306
10156
|
}
|
|
10307
10157
|
)
|
|
10308
10158
|
] }),
|
|
10309
|
-
/* @__PURE__ */
|
|
10159
|
+
/* @__PURE__ */ jsx19(
|
|
10310
10160
|
"button",
|
|
10311
10161
|
{
|
|
10312
10162
|
onClick: onClose,
|
|
@@ -10321,13 +10171,13 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10321
10171
|
alignItems: "center",
|
|
10322
10172
|
justifyContent: "center"
|
|
10323
10173
|
},
|
|
10324
|
-
children: /* @__PURE__ */
|
|
10174
|
+
children: /* @__PURE__ */ jsx19(IconSvg, { name: "close-line", size: 20, color: "var(--chatllm-text-muted, #64748b)" })
|
|
10325
10175
|
}
|
|
10326
10176
|
)
|
|
10327
10177
|
]
|
|
10328
10178
|
}
|
|
10329
10179
|
),
|
|
10330
|
-
/* @__PURE__ */
|
|
10180
|
+
/* @__PURE__ */ jsxs18(
|
|
10331
10181
|
"div",
|
|
10332
10182
|
{
|
|
10333
10183
|
className: "chatllm-scrollbar",
|
|
@@ -10339,12 +10189,12 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10339
10189
|
color: "var(--chatllm-text-secondary, #475569)"
|
|
10340
10190
|
},
|
|
10341
10191
|
children: [
|
|
10342
|
-
/* @__PURE__ */
|
|
10192
|
+
/* @__PURE__ */ jsxs18("p", { style: { margin: "0 0 16px" }, children: [
|
|
10343
10193
|
"\uC800\uB294 \uC5EC\uB7EC\uBD84\uC758 \uC9C8\uBB38\uC5D0 ",
|
|
10344
|
-
/* @__PURE__ */
|
|
10194
|
+
/* @__PURE__ */ jsx19("span", { style: highlightStyle, children: "\uCD5C\uC120\uC758 \uB2F5\uBCC0\uC744 \uB4DC\uB9AC\uAE30 \uC704\uD574 \uD56D\uC0C1 \uB178\uB825" }),
|
|
10345
10195
|
"\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."
|
|
10346
10196
|
] }),
|
|
10347
|
-
/* @__PURE__ */
|
|
10197
|
+
/* @__PURE__ */ jsxs18(
|
|
10348
10198
|
"div",
|
|
10349
10199
|
{
|
|
10350
10200
|
style: {
|
|
@@ -10357,33 +10207,33 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10357
10207
|
lineHeight: 1.7
|
|
10358
10208
|
},
|
|
10359
10209
|
children: [
|
|
10360
|
-
/* @__PURE__ */
|
|
10361
|
-
/* @__PURE__ */
|
|
10362
|
-
/* @__PURE__ */
|
|
10363
|
-
/* @__PURE__ */
|
|
10364
|
-
/* @__PURE__ */
|
|
10210
|
+
/* @__PURE__ */ jsx19("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" }),
|
|
10211
|
+
/* @__PURE__ */ jsxs18("ul", { style: { margin: 0, paddingLeft: "18px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
10212
|
+
/* @__PURE__ */ jsx19("li", { children: "\uCD5C\uC2E0 \uC815\uBCF4\uB97C \uBC18\uC601\uD558\uC9C0 \uBABB\uD55C \uB2F5\uBCC0\uC744 \uB4DC\uB9AC\uB294 \uACBD\uC6B0" }),
|
|
10213
|
+
/* @__PURE__ */ jsx19("li", { children: "\uADF8\uB7F4\uB4EF\uD558\uAC8C \uB4E4\uB9AC\uC9C0\uB9CC \uC2E4\uC81C\uB85C\uB294 \uC815\uD655\uD558\uC9C0 \uC54A\uC740 \uB0B4\uC6A9" }),
|
|
10214
|
+
/* @__PURE__ */ jsx19("li", { children: "\uC2E4\uC81C\uB85C \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 \uCD9C\uCC98\uB098 \uC778\uC6A9\uC744 \uB9CC\uB4E4\uC5B4\uB0B4\uB294 \uACBD\uC6B0" })
|
|
10365
10215
|
] })
|
|
10366
10216
|
]
|
|
10367
10217
|
}
|
|
10368
10218
|
),
|
|
10369
|
-
/* @__PURE__ */
|
|
10219
|
+
/* @__PURE__ */ jsxs18("p", { style: { margin: "0 0 16px" }, children: [
|
|
10370
10220
|
"\uC774\uB7F0 \uD604\uC0C1\uC744 ",
|
|
10371
|
-
/* @__PURE__ */
|
|
10221
|
+
/* @__PURE__ */ jsx19("span", { style: highlightStyle, children: "'\uD658\uAC01(Hallucination)'" }),
|
|
10372
10222
|
"\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, ",
|
|
10373
|
-
/* @__PURE__ */
|
|
10223
|
+
/* @__PURE__ */ jsx19("span", { style: highlightStyle, children: "\uD55C \uBC88 \uB354 \uD655\uC778" }),
|
|
10374
10224
|
"\uD574 \uC8FC\uC2DC\uBA74 \uAC10\uC0AC\uD558\uACA0\uC2B5\uB2C8\uB2E4."
|
|
10375
10225
|
] }),
|
|
10376
|
-
/* @__PURE__ */
|
|
10377
|
-
/* @__PURE__ */
|
|
10226
|
+
/* @__PURE__ */ jsxs18("p", { style: { margin: "0 0 16px" }, children: [
|
|
10227
|
+
/* @__PURE__ */ jsx19("span", { style: highlightStyle, children: "\uC81C \uB2F5\uBCC0\uC740 \uCC38\uACE0 \uC790\uB8CC" }),
|
|
10378
10228
|
"\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."
|
|
10379
10229
|
] }),
|
|
10380
|
-
/* @__PURE__ */
|
|
10230
|
+
/* @__PURE__ */ jsxs18("p", { style: { margin: "0 0 16px" }, children: [
|
|
10381
10231
|
"\uC81C\uAC00 \uC6F9 \uAC80\uC0C9 \uACB0\uACFC\uB97C \uC54C\uB824\uB4DC\uB9B4 \uB54C\uB3C4,",
|
|
10382
10232
|
" ",
|
|
10383
|
-
/* @__PURE__ */
|
|
10233
|
+
/* @__PURE__ */ jsx19("span", { style: highlightStyle, children: "\uC6D0\uBCF8 \uCD9C\uCC98\uB97C \uC9C1\uC811 \uD655\uC778" }),
|
|
10384
10234
|
"\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."
|
|
10385
10235
|
] }),
|
|
10386
|
-
/* @__PURE__ */
|
|
10236
|
+
/* @__PURE__ */ jsx19(
|
|
10387
10237
|
"div",
|
|
10388
10238
|
{
|
|
10389
10239
|
style: {
|
|
@@ -10394,10 +10244,10 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10394
10244
|
lineHeight: 1.7,
|
|
10395
10245
|
textAlign: "center"
|
|
10396
10246
|
},
|
|
10397
|
-
children: /* @__PURE__ */
|
|
10247
|
+
children: /* @__PURE__ */ jsxs18("p", { style: { margin: 0 }, children: [
|
|
10398
10248
|
"\uC800\uC5D0 \uB300\uD55C \uC758\uACAC\uC774\uB098 \uAC1C\uC120 \uC81C\uC548\uC774 \uC788\uC73C\uC2DC\uB2E4\uBA74",
|
|
10399
10249
|
" ",
|
|
10400
|
-
/* @__PURE__ */
|
|
10250
|
+
/* @__PURE__ */ jsx19(
|
|
10401
10251
|
"a",
|
|
10402
10252
|
{
|
|
10403
10253
|
href: "mailto:info@gendive.ai",
|
|
@@ -10410,7 +10260,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10410
10260
|
}
|
|
10411
10261
|
),
|
|
10412
10262
|
"\uB85C \uC54C\uB824\uC8FC\uC138\uC694.",
|
|
10413
|
-
/* @__PURE__ */
|
|
10263
|
+
/* @__PURE__ */ jsx19("br", {}),
|
|
10414
10264
|
"\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."
|
|
10415
10265
|
] })
|
|
10416
10266
|
}
|
|
@@ -10426,7 +10276,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10426
10276
|
};
|
|
10427
10277
|
|
|
10428
10278
|
// src/react/ChatUI.tsx
|
|
10429
|
-
import { jsx as
|
|
10279
|
+
import { Fragment as Fragment8, jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
10430
10280
|
var DEFAULT_ACTIONS = [];
|
|
10431
10281
|
var DEFAULT_TEMPLATES = [];
|
|
10432
10282
|
var DEFAULT_MODELS = [
|
|
@@ -10469,6 +10319,16 @@ var injectStyles = () => {
|
|
|
10469
10319
|
100% { transform: rotate(360deg); }
|
|
10470
10320
|
}
|
|
10471
10321
|
|
|
10322
|
+
@keyframes chatllm-welcome-exit {
|
|
10323
|
+
from { opacity: 1; transform: translateY(0); }
|
|
10324
|
+
to { opacity: 0; transform: translateY(-16px); }
|
|
10325
|
+
}
|
|
10326
|
+
|
|
10327
|
+
@keyframes chatllm-chat-enter {
|
|
10328
|
+
from { opacity: 0; }
|
|
10329
|
+
to { opacity: 1; }
|
|
10330
|
+
}
|
|
10331
|
+
|
|
10472
10332
|
.chatllm-root {
|
|
10473
10333
|
--chatllm-primary: #4A90E2;
|
|
10474
10334
|
--chatllm-primary-hover: #357ABD;
|
|
@@ -10674,7 +10534,8 @@ var ChatUIView = ({
|
|
|
10674
10534
|
className,
|
|
10675
10535
|
apiKey,
|
|
10676
10536
|
onApiKeyChange,
|
|
10677
|
-
deepResearchEnabled
|
|
10537
|
+
deepResearchEnabled,
|
|
10538
|
+
suggestedPrompts
|
|
10678
10539
|
}) => {
|
|
10679
10540
|
const {
|
|
10680
10541
|
sessions,
|
|
@@ -10742,6 +10603,19 @@ var ChatUIView = ({
|
|
|
10742
10603
|
isSessionsLoading
|
|
10743
10604
|
} = state;
|
|
10744
10605
|
const [disclaimerOpen, setDisclaimerOpen] = React15.useState(false);
|
|
10606
|
+
const [welcomeExiting, setWelcomeExiting] = React15.useState(false);
|
|
10607
|
+
const prevMessageCountRef = React15.useRef(messages.length);
|
|
10608
|
+
React15.useEffect(() => {
|
|
10609
|
+
let timer;
|
|
10610
|
+
if (prevMessageCountRef.current === 0 && messages.length > 0) {
|
|
10611
|
+
setWelcomeExiting(true);
|
|
10612
|
+
timer = setTimeout(() => setWelcomeExiting(false), 400);
|
|
10613
|
+
}
|
|
10614
|
+
prevMessageCountRef.current = messages.length;
|
|
10615
|
+
return () => {
|
|
10616
|
+
if (timer) clearTimeout(timer);
|
|
10617
|
+
};
|
|
10618
|
+
}, [messages.length]);
|
|
10745
10619
|
const greeting = currentPersonalization.userProfile.nickname ? `\uC548\uB155\uD558\uC138\uC694, ${currentPersonalization.userProfile.nickname}\uB2D8` : "\uC548\uB155\uD558\uC138\uC694";
|
|
10746
10620
|
const handleTemplateClick = (template) => {
|
|
10747
10621
|
setInput(template.prompt);
|
|
@@ -10784,7 +10658,7 @@ var ChatUIView = ({
|
|
|
10784
10658
|
return items;
|
|
10785
10659
|
}, [projectMemory?.state.entries]);
|
|
10786
10660
|
const themeClass = theme?.mode === "dark" ? "chatllm-dark" : "";
|
|
10787
|
-
return /* @__PURE__ */
|
|
10661
|
+
return /* @__PURE__ */ jsxs19(
|
|
10788
10662
|
"div",
|
|
10789
10663
|
{
|
|
10790
10664
|
className: `chatllm-root ${themeClass} ${className}`,
|
|
@@ -10797,7 +10671,7 @@ var ChatUIView = ({
|
|
|
10797
10671
|
position: "relative"
|
|
10798
10672
|
},
|
|
10799
10673
|
children: [
|
|
10800
|
-
showSidebar && /* @__PURE__ */
|
|
10674
|
+
showSidebar && /* @__PURE__ */ jsx20(
|
|
10801
10675
|
ChatSidebar,
|
|
10802
10676
|
{
|
|
10803
10677
|
sessions,
|
|
@@ -10829,7 +10703,7 @@ var ChatUIView = ({
|
|
|
10829
10703
|
isLoading: isSessionsLoading
|
|
10830
10704
|
}
|
|
10831
10705
|
),
|
|
10832
|
-
/* @__PURE__ */
|
|
10706
|
+
/* @__PURE__ */ jsxs19(
|
|
10833
10707
|
"main",
|
|
10834
10708
|
{
|
|
10835
10709
|
style: {
|
|
@@ -10841,7 +10715,7 @@ var ChatUIView = ({
|
|
|
10841
10715
|
minWidth: 0
|
|
10842
10716
|
},
|
|
10843
10717
|
children: [
|
|
10844
|
-
/* @__PURE__ */
|
|
10718
|
+
/* @__PURE__ */ jsx20(
|
|
10845
10719
|
ChatHeader,
|
|
10846
10720
|
{
|
|
10847
10721
|
title: currentSession?.title || "\uC0C8 \uB300\uD654",
|
|
@@ -10855,68 +10729,158 @@ var ChatUIView = ({
|
|
|
10855
10729
|
showSettings
|
|
10856
10730
|
}
|
|
10857
10731
|
),
|
|
10858
|
-
messages.length === 0
|
|
10859
|
-
|
|
10860
|
-
{
|
|
10861
|
-
greeting,
|
|
10862
|
-
templates,
|
|
10863
|
-
onTemplateClick: handleTemplateClick,
|
|
10864
|
-
actions,
|
|
10865
|
-
onActionSelect: handleActionSelect
|
|
10866
|
-
}
|
|
10867
|
-
) : /* @__PURE__ */ jsx21(
|
|
10868
|
-
MessageList,
|
|
10732
|
+
(messages.length === 0 || welcomeExiting) && /* @__PURE__ */ jsxs19(
|
|
10733
|
+
"div",
|
|
10869
10734
|
{
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10735
|
+
style: {
|
|
10736
|
+
...messages.length > 0 ? { position: "absolute", inset: 0, zIndex: 5, background: "var(--chatllm-bg)" } : { flex: 1 },
|
|
10737
|
+
display: "flex",
|
|
10738
|
+
flexDirection: "column",
|
|
10739
|
+
justifyContent: "center",
|
|
10740
|
+
alignItems: "center",
|
|
10741
|
+
padding: "24px",
|
|
10742
|
+
gap: "24px",
|
|
10743
|
+
animation: welcomeExiting ? "chatllm-welcome-exit 0.3s ease forwards" : "none",
|
|
10744
|
+
pointerEvents: welcomeExiting ? "none" : "auto"
|
|
10745
|
+
},
|
|
10746
|
+
children: [
|
|
10747
|
+
/* @__PURE__ */ jsx20(
|
|
10748
|
+
"h1",
|
|
10749
|
+
{
|
|
10750
|
+
style: {
|
|
10751
|
+
fontSize: "26px",
|
|
10752
|
+
fontWeight: 600,
|
|
10753
|
+
color: "var(--chatllm-text)",
|
|
10754
|
+
margin: 0,
|
|
10755
|
+
textAlign: "center",
|
|
10756
|
+
lineHeight: 1.4
|
|
10757
|
+
},
|
|
10758
|
+
children: greeting ? `${greeting} \u273A` : "\u273A \uBB34\uC5C7\uC744 \uC0DD\uAC01\uD574 \uBCFC\uAE4C\uC694?"
|
|
10759
|
+
}
|
|
10760
|
+
),
|
|
10761
|
+
/* @__PURE__ */ jsx20("div", { style: { width: "100%", maxWidth: "680px" }, children: /* @__PURE__ */ jsx20(
|
|
10762
|
+
ChatInput,
|
|
10763
|
+
{
|
|
10764
|
+
value: input,
|
|
10765
|
+
onChange: setInput,
|
|
10766
|
+
onSubmit: handleSubmit,
|
|
10767
|
+
onStop: stopGeneration,
|
|
10768
|
+
isLoading,
|
|
10769
|
+
placeholder: "\uBA54\uC2DC\uC9C0\uB97C \uC785\uB825\uD558\uC138\uC694...",
|
|
10770
|
+
quotedText,
|
|
10771
|
+
onClearQuote: () => setQuotedText(null),
|
|
10772
|
+
selectedAction,
|
|
10773
|
+
onClearAction: () => setSelectedAction(null),
|
|
10774
|
+
onActionSelect: setSelectedAction,
|
|
10775
|
+
actions,
|
|
10776
|
+
onDeepResearch: toggleDeepResearchMode,
|
|
10777
|
+
isDeepResearchMode,
|
|
10778
|
+
deepResearchEnabled,
|
|
10779
|
+
manualSkills,
|
|
10780
|
+
onSkillSelect: executeManualSkill,
|
|
10781
|
+
activeSkillExecution,
|
|
10782
|
+
attachments,
|
|
10783
|
+
onFileAttach: addAttachments,
|
|
10784
|
+
onRemoveAttachment: removeAttachment,
|
|
10785
|
+
onDisclaimerClick: () => setDisclaimerOpen(true),
|
|
10786
|
+
inline: true
|
|
10787
|
+
}
|
|
10788
|
+
) }),
|
|
10789
|
+
suggestedPrompts && suggestedPrompts.length > 0 && /* @__PURE__ */ jsx20(
|
|
10790
|
+
"div",
|
|
10791
|
+
{
|
|
10792
|
+
style: {
|
|
10793
|
+
display: "flex",
|
|
10794
|
+
flexWrap: "wrap",
|
|
10795
|
+
gap: "8px",
|
|
10796
|
+
justifyContent: "center",
|
|
10797
|
+
maxWidth: "680px"
|
|
10798
|
+
},
|
|
10799
|
+
children: suggestedPrompts.map((sp) => /* @__PURE__ */ jsxs19(
|
|
10800
|
+
"button",
|
|
10801
|
+
{
|
|
10802
|
+
onClick: () => setInput(sp.prompt),
|
|
10803
|
+
style: {
|
|
10804
|
+
display: "flex",
|
|
10805
|
+
alignItems: "center",
|
|
10806
|
+
gap: "6px",
|
|
10807
|
+
padding: "8px 16px",
|
|
10808
|
+
borderRadius: "20px",
|
|
10809
|
+
border: "1px solid var(--chatllm-border)",
|
|
10810
|
+
background: "var(--chatllm-content-bg)",
|
|
10811
|
+
color: "var(--chatllm-text-secondary)",
|
|
10812
|
+
fontSize: "13px",
|
|
10813
|
+
fontFamily: "inherit",
|
|
10814
|
+
cursor: "pointer",
|
|
10815
|
+
transition: "all 0.2s"
|
|
10816
|
+
},
|
|
10817
|
+
children: [
|
|
10818
|
+
sp.icon && /* @__PURE__ */ jsx20(IconSvg, { name: sp.icon, size: 16, color: "var(--chatllm-text-muted)" }),
|
|
10819
|
+
sp.label
|
|
10820
|
+
]
|
|
10821
|
+
},
|
|
10822
|
+
sp.id
|
|
10823
|
+
))
|
|
10824
|
+
}
|
|
10825
|
+
)
|
|
10826
|
+
]
|
|
10887
10827
|
}
|
|
10888
10828
|
),
|
|
10889
|
-
/* @__PURE__ */
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
|
|
10894
|
-
|
|
10895
|
-
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
|
|
10829
|
+
messages.length > 0 && /* @__PURE__ */ jsxs19(Fragment8, { children: [
|
|
10830
|
+
/* @__PURE__ */ jsx20(
|
|
10831
|
+
MessageList,
|
|
10832
|
+
{
|
|
10833
|
+
messages,
|
|
10834
|
+
isLoading,
|
|
10835
|
+
onCopy: copyMessage,
|
|
10836
|
+
onEdit: startEdit,
|
|
10837
|
+
onRegenerate: regenerate,
|
|
10838
|
+
onQuote: setQuotedText,
|
|
10839
|
+
onAskOtherModel: (userMessageId, assistantMessageId, targetModel) => askOtherModel(assistantMessageId, targetModel),
|
|
10840
|
+
onSetActiveAlternative: setActiveAlternative,
|
|
10841
|
+
activeAlternatives,
|
|
10842
|
+
models: hookModels,
|
|
10843
|
+
copiedId: copiedMessageId,
|
|
10844
|
+
editingId: editingMessageId,
|
|
10845
|
+
onChoiceClick: handleChoiceClick,
|
|
10846
|
+
showThinking,
|
|
10847
|
+
thinkingDefaultOpen,
|
|
10848
|
+
loadingAlternativeFor,
|
|
10849
|
+
onPollSubmit: handlePollSubmit
|
|
10850
|
+
}
|
|
10851
|
+
),
|
|
10852
|
+
/* @__PURE__ */ jsx20(
|
|
10853
|
+
ChatInput,
|
|
10854
|
+
{
|
|
10855
|
+
value: input,
|
|
10856
|
+
onChange: setInput,
|
|
10857
|
+
onSubmit: handleSubmit,
|
|
10858
|
+
onStop: stopGeneration,
|
|
10859
|
+
isLoading,
|
|
10860
|
+
placeholder: "\uBA54\uC2DC\uC9C0\uB97C \uC785\uB825\uD558\uC138\uC694...",
|
|
10861
|
+
quotedText,
|
|
10862
|
+
onClearQuote: () => setQuotedText(null),
|
|
10863
|
+
selectedAction,
|
|
10864
|
+
onClearAction: () => setSelectedAction(null),
|
|
10865
|
+
onActionSelect: setSelectedAction,
|
|
10866
|
+
actions,
|
|
10867
|
+
onDeepResearch: toggleDeepResearchMode,
|
|
10868
|
+
isDeepResearchMode,
|
|
10869
|
+
deepResearchEnabled,
|
|
10870
|
+
manualSkills,
|
|
10871
|
+
onSkillSelect: executeManualSkill,
|
|
10872
|
+
activeSkillExecution,
|
|
10873
|
+
attachments,
|
|
10874
|
+
onFileAttach: addAttachments,
|
|
10875
|
+
onRemoveAttachment: removeAttachment,
|
|
10876
|
+
onDisclaimerClick: () => setDisclaimerOpen(true)
|
|
10877
|
+
}
|
|
10878
|
+
)
|
|
10879
|
+
] })
|
|
10916
10880
|
]
|
|
10917
10881
|
}
|
|
10918
10882
|
),
|
|
10919
|
-
showSettings && /* @__PURE__ */
|
|
10883
|
+
showSettings && /* @__PURE__ */ jsx20(
|
|
10920
10884
|
SettingsModal,
|
|
10921
10885
|
{
|
|
10922
10886
|
isOpen: settingsOpen,
|
|
@@ -10943,7 +10907,7 @@ var ChatUIView = ({
|
|
|
10943
10907
|
currentProjectTitle: currentProject?.title
|
|
10944
10908
|
}
|
|
10945
10909
|
),
|
|
10946
|
-
/* @__PURE__ */
|
|
10910
|
+
/* @__PURE__ */ jsx20(
|
|
10947
10911
|
ProjectSettingsModal,
|
|
10948
10912
|
{
|
|
10949
10913
|
isOpen: projectSettingsOpen,
|
|
@@ -10955,7 +10919,7 @@ var ChatUIView = ({
|
|
|
10955
10919
|
onDeleteProject: deleteProject
|
|
10956
10920
|
}
|
|
10957
10921
|
),
|
|
10958
|
-
/* @__PURE__ */
|
|
10922
|
+
/* @__PURE__ */ jsx20(DisclaimerModal, { isOpen: disclaimerOpen, onClose: () => setDisclaimerOpen(false) })
|
|
10959
10923
|
]
|
|
10960
10924
|
}
|
|
10961
10925
|
);
|
|
@@ -10964,6 +10928,7 @@ var ChatUIWithHook = ({
|
|
|
10964
10928
|
models = DEFAULT_MODELS,
|
|
10965
10929
|
actions = DEFAULT_ACTIONS,
|
|
10966
10930
|
templates = DEFAULT_TEMPLATES,
|
|
10931
|
+
suggestedPrompts,
|
|
10967
10932
|
personalization,
|
|
10968
10933
|
onPersonalizationChange,
|
|
10969
10934
|
onPersonalizationSave,
|
|
@@ -11057,7 +11022,7 @@ var ChatUIWithHook = ({
|
|
|
11057
11022
|
onDeleteProjectFile
|
|
11058
11023
|
};
|
|
11059
11024
|
const state = useChatUI(hookOptions);
|
|
11060
|
-
return /* @__PURE__ */
|
|
11025
|
+
return /* @__PURE__ */ jsx20(
|
|
11061
11026
|
ChatUIView,
|
|
11062
11027
|
{
|
|
11063
11028
|
state,
|
|
@@ -11077,7 +11042,8 @@ var ChatUIWithHook = ({
|
|
|
11077
11042
|
className,
|
|
11078
11043
|
apiKey,
|
|
11079
11044
|
onApiKeyChange,
|
|
11080
|
-
deepResearchEnabled: !!deepResearch?.onWebSearch
|
|
11045
|
+
deepResearchEnabled: !!deepResearch?.onWebSearch,
|
|
11046
|
+
suggestedPrompts
|
|
11081
11047
|
}
|
|
11082
11048
|
);
|
|
11083
11049
|
};
|
|
@@ -11101,9 +11067,10 @@ var ChatUI = (props) => {
|
|
|
11101
11067
|
className = "",
|
|
11102
11068
|
apiKey,
|
|
11103
11069
|
onApiKeyChange,
|
|
11104
|
-
deepResearch
|
|
11070
|
+
deepResearch,
|
|
11071
|
+
suggestedPrompts: chatStateSuggestedPrompts
|
|
11105
11072
|
} = props;
|
|
11106
|
-
return /* @__PURE__ */
|
|
11073
|
+
return /* @__PURE__ */ jsx20(
|
|
11107
11074
|
ChatUIView,
|
|
11108
11075
|
{
|
|
11109
11076
|
state: props.chatState,
|
|
@@ -11123,11 +11090,12 @@ var ChatUI = (props) => {
|
|
|
11123
11090
|
className,
|
|
11124
11091
|
apiKey,
|
|
11125
11092
|
onApiKeyChange,
|
|
11126
|
-
deepResearchEnabled: !!deepResearch?.onWebSearch
|
|
11093
|
+
deepResearchEnabled: !!deepResearch?.onWebSearch,
|
|
11094
|
+
suggestedPrompts: chatStateSuggestedPrompts
|
|
11127
11095
|
}
|
|
11128
11096
|
);
|
|
11129
11097
|
}
|
|
11130
|
-
return /* @__PURE__ */
|
|
11098
|
+
return /* @__PURE__ */ jsx20(ChatUIWithHook, { ...props });
|
|
11131
11099
|
};
|
|
11132
11100
|
|
|
11133
11101
|
// src/react/hooks/useDeepResearch.ts
|
|
@@ -11444,6 +11412,144 @@ var useDeepResearch = (options) => {
|
|
|
11444
11412
|
};
|
|
11445
11413
|
};
|
|
11446
11414
|
|
|
11415
|
+
// src/react/components/EmptyState.tsx
|
|
11416
|
+
import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
11417
|
+
var EmptyState = ({
|
|
11418
|
+
greeting,
|
|
11419
|
+
templates = [],
|
|
11420
|
+
onTemplateClick,
|
|
11421
|
+
actions = [],
|
|
11422
|
+
onActionSelect
|
|
11423
|
+
}) => {
|
|
11424
|
+
const getActionIcon = (icon) => {
|
|
11425
|
+
const iconMap = {
|
|
11426
|
+
search: "search-line",
|
|
11427
|
+
image: "image-line",
|
|
11428
|
+
code: "code-s-slash-line",
|
|
11429
|
+
document: "file-text-line"
|
|
11430
|
+
};
|
|
11431
|
+
return iconMap[icon] || "sparkling-line";
|
|
11432
|
+
};
|
|
11433
|
+
const hasContent = actions.length > 0 || templates.length > 0;
|
|
11434
|
+
return /* @__PURE__ */ jsxs20(
|
|
11435
|
+
"div",
|
|
11436
|
+
{
|
|
11437
|
+
className: "chatllm-empty-state",
|
|
11438
|
+
style: {
|
|
11439
|
+
flex: 1,
|
|
11440
|
+
display: "flex",
|
|
11441
|
+
flexDirection: "column",
|
|
11442
|
+
alignItems: "center",
|
|
11443
|
+
justifyContent: hasContent ? "center" : "flex-end",
|
|
11444
|
+
padding: "48px 24px",
|
|
11445
|
+
paddingBottom: hasContent ? "200px" : "32px",
|
|
11446
|
+
textAlign: "center"
|
|
11447
|
+
},
|
|
11448
|
+
children: [
|
|
11449
|
+
/* @__PURE__ */ jsx21(
|
|
11450
|
+
"div",
|
|
11451
|
+
{
|
|
11452
|
+
className: "chatllm-sheet",
|
|
11453
|
+
style: {
|
|
11454
|
+
width: "64px",
|
|
11455
|
+
height: "64px",
|
|
11456
|
+
borderRadius: "16px",
|
|
11457
|
+
display: "flex",
|
|
11458
|
+
alignItems: "center",
|
|
11459
|
+
justifyContent: "center",
|
|
11460
|
+
marginBottom: "32px",
|
|
11461
|
+
color: "var(--chatllm-primary)"
|
|
11462
|
+
},
|
|
11463
|
+
children: /* @__PURE__ */ jsx21(IconSvg, { name: "chat-1-line", size: 40 })
|
|
11464
|
+
}
|
|
11465
|
+
),
|
|
11466
|
+
/* @__PURE__ */ jsx21(
|
|
11467
|
+
"h1",
|
|
11468
|
+
{
|
|
11469
|
+
style: {
|
|
11470
|
+
fontSize: "30px",
|
|
11471
|
+
fontWeight: 700,
|
|
11472
|
+
color: "var(--chatllm-text)",
|
|
11473
|
+
marginBottom: hasContent ? "40px" : "0",
|
|
11474
|
+
lineHeight: 1.3
|
|
11475
|
+
},
|
|
11476
|
+
children: "How can I help you today?"
|
|
11477
|
+
}
|
|
11478
|
+
),
|
|
11479
|
+
(actions.length > 0 || templates.length > 0) && /* @__PURE__ */ jsxs20(
|
|
11480
|
+
"div",
|
|
11481
|
+
{
|
|
11482
|
+
style: {
|
|
11483
|
+
display: "flex",
|
|
11484
|
+
flexWrap: "wrap",
|
|
11485
|
+
justifyContent: "center",
|
|
11486
|
+
gap: "12px",
|
|
11487
|
+
maxWidth: "800px",
|
|
11488
|
+
marginBottom: "48px"
|
|
11489
|
+
},
|
|
11490
|
+
children: [
|
|
11491
|
+
actions.map((action) => /* @__PURE__ */ jsxs20(
|
|
11492
|
+
"button",
|
|
11493
|
+
{
|
|
11494
|
+
onClick: () => onActionSelect?.(action),
|
|
11495
|
+
className: "chatllm-btn-secondary",
|
|
11496
|
+
style: {
|
|
11497
|
+
display: "flex",
|
|
11498
|
+
alignItems: "center",
|
|
11499
|
+
gap: "8px",
|
|
11500
|
+
padding: "12px 20px",
|
|
11501
|
+
fontSize: "14px",
|
|
11502
|
+
fontWeight: 500
|
|
11503
|
+
},
|
|
11504
|
+
children: [
|
|
11505
|
+
/* @__PURE__ */ jsx21(
|
|
11506
|
+
IconSvg,
|
|
11507
|
+
{
|
|
11508
|
+
name: getActionIcon(action.icon),
|
|
11509
|
+
size: 18,
|
|
11510
|
+
color: "var(--chatllm-primary)"
|
|
11511
|
+
}
|
|
11512
|
+
),
|
|
11513
|
+
action.label
|
|
11514
|
+
]
|
|
11515
|
+
},
|
|
11516
|
+
action.id
|
|
11517
|
+
)),
|
|
11518
|
+
templates.slice(0, 4).map((template) => /* @__PURE__ */ jsxs20(
|
|
11519
|
+
"button",
|
|
11520
|
+
{
|
|
11521
|
+
onClick: () => onTemplateClick(template),
|
|
11522
|
+
className: "chatllm-btn-secondary",
|
|
11523
|
+
style: {
|
|
11524
|
+
display: "flex",
|
|
11525
|
+
alignItems: "center",
|
|
11526
|
+
gap: "8px",
|
|
11527
|
+
padding: "12px 20px",
|
|
11528
|
+
fontSize: "14px",
|
|
11529
|
+
fontWeight: 500
|
|
11530
|
+
},
|
|
11531
|
+
children: [
|
|
11532
|
+
/* @__PURE__ */ jsx21(
|
|
11533
|
+
IconSvg,
|
|
11534
|
+
{
|
|
11535
|
+
name: "sparkling-line",
|
|
11536
|
+
size: 18,
|
|
11537
|
+
color: "var(--chatllm-primary)"
|
|
11538
|
+
}
|
|
11539
|
+
),
|
|
11540
|
+
template.title
|
|
11541
|
+
]
|
|
11542
|
+
},
|
|
11543
|
+
template.id
|
|
11544
|
+
))
|
|
11545
|
+
]
|
|
11546
|
+
}
|
|
11547
|
+
)
|
|
11548
|
+
]
|
|
11549
|
+
}
|
|
11550
|
+
);
|
|
11551
|
+
};
|
|
11552
|
+
|
|
11447
11553
|
// src/react/components/MemoryPanel.tsx
|
|
11448
11554
|
import { useState as useState19 } from "react";
|
|
11449
11555
|
import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
|