@gendive/chatllm 0.17.24 → 0.17.25
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 +98 -1
- package/dist/react/index.d.ts +98 -1
- package/dist/react/index.js +1157 -396
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +1140 -380
- package/dist/react/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/react/ChatUI.tsx
|
|
2
|
-
import
|
|
2
|
+
import React16 from "react";
|
|
3
3
|
|
|
4
4
|
// src/react/hooks/useChatUI.ts
|
|
5
5
|
import { useState as useState5, useRef as useRef4, useCallback as useCallback5, useEffect as useEffect3, useMemo as useMemo2 } from "react";
|
|
@@ -1508,6 +1508,65 @@ var convertToolsToSkills = (tools, onToolCall) => {
|
|
|
1508
1508
|
return skillMap;
|
|
1509
1509
|
};
|
|
1510
1510
|
|
|
1511
|
+
// src/react/utils/checklistParser.ts
|
|
1512
|
+
var generateId3 = () => {
|
|
1513
|
+
return Math.random().toString(36).substring(2, 11);
|
|
1514
|
+
};
|
|
1515
|
+
var parseChecklistFromContent = (content) => {
|
|
1516
|
+
const checklistRegex = /<checklist>([\s\S]*?)<\/checklist>/i;
|
|
1517
|
+
const match = checklistRegex.exec(content);
|
|
1518
|
+
if (!match) {
|
|
1519
|
+
return { checklistBlock: null, cleanContent: content };
|
|
1520
|
+
}
|
|
1521
|
+
const innerContent = match[1].trim();
|
|
1522
|
+
const items = [];
|
|
1523
|
+
const stepTagRegex = /<step>([^<]+)<\/step>/gi;
|
|
1524
|
+
let stepMatch;
|
|
1525
|
+
while ((stepMatch = stepTagRegex.exec(innerContent)) !== null) {
|
|
1526
|
+
items.push({
|
|
1527
|
+
id: generateId3(),
|
|
1528
|
+
title: stepMatch[1].trim(),
|
|
1529
|
+
status: "pending"
|
|
1530
|
+
});
|
|
1531
|
+
}
|
|
1532
|
+
if (items.length === 0) {
|
|
1533
|
+
const numberedRegex = /^\d+[.)]\s+(.+)$/gm;
|
|
1534
|
+
let numMatch;
|
|
1535
|
+
while ((numMatch = numberedRegex.exec(innerContent)) !== null) {
|
|
1536
|
+
items.push({
|
|
1537
|
+
id: generateId3(),
|
|
1538
|
+
title: numMatch[1].trim(),
|
|
1539
|
+
status: "pending"
|
|
1540
|
+
});
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
if (items.length === 0) {
|
|
1544
|
+
const listRegex = /^[-*]\s+(.+)$/gm;
|
|
1545
|
+
let listMatch;
|
|
1546
|
+
while ((listMatch = listRegex.exec(innerContent)) !== null) {
|
|
1547
|
+
items.push({
|
|
1548
|
+
id: generateId3(),
|
|
1549
|
+
title: listMatch[1].trim(),
|
|
1550
|
+
status: "pending"
|
|
1551
|
+
});
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
if (items.length < 2) {
|
|
1555
|
+
return { checklistBlock: null, cleanContent: content };
|
|
1556
|
+
}
|
|
1557
|
+
let cleanContent = content.replace(match[0], "");
|
|
1558
|
+
cleanContent = cleanContent.replace(/\n{3,}/g, "\n\n").trim();
|
|
1559
|
+
return {
|
|
1560
|
+
checklistBlock: {
|
|
1561
|
+
id: generateId3(),
|
|
1562
|
+
items,
|
|
1563
|
+
currentStep: -1,
|
|
1564
|
+
completed: false
|
|
1565
|
+
},
|
|
1566
|
+
cleanContent
|
|
1567
|
+
};
|
|
1568
|
+
};
|
|
1569
|
+
|
|
1511
1570
|
// src/react/utils/sessionCache.ts
|
|
1512
1571
|
var buildCacheKey = (storageKey, sessionId) => `${storageKey}_cache_${sessionId}`;
|
|
1513
1572
|
var writeSessionCache = (storageKey, session) => {
|
|
@@ -1572,7 +1631,7 @@ var DEFAULT_COMPRESSION_THRESHOLD = 20;
|
|
|
1572
1631
|
var DEFAULT_KEEP_RECENT = 6;
|
|
1573
1632
|
var DEFAULT_RECOMPRESSION_THRESHOLD = 10;
|
|
1574
1633
|
var DEFAULT_TOKEN_LIMIT = 8e3;
|
|
1575
|
-
var
|
|
1634
|
+
var generateId4 = (prefix) => `${prefix}_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`;
|
|
1576
1635
|
var fileToBase64 = (file) => new Promise((resolve, reject) => {
|
|
1577
1636
|
const reader = new FileReader();
|
|
1578
1637
|
reader.onload = () => resolve(reader.result.split(",")[1] || "");
|
|
@@ -1713,6 +1772,8 @@ var useChatUI = (options) => {
|
|
|
1713
1772
|
const abortControllerRef = useRef4(null);
|
|
1714
1773
|
const skipNextPollParsingRef = useRef4(false);
|
|
1715
1774
|
const skipNextSkillParsingRef = useRef4(false);
|
|
1775
|
+
const skipNextChecklistParsingRef = useRef4(false);
|
|
1776
|
+
const activeChecklistRef = useRef4(null);
|
|
1716
1777
|
const lastExtractionMsgCountRef = useRef4(0);
|
|
1717
1778
|
const memoryOptions = useMemo2(
|
|
1718
1779
|
() => ({
|
|
@@ -2063,7 +2124,7 @@ ${newConversation}
|
|
|
2063
2124
|
}
|
|
2064
2125
|
const now = Date.now();
|
|
2065
2126
|
const newSess = {
|
|
2066
|
-
id:
|
|
2127
|
+
id: generateId4("session"),
|
|
2067
2128
|
title: "\uC0C8 \uB300\uD654",
|
|
2068
2129
|
messages: [],
|
|
2069
2130
|
model: selectedModel,
|
|
@@ -2080,7 +2141,7 @@ ${newConversation}
|
|
|
2080
2141
|
try {
|
|
2081
2142
|
const sessionDetail = await onLoadSessionRef.current(id);
|
|
2082
2143
|
let loadedMessages = sessionDetail.messages.map((m, idx) => ({
|
|
2083
|
-
id: m.id ||
|
|
2144
|
+
id: m.id || generateId4("msg"),
|
|
2084
2145
|
role: typeof m.role === "string" ? m.role.toLowerCase() : m.role,
|
|
2085
2146
|
// API는 message 필드, 내부는 content 필드 사용
|
|
2086
2147
|
content: m.content || m.message || "",
|
|
@@ -2245,7 +2306,7 @@ ${newConversation}
|
|
|
2245
2306
|
const newAttachments = files.map((file) => {
|
|
2246
2307
|
const isImage = file.type.startsWith("image/");
|
|
2247
2308
|
return {
|
|
2248
|
-
id:
|
|
2309
|
+
id: generateId4("attach"),
|
|
2249
2310
|
file,
|
|
2250
2311
|
name: file.name,
|
|
2251
2312
|
type: isImage ? "image" : "file",
|
|
@@ -2297,7 +2358,7 @@ ${newConversation}
|
|
|
2297
2358
|
} else {
|
|
2298
2359
|
const now = Date.now();
|
|
2299
2360
|
const newSess = {
|
|
2300
|
-
id:
|
|
2361
|
+
id: generateId4("session"),
|
|
2301
2362
|
title: "\uC0C8 \uB300\uD654",
|
|
2302
2363
|
messages: [],
|
|
2303
2364
|
model: selectedModel,
|
|
@@ -2336,7 +2397,7 @@ ${finalContent}`;
|
|
|
2336
2397
|
}
|
|
2337
2398
|
}
|
|
2338
2399
|
const userMessage = {
|
|
2339
|
-
id:
|
|
2400
|
+
id: generateId4("msg"),
|
|
2340
2401
|
role: "user",
|
|
2341
2402
|
content: finalContent,
|
|
2342
2403
|
timestamp: Date.now(),
|
|
@@ -2350,7 +2411,7 @@ ${finalContent}`;
|
|
|
2350
2411
|
const contextSummary = currentSession2?.compressionState?.contextSummary || currentSession2?.contextSummary;
|
|
2351
2412
|
const summaryAfterIndex = currentSession2?.compressionState?.summaryAfterIndex || currentSession2?.summaryAfterIndex || 0;
|
|
2352
2413
|
let compressionCount = currentSession2?.compressionState?.compressionCount || 0;
|
|
2353
|
-
const assistantMessageId =
|
|
2414
|
+
const assistantMessageId = generateId4("msg");
|
|
2354
2415
|
const assistantMessage = {
|
|
2355
2416
|
id: assistantMessageId,
|
|
2356
2417
|
role: "assistant",
|
|
@@ -2649,6 +2710,7 @@ ${attachmentContext}
|
|
|
2649
2710
|
let buffer = "";
|
|
2650
2711
|
let accumulatedContent = "";
|
|
2651
2712
|
let skillTagDetected = false;
|
|
2713
|
+
let checklistTagDetected = false;
|
|
2652
2714
|
while (true) {
|
|
2653
2715
|
const { done, value } = await reader.read();
|
|
2654
2716
|
if (done) break;
|
|
@@ -2673,6 +2735,11 @@ ${attachmentContext}
|
|
|
2673
2735
|
accumulatedContent = accumulatedContent.substring(0, endIdx + "</skill_use>".length);
|
|
2674
2736
|
skillTagDetected = true;
|
|
2675
2737
|
}
|
|
2738
|
+
if (!skipNextChecklistParsingRef.current && accumulatedContent.includes("</checklist>")) {
|
|
2739
|
+
const endIdx = accumulatedContent.indexOf("</checklist>");
|
|
2740
|
+
accumulatedContent = accumulatedContent.substring(0, endIdx + "</checklist>".length);
|
|
2741
|
+
checklistTagDetected = true;
|
|
2742
|
+
}
|
|
2676
2743
|
const displayContent = skillTagDetected ? accumulatedContent : null;
|
|
2677
2744
|
setSessions(
|
|
2678
2745
|
(prev) => prev.map((s) => {
|
|
@@ -2705,12 +2772,12 @@ ${attachmentContext}
|
|
|
2705
2772
|
return s;
|
|
2706
2773
|
})
|
|
2707
2774
|
);
|
|
2708
|
-
if (skillTagDetected) break;
|
|
2775
|
+
if (skillTagDetected || checklistTagDetected) break;
|
|
2709
2776
|
}
|
|
2710
2777
|
} catch {
|
|
2711
2778
|
}
|
|
2712
2779
|
}
|
|
2713
|
-
if (skillTagDetected) break;
|
|
2780
|
+
if (skillTagDetected || checklistTagDetected) break;
|
|
2714
2781
|
}
|
|
2715
2782
|
if (buffer.trim()) {
|
|
2716
2783
|
try {
|
|
@@ -2943,6 +3010,165 @@ ${result.content}
|
|
|
2943
3010
|
}
|
|
2944
3011
|
}
|
|
2945
3012
|
}
|
|
3013
|
+
if (activeChecklistRef.current) {
|
|
3014
|
+
const checklist = activeChecklistRef.current;
|
|
3015
|
+
const stepIndex = checklist.currentStep;
|
|
3016
|
+
checklist.stepResults.push(accumulatedContent);
|
|
3017
|
+
setSessions(
|
|
3018
|
+
(prev) => prev.map((s) => {
|
|
3019
|
+
if (s.id !== checklist.sessionId) return s;
|
|
3020
|
+
return {
|
|
3021
|
+
...s,
|
|
3022
|
+
messages: s.messages.map((m) => {
|
|
3023
|
+
if (m.id !== checklist.messageId || !m.checklistBlock) return m;
|
|
3024
|
+
const updatedItems = m.checklistBlock.items.map((it, idx) => ({
|
|
3025
|
+
...it,
|
|
3026
|
+
status: idx <= stepIndex ? "done" : it.status,
|
|
3027
|
+
result: idx === stepIndex ? accumulatedContent : it.result
|
|
3028
|
+
}));
|
|
3029
|
+
return {
|
|
3030
|
+
...m,
|
|
3031
|
+
checklistBlock: { ...m.checklistBlock, items: updatedItems, currentStep: stepIndex + 1 }
|
|
3032
|
+
};
|
|
3033
|
+
})
|
|
3034
|
+
};
|
|
3035
|
+
})
|
|
3036
|
+
);
|
|
3037
|
+
setSessions(
|
|
3038
|
+
(prev) => prev.map((s) => {
|
|
3039
|
+
if (s.id !== capturedSessionId) return s;
|
|
3040
|
+
return {
|
|
3041
|
+
...s,
|
|
3042
|
+
messages: s.messages.map((m) => {
|
|
3043
|
+
if (m.id !== assistantMessageId) return m;
|
|
3044
|
+
return { ...m, hidden: true };
|
|
3045
|
+
})
|
|
3046
|
+
};
|
|
3047
|
+
})
|
|
3048
|
+
);
|
|
3049
|
+
const nextStep = stepIndex + 1;
|
|
3050
|
+
if (nextStep < checklist.items.length) {
|
|
3051
|
+
checklist.currentStep = nextStep;
|
|
3052
|
+
setSessions(
|
|
3053
|
+
(prev) => prev.map((s) => {
|
|
3054
|
+
if (s.id !== checklist.sessionId) return s;
|
|
3055
|
+
return {
|
|
3056
|
+
...s,
|
|
3057
|
+
messages: s.messages.map((m) => {
|
|
3058
|
+
if (m.id !== checklist.messageId || !m.checklistBlock) return m;
|
|
3059
|
+
const updatedItems = m.checklistBlock.items.map((it, idx) => ({
|
|
3060
|
+
...it,
|
|
3061
|
+
status: idx === nextStep ? "in_progress" : it.status
|
|
3062
|
+
}));
|
|
3063
|
+
return {
|
|
3064
|
+
...m,
|
|
3065
|
+
checklistBlock: { ...m.checklistBlock, items: updatedItems, currentStep: nextStep }
|
|
3066
|
+
};
|
|
3067
|
+
})
|
|
3068
|
+
};
|
|
3069
|
+
})
|
|
3070
|
+
);
|
|
3071
|
+
skipNextChecklistParsingRef.current = true;
|
|
3072
|
+
setTimeout(() => {
|
|
3073
|
+
sendMessage(
|
|
3074
|
+
`\uCCB4\uD06C\uB9AC\uC2A4\uD2B8 ${nextStep + 1}/${checklist.items.length}\uB2E8\uACC4\uB97C \uC2E4\uD589\uD558\uC138\uC694: "${checklist.items[nextStep].title}".
|
|
3075
|
+
\uC774\uC804 \uB2E8\uACC4 \uACB0\uACFC\uB97C \uCC38\uACE0\uD558\uB418, \uC774 \uB2E8\uACC4\uC5D0\uB9CC \uC9D1\uC911\uD558\uC5EC \uACB0\uACFC\uB97C \uC791\uC131\uD558\uC138\uC694. checklist \uD0DC\uADF8\uB294 \uC0AC\uC6A9\uD558\uC9C0 \uB9C8\uC138\uC694.`,
|
|
3076
|
+
{ hiddenUserMessage: true }
|
|
3077
|
+
);
|
|
3078
|
+
}, 100);
|
|
3079
|
+
saveMessagesOnEarlyReturn();
|
|
3080
|
+
setIsLoading(false);
|
|
3081
|
+
abortControllerRef.current = null;
|
|
3082
|
+
return;
|
|
3083
|
+
}
|
|
3084
|
+
const stepSummary = checklist.stepResults.map((r, i) => `### ${i + 1}. ${checklist.items[i].title}
|
|
3085
|
+
${r}`).join("\n\n");
|
|
3086
|
+
setSessions(
|
|
3087
|
+
(prev) => prev.map((s) => {
|
|
3088
|
+
if (s.id !== checklist.sessionId) return s;
|
|
3089
|
+
return {
|
|
3090
|
+
...s,
|
|
3091
|
+
messages: s.messages.map((m) => {
|
|
3092
|
+
if (m.id !== checklist.messageId || !m.checklistBlock) return m;
|
|
3093
|
+
return { ...m, checklistBlock: { ...m.checklistBlock, completed: true } };
|
|
3094
|
+
})
|
|
3095
|
+
};
|
|
3096
|
+
})
|
|
3097
|
+
);
|
|
3098
|
+
activeChecklistRef.current = null;
|
|
3099
|
+
skipNextChecklistParsingRef.current = true;
|
|
3100
|
+
setTimeout(() => {
|
|
3101
|
+
sendMessage(
|
|
3102
|
+
`\uBAA8\uB4E0 \uCCB4\uD06C\uB9AC\uC2A4\uD2B8 \uB2E8\uACC4\uAC00 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC544\uB798\uB294 \uAC01 \uB2E8\uACC4\uBCC4 \uACB0\uACFC\uC785\uB2C8\uB2E4:
|
|
3103
|
+
|
|
3104
|
+
${stepSummary}
|
|
3105
|
+
|
|
3106
|
+
\uC704 \uACB0\uACFC\uB97C \uC885\uD569\uD558\uC5EC \uCD5C\uC885 \uACB0\uACFC\uBB3C\uC744 \uC644\uC131\uD574\uC8FC\uC138\uC694. checklist \uD0DC\uADF8\uB294 \uC0AC\uC6A9\uD558\uC9C0 \uB9C8\uC138\uC694.`,
|
|
3107
|
+
{ hiddenUserMessage: true }
|
|
3108
|
+
);
|
|
3109
|
+
}, 100);
|
|
3110
|
+
saveMessagesOnEarlyReturn();
|
|
3111
|
+
setIsLoading(false);
|
|
3112
|
+
abortControllerRef.current = null;
|
|
3113
|
+
return;
|
|
3114
|
+
}
|
|
3115
|
+
if (!skipNextChecklistParsingRef.current) {
|
|
3116
|
+
const { checklistBlock, cleanContent: checklistCleanContent } = parseChecklistFromContent(accumulatedContent);
|
|
3117
|
+
if (checklistBlock) {
|
|
3118
|
+
setSessions(
|
|
3119
|
+
(prev) => prev.map((s) => {
|
|
3120
|
+
if (s.id !== capturedSessionId) return s;
|
|
3121
|
+
return {
|
|
3122
|
+
...s,
|
|
3123
|
+
messages: s.messages.map((m) => {
|
|
3124
|
+
if (m.id !== assistantMessageId) return m;
|
|
3125
|
+
return { ...m, content: checklistCleanContent, checklistBlock };
|
|
3126
|
+
})
|
|
3127
|
+
};
|
|
3128
|
+
})
|
|
3129
|
+
);
|
|
3130
|
+
activeChecklistRef.current = {
|
|
3131
|
+
messageId: assistantMessageId,
|
|
3132
|
+
sessionId: capturedSessionId,
|
|
3133
|
+
items: checklistBlock.items.map((it) => ({ id: it.id, title: it.title })),
|
|
3134
|
+
currentStep: 0,
|
|
3135
|
+
stepResults: []
|
|
3136
|
+
};
|
|
3137
|
+
setSessions(
|
|
3138
|
+
(prev) => prev.map((s) => {
|
|
3139
|
+
if (s.id !== capturedSessionId) return s;
|
|
3140
|
+
return {
|
|
3141
|
+
...s,
|
|
3142
|
+
messages: s.messages.map((m) => {
|
|
3143
|
+
if (m.id !== assistantMessageId || !m.checklistBlock) return m;
|
|
3144
|
+
const updatedItems = m.checklistBlock.items.map((it, idx) => ({
|
|
3145
|
+
...it,
|
|
3146
|
+
status: idx === 0 ? "in_progress" : it.status
|
|
3147
|
+
}));
|
|
3148
|
+
return {
|
|
3149
|
+
...m,
|
|
3150
|
+
checklistBlock: { ...m.checklistBlock, items: updatedItems, currentStep: 0 }
|
|
3151
|
+
};
|
|
3152
|
+
})
|
|
3153
|
+
};
|
|
3154
|
+
})
|
|
3155
|
+
);
|
|
3156
|
+
skipNextChecklistParsingRef.current = true;
|
|
3157
|
+
setTimeout(() => {
|
|
3158
|
+
sendMessage(
|
|
3159
|
+
`\uCCB4\uD06C\uB9AC\uC2A4\uD2B8 1/${checklistBlock.items.length}\uB2E8\uACC4\uB97C \uC2E4\uD589\uD558\uC138\uC694: "${checklistBlock.items[0].title}".
|
|
3160
|
+
\uC774 \uB2E8\uACC4\uC5D0\uB9CC \uC9D1\uC911\uD558\uC5EC \uACB0\uACFC\uB97C \uC791\uC131\uD558\uC138\uC694. checklist \uD0DC\uADF8\uB294 \uC0AC\uC6A9\uD558\uC9C0 \uB9C8\uC138\uC694.`,
|
|
3161
|
+
{ hiddenUserMessage: true }
|
|
3162
|
+
);
|
|
3163
|
+
}, 100);
|
|
3164
|
+
saveMessagesOnEarlyReturn();
|
|
3165
|
+
setIsLoading(false);
|
|
3166
|
+
abortControllerRef.current = null;
|
|
3167
|
+
return;
|
|
3168
|
+
}
|
|
3169
|
+
} else {
|
|
3170
|
+
skipNextChecklistParsingRef.current = false;
|
|
3171
|
+
}
|
|
2946
3172
|
setSessions(
|
|
2947
3173
|
(prev) => prev.map((s) => {
|
|
2948
3174
|
if (s.id !== capturedSessionId) return s;
|
|
@@ -3042,6 +3268,187 @@ ${result.content}
|
|
|
3042
3268
|
attachments,
|
|
3043
3269
|
continueAfterToolResult
|
|
3044
3270
|
]);
|
|
3271
|
+
const handleChecklistAbort = useCallback5(() => {
|
|
3272
|
+
if (!activeChecklistRef.current) return;
|
|
3273
|
+
const checklist = activeChecklistRef.current;
|
|
3274
|
+
const stepIdx = checklist.currentStep;
|
|
3275
|
+
abortControllerRef.current?.abort();
|
|
3276
|
+
setSessions(
|
|
3277
|
+
(prev) => prev.map((s) => {
|
|
3278
|
+
if (s.id !== checklist.sessionId) return s;
|
|
3279
|
+
return {
|
|
3280
|
+
...s,
|
|
3281
|
+
messages: s.messages.map((m) => {
|
|
3282
|
+
if (m.id !== checklist.messageId || !m.checklistBlock) return m;
|
|
3283
|
+
return {
|
|
3284
|
+
...m,
|
|
3285
|
+
checklistBlock: {
|
|
3286
|
+
...m.checklistBlock,
|
|
3287
|
+
items: m.checklistBlock.items.map((it, idx) => ({
|
|
3288
|
+
...it,
|
|
3289
|
+
status: idx === stepIdx ? "error" : it.status
|
|
3290
|
+
}))
|
|
3291
|
+
}
|
|
3292
|
+
};
|
|
3293
|
+
})
|
|
3294
|
+
};
|
|
3295
|
+
})
|
|
3296
|
+
);
|
|
3297
|
+
activeChecklistRef.current = null;
|
|
3298
|
+
setIsLoading(false);
|
|
3299
|
+
}, []);
|
|
3300
|
+
const handleChecklistRetry = useCallback5(
|
|
3301
|
+
(messageId, stepIndex) => {
|
|
3302
|
+
const session = sessionsRef.current.find(
|
|
3303
|
+
(s) => s.messages.some((m) => m.id === messageId)
|
|
3304
|
+
);
|
|
3305
|
+
if (!session) return;
|
|
3306
|
+
const message = session.messages.find((m) => m.id === messageId);
|
|
3307
|
+
if (!message?.checklistBlock) return;
|
|
3308
|
+
activeChecklistRef.current = {
|
|
3309
|
+
messageId,
|
|
3310
|
+
sessionId: session.id,
|
|
3311
|
+
items: message.checklistBlock.items.map((it) => ({ id: it.id, title: it.title })),
|
|
3312
|
+
currentStep: stepIndex,
|
|
3313
|
+
stepResults: message.checklistBlock.items.slice(0, stepIndex).map((it) => it.result || "")
|
|
3314
|
+
};
|
|
3315
|
+
setSessions(
|
|
3316
|
+
(prev) => prev.map((s) => {
|
|
3317
|
+
if (s.id !== session.id) return s;
|
|
3318
|
+
return {
|
|
3319
|
+
...s,
|
|
3320
|
+
messages: s.messages.map((m) => {
|
|
3321
|
+
if (m.id !== messageId || !m.checklistBlock) return m;
|
|
3322
|
+
return {
|
|
3323
|
+
...m,
|
|
3324
|
+
checklistBlock: {
|
|
3325
|
+
...m.checklistBlock,
|
|
3326
|
+
items: m.checklistBlock.items.map((it, idx) => ({
|
|
3327
|
+
...it,
|
|
3328
|
+
status: idx === stepIndex ? "in_progress" : idx > stepIndex ? "pending" : it.status
|
|
3329
|
+
})),
|
|
3330
|
+
currentStep: stepIndex
|
|
3331
|
+
}
|
|
3332
|
+
};
|
|
3333
|
+
})
|
|
3334
|
+
};
|
|
3335
|
+
})
|
|
3336
|
+
);
|
|
3337
|
+
skipNextChecklistParsingRef.current = true;
|
|
3338
|
+
setTimeout(() => {
|
|
3339
|
+
sendMessage(
|
|
3340
|
+
`\uCCB4\uD06C\uB9AC\uC2A4\uD2B8 ${stepIndex + 1}/${message.checklistBlock.items.length}\uB2E8\uACC4\uB97C \uC2E4\uD589\uD558\uC138\uC694: "${message.checklistBlock.items[stepIndex].title}".
|
|
3341
|
+
\uC774\uC804 \uB2E8\uACC4 \uACB0\uACFC\uB97C \uCC38\uACE0\uD558\uB418, \uC774 \uB2E8\uACC4\uC5D0\uB9CC \uC9D1\uC911\uD558\uC5EC \uACB0\uACFC\uB97C \uC791\uC131\uD558\uC138\uC694. checklist \uD0DC\uADF8\uB294 \uC0AC\uC6A9\uD558\uC9C0 \uB9C8\uC138\uC694.`,
|
|
3342
|
+
{ hiddenUserMessage: true }
|
|
3343
|
+
);
|
|
3344
|
+
}, 100);
|
|
3345
|
+
},
|
|
3346
|
+
[sendMessage]
|
|
3347
|
+
);
|
|
3348
|
+
const handleChecklistSkip = useCallback5(
|
|
3349
|
+
(messageId, stepIndex) => {
|
|
3350
|
+
const session = sessionsRef.current.find(
|
|
3351
|
+
(s) => s.messages.some((m) => m.id === messageId)
|
|
3352
|
+
);
|
|
3353
|
+
if (!session) return;
|
|
3354
|
+
const message = session.messages.find((m) => m.id === messageId);
|
|
3355
|
+
if (!message?.checklistBlock) return;
|
|
3356
|
+
setSessions(
|
|
3357
|
+
(prev) => prev.map((s) => {
|
|
3358
|
+
if (s.id !== session.id) return s;
|
|
3359
|
+
return {
|
|
3360
|
+
...s,
|
|
3361
|
+
messages: s.messages.map((m) => {
|
|
3362
|
+
if (m.id !== messageId || !m.checklistBlock) return m;
|
|
3363
|
+
return {
|
|
3364
|
+
...m,
|
|
3365
|
+
checklistBlock: {
|
|
3366
|
+
...m.checklistBlock,
|
|
3367
|
+
items: m.checklistBlock.items.map((it, idx) => ({
|
|
3368
|
+
...it,
|
|
3369
|
+
status: idx === stepIndex ? "done" : it.status,
|
|
3370
|
+
result: idx === stepIndex ? "(\uAC74\uB108\uB700)" : it.result
|
|
3371
|
+
}))
|
|
3372
|
+
}
|
|
3373
|
+
};
|
|
3374
|
+
})
|
|
3375
|
+
};
|
|
3376
|
+
})
|
|
3377
|
+
);
|
|
3378
|
+
const nextPending = message.checklistBlock.items.findIndex(
|
|
3379
|
+
(it, idx) => idx > stepIndex && (it.status === "pending" || it.status === "error")
|
|
3380
|
+
);
|
|
3381
|
+
if (nextPending >= 0) {
|
|
3382
|
+
activeChecklistRef.current = {
|
|
3383
|
+
messageId,
|
|
3384
|
+
sessionId: session.id,
|
|
3385
|
+
items: message.checklistBlock.items.map((it) => ({ id: it.id, title: it.title })),
|
|
3386
|
+
currentStep: nextPending,
|
|
3387
|
+
stepResults: message.checklistBlock.items.slice(0, nextPending).map((it) => it.result || "(\uAC74\uB108\uB700)")
|
|
3388
|
+
};
|
|
3389
|
+
setSessions(
|
|
3390
|
+
(prev) => prev.map((s) => {
|
|
3391
|
+
if (s.id !== session.id) return s;
|
|
3392
|
+
return {
|
|
3393
|
+
...s,
|
|
3394
|
+
messages: s.messages.map((m) => {
|
|
3395
|
+
if (m.id !== messageId || !m.checklistBlock) return m;
|
|
3396
|
+
return {
|
|
3397
|
+
...m,
|
|
3398
|
+
checklistBlock: {
|
|
3399
|
+
...m.checklistBlock,
|
|
3400
|
+
items: m.checklistBlock.items.map((it, idx) => ({
|
|
3401
|
+
...it,
|
|
3402
|
+
status: idx === nextPending ? "in_progress" : it.status
|
|
3403
|
+
})),
|
|
3404
|
+
currentStep: nextPending
|
|
3405
|
+
}
|
|
3406
|
+
};
|
|
3407
|
+
})
|
|
3408
|
+
};
|
|
3409
|
+
})
|
|
3410
|
+
);
|
|
3411
|
+
skipNextChecklistParsingRef.current = true;
|
|
3412
|
+
setTimeout(() => {
|
|
3413
|
+
sendMessage(
|
|
3414
|
+
`\uCCB4\uD06C\uB9AC\uC2A4\uD2B8 ${nextPending + 1}/${message.checklistBlock.items.length}\uB2E8\uACC4\uB97C \uC2E4\uD589\uD558\uC138\uC694: "${message.checklistBlock.items[nextPending].title}".
|
|
3415
|
+
\uC774\uC804 \uB2E8\uACC4 \uACB0\uACFC\uB97C \uCC38\uACE0\uD558\uB418, \uC774 \uB2E8\uACC4\uC5D0\uB9CC \uC9D1\uC911\uD558\uC5EC \uACB0\uACFC\uB97C \uC791\uC131\uD558\uC138\uC694. checklist \uD0DC\uADF8\uB294 \uC0AC\uC6A9\uD558\uC9C0 \uB9C8\uC138\uC694.`,
|
|
3416
|
+
{ hiddenUserMessage: true }
|
|
3417
|
+
);
|
|
3418
|
+
}, 100);
|
|
3419
|
+
} else {
|
|
3420
|
+
const allResults = message.checklistBlock.items.map((it, i) => {
|
|
3421
|
+
const result = i === stepIndex ? "(\uAC74\uB108\uB700)" : it.result || "(\uAC74\uB108\uB700)";
|
|
3422
|
+
return `### ${i + 1}. ${it.title}
|
|
3423
|
+
${result}`;
|
|
3424
|
+
}).join("\n\n");
|
|
3425
|
+
setSessions(
|
|
3426
|
+
(prev) => prev.map((s) => {
|
|
3427
|
+
if (s.id !== session.id) return s;
|
|
3428
|
+
return {
|
|
3429
|
+
...s,
|
|
3430
|
+
messages: s.messages.map((m) => {
|
|
3431
|
+
if (m.id !== messageId || !m.checklistBlock) return m;
|
|
3432
|
+
return { ...m, checklistBlock: { ...m.checklistBlock, completed: true } };
|
|
3433
|
+
})
|
|
3434
|
+
};
|
|
3435
|
+
})
|
|
3436
|
+
);
|
|
3437
|
+
skipNextChecklistParsingRef.current = true;
|
|
3438
|
+
setTimeout(() => {
|
|
3439
|
+
sendMessage(
|
|
3440
|
+
`\uBAA8\uB4E0 \uCCB4\uD06C\uB9AC\uC2A4\uD2B8 \uB2E8\uACC4\uAC00 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uC544\uB798\uB294 \uAC01 \uB2E8\uACC4\uBCC4 \uACB0\uACFC\uC785\uB2C8\uB2E4:
|
|
3441
|
+
|
|
3442
|
+
${allResults}
|
|
3443
|
+
|
|
3444
|
+
\uC704 \uACB0\uACFC\uB97C \uC885\uD569\uD558\uC5EC \uCD5C\uC885 \uACB0\uACFC\uBB3C\uC744 \uC644\uC131\uD574\uC8FC\uC138\uC694. checklist \uD0DC\uADF8\uB294 \uC0AC\uC6A9\uD558\uC9C0 \uB9C8\uC138\uC694.`,
|
|
3445
|
+
{ hiddenUserMessage: true }
|
|
3446
|
+
);
|
|
3447
|
+
}, 100);
|
|
3448
|
+
}
|
|
3449
|
+
},
|
|
3450
|
+
[sendMessage]
|
|
3451
|
+
);
|
|
3045
3452
|
const handlePollSubmit = useCallback5(
|
|
3046
3453
|
(messageId, responses) => {
|
|
3047
3454
|
const currentSess = sessions.find((s) => s.id === currentSessionId);
|
|
@@ -3066,7 +3473,7 @@ ${result.content}
|
|
|
3066
3473
|
return { ...m, pollBlock: void 0 };
|
|
3067
3474
|
});
|
|
3068
3475
|
updatedMessages.push({
|
|
3069
|
-
id:
|
|
3476
|
+
id: generateId4("msg"),
|
|
3070
3477
|
role: "assistant",
|
|
3071
3478
|
content: isAutoGenerate ? "\uC790\uB3D9\uC73C\uB85C \uCD5C\uC801\uC758 \uC635\uC158\uC744 \uC120\uD0DD\uD558\uC5EC \uC751\uB2F5\uD558\uACA0\uC2B5\uB2C8\uB2E4. \uC774\uC81C \uC2DC\uC791\uD558\uACA0\uC2B5\uB2C8\uB2E4." : "\uC120\uD0DD\uD558\uC2E0 \uB0B4\uC6A9\uC744 \uAE30\uBC18\uC73C\uB85C \uC751\uB2F5\uD558\uACA0\uC2B5\uB2C8\uB2E4. \uC774\uC81C \uC2DC\uC791\uD558\uACA0\uC2B5\uB2C8\uB2E4.",
|
|
3072
3479
|
model: selectedModel,
|
|
@@ -3390,7 +3797,7 @@ ${currentSession.contextSummary}` },
|
|
|
3390
3797
|
}
|
|
3391
3798
|
}
|
|
3392
3799
|
const alternative = {
|
|
3393
|
-
id:
|
|
3800
|
+
id: generateId4("alt"),
|
|
3394
3801
|
model: targetModel,
|
|
3395
3802
|
content: responseContent,
|
|
3396
3803
|
timestamp: Date.now(),
|
|
@@ -3644,7 +4051,14 @@ ${result.content}
|
|
|
3644
4051
|
projectSettingsOpen,
|
|
3645
4052
|
openProjectSettings: () => setProjectSettingsOpen(true),
|
|
3646
4053
|
closeProjectSettings: () => setProjectSettingsOpen(false),
|
|
3647
|
-
projectMemory
|
|
4054
|
+
projectMemory,
|
|
4055
|
+
// Checklist
|
|
4056
|
+
/** @Todo vibecode - 체크리스트 자동 실행 중단 */
|
|
4057
|
+
handleChecklistAbort,
|
|
4058
|
+
/** @Todo vibecode - 체크리스트 error 항목 재시도 */
|
|
4059
|
+
handleChecklistRetry,
|
|
4060
|
+
/** @Todo vibecode - 체크리스트 pending 항목 건너뛰기 */
|
|
4061
|
+
handleChecklistSkip
|
|
3648
4062
|
};
|
|
3649
4063
|
};
|
|
3650
4064
|
|
|
@@ -5400,10 +5814,10 @@ var iconButtonStyle = {
|
|
|
5400
5814
|
};
|
|
5401
5815
|
|
|
5402
5816
|
// src/react/components/MessageList.tsx
|
|
5403
|
-
import { useRef as useRef8, useEffect as useEffect8, useCallback as useCallback8, useState as
|
|
5817
|
+
import { useRef as useRef8, useEffect as useEffect8, useCallback as useCallback8, useState as useState16 } from "react";
|
|
5404
5818
|
|
|
5405
5819
|
// src/react/components/MessageBubble.tsx
|
|
5406
|
-
import { useState as
|
|
5820
|
+
import { useState as useState15 } from "react";
|
|
5407
5821
|
|
|
5408
5822
|
// src/react/components/MarkdownRenderer.tsx
|
|
5409
5823
|
import React6, { useMemo as useMemo3 } from "react";
|
|
@@ -5586,6 +6000,7 @@ var THINKING_TEXT_REGEX = /^Thinking:\s*\n([\s\S]*?)(?=\n\n|$)/gim;
|
|
|
5586
6000
|
var UNCLOSED_THINKING_TAG_REGEX = /<thinking>(?![\s\S]*?<\/thinking>)/gi;
|
|
5587
6001
|
var UNCLOSED_POLL_TAG_REGEX = /<poll[^>]*>(?![\s\S]*?<\/poll>)[\s\S]*$/gi;
|
|
5588
6002
|
var UNCLOSED_SKILL_TAG_REGEX = /<skill_use[^>]*>(?![\s\S]*?<\/skill_use>)[\s\S]*$/gi;
|
|
6003
|
+
var UNCLOSED_CHECKLIST_TAG_REGEX = /<checklist>(?![\s\S]*?<\/checklist>)[\s\S]*$/gi;
|
|
5589
6004
|
var INLINE_CODE_REGEX = /`([^`]+)`/g;
|
|
5590
6005
|
var BOLD_REGEX = /\*\*([^*]+)\*\*/g;
|
|
5591
6006
|
var ITALIC_REGEX = /(?<!\*)\*([^*]+)\*(?!\*)/g;
|
|
@@ -6467,6 +6882,9 @@ var MarkdownRenderer = ({
|
|
|
6467
6882
|
}
|
|
6468
6883
|
processedContent = processedContent.replace(/<skill_use[^>]*>[\s\S]*?<\/skill_use>/gi, "");
|
|
6469
6884
|
processedContent = processedContent.replace(UNCLOSED_SKILL_TAG_REGEX, "");
|
|
6885
|
+
processedContent = processedContent.replace(/<checklist>[\s\S]*?<\/checklist>/gi, "");
|
|
6886
|
+
processedContent = processedContent.replace(UNCLOSED_CHECKLIST_TAG_REGEX, "");
|
|
6887
|
+
UNCLOSED_CHECKLIST_TAG_REGEX.lastIndex = 0;
|
|
6470
6888
|
const codeBlocks = [];
|
|
6471
6889
|
processedContent = processedContent.replace(CODE_BLOCK_REGEX, (match, lang, code) => {
|
|
6472
6890
|
if (lang === "markdown" || lang === "md") {
|
|
@@ -8136,8 +8554,311 @@ var ContentPartRenderer = ({
|
|
|
8136
8554
|
}) });
|
|
8137
8555
|
};
|
|
8138
8556
|
|
|
8139
|
-
// src/react/components/
|
|
8557
|
+
// src/react/components/ChecklistCard.tsx
|
|
8558
|
+
import { useState as useState14, useMemo as useMemo4 } from "react";
|
|
8140
8559
|
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
8560
|
+
var ChecklistCard = ({
|
|
8561
|
+
items,
|
|
8562
|
+
completed,
|
|
8563
|
+
onAbort,
|
|
8564
|
+
onRetryStep,
|
|
8565
|
+
onSkipStep
|
|
8566
|
+
}) => {
|
|
8567
|
+
const [expandedItems, setExpandedItems] = useState14(/* @__PURE__ */ new Set());
|
|
8568
|
+
const { doneCount, isRunning, hasError } = useMemo4(() => {
|
|
8569
|
+
const done = items.filter((it) => it.status === "done").length;
|
|
8570
|
+
const running = items.some((it) => it.status === "in_progress");
|
|
8571
|
+
const error = items.some((it) => it.status === "error");
|
|
8572
|
+
return { doneCount: done, isRunning: running, hasError: error };
|
|
8573
|
+
}, [items]);
|
|
8574
|
+
const progressPercent = doneCount / items.length * 100;
|
|
8575
|
+
const toggleExpanded = (itemId) => {
|
|
8576
|
+
setExpandedItems((prev) => {
|
|
8577
|
+
const next = new Set(prev);
|
|
8578
|
+
if (next.has(itemId)) {
|
|
8579
|
+
next.delete(itemId);
|
|
8580
|
+
} else {
|
|
8581
|
+
next.add(itemId);
|
|
8582
|
+
}
|
|
8583
|
+
return next;
|
|
8584
|
+
});
|
|
8585
|
+
};
|
|
8586
|
+
const renderStatusIcon = (item) => {
|
|
8587
|
+
switch (item.status) {
|
|
8588
|
+
case "done":
|
|
8589
|
+
return /* @__PURE__ */ jsx15(
|
|
8590
|
+
"div",
|
|
8591
|
+
{
|
|
8592
|
+
style: {
|
|
8593
|
+
width: "20px",
|
|
8594
|
+
height: "20px",
|
|
8595
|
+
borderRadius: "50%",
|
|
8596
|
+
backgroundColor: "var(--chatllm-success, #22c55e)",
|
|
8597
|
+
display: "flex",
|
|
8598
|
+
alignItems: "center",
|
|
8599
|
+
justifyContent: "center",
|
|
8600
|
+
flexShrink: 0
|
|
8601
|
+
},
|
|
8602
|
+
children: /* @__PURE__ */ jsx15(IconSvg, { name: "check-line", size: 13, color: "#fff" })
|
|
8603
|
+
}
|
|
8604
|
+
);
|
|
8605
|
+
case "in_progress":
|
|
8606
|
+
return /* @__PURE__ */ jsx15(
|
|
8607
|
+
"div",
|
|
8608
|
+
{
|
|
8609
|
+
style: {
|
|
8610
|
+
width: "20px",
|
|
8611
|
+
height: "20px",
|
|
8612
|
+
borderRadius: "50%",
|
|
8613
|
+
backgroundColor: "var(--chatllm-primary, #3584FA)",
|
|
8614
|
+
display: "flex",
|
|
8615
|
+
alignItems: "center",
|
|
8616
|
+
justifyContent: "center",
|
|
8617
|
+
flexShrink: 0,
|
|
8618
|
+
animation: "chatllm-checklist-pulse 1.5s ease-in-out infinite"
|
|
8619
|
+
},
|
|
8620
|
+
children: /* @__PURE__ */ jsx15("div", { style: { width: "6px", height: "6px", borderRadius: "50%", backgroundColor: "#fff" } })
|
|
8621
|
+
}
|
|
8622
|
+
);
|
|
8623
|
+
case "error":
|
|
8624
|
+
return /* @__PURE__ */ jsx15(
|
|
8625
|
+
"div",
|
|
8626
|
+
{
|
|
8627
|
+
style: {
|
|
8628
|
+
width: "20px",
|
|
8629
|
+
height: "20px",
|
|
8630
|
+
borderRadius: "50%",
|
|
8631
|
+
backgroundColor: "var(--chatllm-error, #ef4444)",
|
|
8632
|
+
display: "flex",
|
|
8633
|
+
alignItems: "center",
|
|
8634
|
+
justifyContent: "center",
|
|
8635
|
+
flexShrink: 0
|
|
8636
|
+
},
|
|
8637
|
+
children: /* @__PURE__ */ jsx15(IconSvg, { name: "close-line", size: 13, color: "#fff" })
|
|
8638
|
+
}
|
|
8639
|
+
);
|
|
8640
|
+
default:
|
|
8641
|
+
return /* @__PURE__ */ jsx15(
|
|
8642
|
+
"div",
|
|
8643
|
+
{
|
|
8644
|
+
style: {
|
|
8645
|
+
width: "20px",
|
|
8646
|
+
height: "20px",
|
|
8647
|
+
borderRadius: "50%",
|
|
8648
|
+
border: "2px solid var(--chatllm-text-muted, #94a3b8)",
|
|
8649
|
+
opacity: 0.5,
|
|
8650
|
+
flexShrink: 0
|
|
8651
|
+
}
|
|
8652
|
+
}
|
|
8653
|
+
);
|
|
8654
|
+
}
|
|
8655
|
+
};
|
|
8656
|
+
const headerText = completed ? "\uBAA8\uB4E0 \uB2E8\uACC4 \uC644\uB8CC" : hasError ? "\uC791\uC5C5 \uC911\uB2E8\uB428" : isRunning ? `\uC791\uC5C5 \uC9C4\uD589 \uC911 \xB7 ${doneCount}/${items.length}` : `\uB300\uAE30 \uC911 \xB7 ${doneCount}/${items.length}`;
|
|
8657
|
+
const headerColor = completed ? "var(--chatllm-success, #22c55e)" : hasError ? "var(--chatllm-error, #ef4444)" : "var(--chatllm-primary, #3584FA)";
|
|
8658
|
+
const progressBarColor = completed ? "var(--chatllm-success, #22c55e)" : "var(--chatllm-primary, #3584FA)";
|
|
8659
|
+
return /* @__PURE__ */ jsxs14(
|
|
8660
|
+
"div",
|
|
8661
|
+
{
|
|
8662
|
+
style: {
|
|
8663
|
+
border: "1px solid var(--chatllm-border, #e5e7eb)",
|
|
8664
|
+
borderRadius: "12px",
|
|
8665
|
+
backgroundColor: "var(--chatllm-content-bg, #fff)",
|
|
8666
|
+
overflow: "hidden",
|
|
8667
|
+
marginTop: "8px"
|
|
8668
|
+
},
|
|
8669
|
+
children: [
|
|
8670
|
+
/* @__PURE__ */ jsxs14("div", { style: { padding: "14px 16px 10px" }, children: [
|
|
8671
|
+
/* @__PURE__ */ jsxs14("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "8px" }, children: [
|
|
8672
|
+
/* @__PURE__ */ jsx15(
|
|
8673
|
+
IconSvg,
|
|
8674
|
+
{
|
|
8675
|
+
name: completed ? "checkbox-circle-line" : "list-check",
|
|
8676
|
+
size: 16,
|
|
8677
|
+
color: headerColor
|
|
8678
|
+
}
|
|
8679
|
+
),
|
|
8680
|
+
/* @__PURE__ */ jsx15("span", { style: { fontSize: "13px", fontWeight: 600, color: headerColor }, children: headerText })
|
|
8681
|
+
] }),
|
|
8682
|
+
/* @__PURE__ */ jsx15(
|
|
8683
|
+
"div",
|
|
8684
|
+
{
|
|
8685
|
+
style: {
|
|
8686
|
+
height: "3px",
|
|
8687
|
+
backgroundColor: "var(--chatllm-bg-secondary, #f1f5f9)",
|
|
8688
|
+
borderRadius: "2px",
|
|
8689
|
+
overflow: "hidden"
|
|
8690
|
+
},
|
|
8691
|
+
children: /* @__PURE__ */ jsx15(
|
|
8692
|
+
"div",
|
|
8693
|
+
{
|
|
8694
|
+
style: {
|
|
8695
|
+
height: "100%",
|
|
8696
|
+
width: `${progressPercent}%`,
|
|
8697
|
+
backgroundColor: progressBarColor,
|
|
8698
|
+
borderRadius: "2px",
|
|
8699
|
+
transition: "width 0.6s cubic-bezier(0.25, 1, 0.5, 1)"
|
|
8700
|
+
}
|
|
8701
|
+
}
|
|
8702
|
+
)
|
|
8703
|
+
}
|
|
8704
|
+
)
|
|
8705
|
+
] }),
|
|
8706
|
+
/* @__PURE__ */ jsx15("div", { children: items.map((item, idx) => {
|
|
8707
|
+
const isExpanded = expandedItems.has(item.id);
|
|
8708
|
+
const canExpand = item.status === "done" && item.result && item.result !== "(\uAC74\uB108\uB700)";
|
|
8709
|
+
const isStopped = !isRunning && !completed;
|
|
8710
|
+
return /* @__PURE__ */ jsxs14("div", { children: [
|
|
8711
|
+
/* @__PURE__ */ jsxs14(
|
|
8712
|
+
"div",
|
|
8713
|
+
{
|
|
8714
|
+
onClick: () => canExpand && toggleExpanded(item.id),
|
|
8715
|
+
style: {
|
|
8716
|
+
padding: "10px 16px",
|
|
8717
|
+
display: "flex",
|
|
8718
|
+
alignItems: "center",
|
|
8719
|
+
gap: "10px",
|
|
8720
|
+
borderTop: idx === 0 ? "1px solid var(--chatllm-border, #e5e7eb)" : "none",
|
|
8721
|
+
borderBottom: "1px solid var(--chatllm-border-light, #f1f5f9)",
|
|
8722
|
+
cursor: canExpand ? "pointer" : "default",
|
|
8723
|
+
backgroundColor: item.status === "error" ? "rgba(239, 68, 68, 0.04)" : item.status === "in_progress" ? "rgba(53, 132, 250, 0.03)" : "transparent",
|
|
8724
|
+
transition: "background-color 0.15s ease"
|
|
8725
|
+
},
|
|
8726
|
+
children: [
|
|
8727
|
+
renderStatusIcon(item),
|
|
8728
|
+
/* @__PURE__ */ jsxs14(
|
|
8729
|
+
"span",
|
|
8730
|
+
{
|
|
8731
|
+
style: {
|
|
8732
|
+
flex: 1,
|
|
8733
|
+
fontSize: "13px",
|
|
8734
|
+
fontWeight: item.status === "in_progress" ? 500 : 400,
|
|
8735
|
+
color: item.status === "pending" ? "var(--chatllm-text-muted, #94a3b8)" : item.status === "error" ? "var(--chatllm-error, #ef4444)" : "var(--chatllm-text, #374151)"
|
|
8736
|
+
},
|
|
8737
|
+
children: [
|
|
8738
|
+
idx + 1,
|
|
8739
|
+
". ",
|
|
8740
|
+
item.title
|
|
8741
|
+
]
|
|
8742
|
+
}
|
|
8743
|
+
),
|
|
8744
|
+
item.status === "error" && onRetryStep && /* @__PURE__ */ jsx15(
|
|
8745
|
+
"button",
|
|
8746
|
+
{
|
|
8747
|
+
onClick: (e) => {
|
|
8748
|
+
e.stopPropagation();
|
|
8749
|
+
onRetryStep(idx);
|
|
8750
|
+
},
|
|
8751
|
+
style: {
|
|
8752
|
+
padding: "4px 10px",
|
|
8753
|
+
fontSize: "11px",
|
|
8754
|
+
fontWeight: 500,
|
|
8755
|
+
color: "var(--chatllm-error, #ef4444)",
|
|
8756
|
+
backgroundColor: "rgba(239, 68, 68, 0.08)",
|
|
8757
|
+
border: "1px solid rgba(239, 68, 68, 0.2)",
|
|
8758
|
+
borderRadius: "4px",
|
|
8759
|
+
cursor: "pointer"
|
|
8760
|
+
},
|
|
8761
|
+
children: "\uC7AC\uC2DC\uB3C4"
|
|
8762
|
+
}
|
|
8763
|
+
),
|
|
8764
|
+
item.status === "pending" && isStopped && hasError && onSkipStep && /* @__PURE__ */ jsx15(
|
|
8765
|
+
"button",
|
|
8766
|
+
{
|
|
8767
|
+
onClick: (e) => {
|
|
8768
|
+
e.stopPropagation();
|
|
8769
|
+
onSkipStep(idx);
|
|
8770
|
+
},
|
|
8771
|
+
style: {
|
|
8772
|
+
padding: "4px 10px",
|
|
8773
|
+
fontSize: "11px",
|
|
8774
|
+
fontWeight: 500,
|
|
8775
|
+
color: "var(--chatllm-text-muted, #94a3b8)",
|
|
8776
|
+
backgroundColor: "var(--chatllm-bg-secondary, #f9fafb)",
|
|
8777
|
+
border: "1px solid var(--chatllm-border, #e5e7eb)",
|
|
8778
|
+
borderRadius: "4px",
|
|
8779
|
+
cursor: "pointer"
|
|
8780
|
+
},
|
|
8781
|
+
children: "\uAC74\uB108\uB6F0\uAE30"
|
|
8782
|
+
}
|
|
8783
|
+
),
|
|
8784
|
+
canExpand && /* @__PURE__ */ jsx15(
|
|
8785
|
+
IconSvg,
|
|
8786
|
+
{
|
|
8787
|
+
name: isExpanded ? "arrow-up-s-line" : "arrow-down-s-line",
|
|
8788
|
+
size: 16,
|
|
8789
|
+
color: "var(--chatllm-text-muted, #94a3b8)"
|
|
8790
|
+
}
|
|
8791
|
+
),
|
|
8792
|
+
item.result === "(\uAC74\uB108\uB700)" && /* @__PURE__ */ jsx15("span", { style: { fontSize: "11px", color: "var(--chatllm-text-muted, #94a3b8)" }, children: "\uAC74\uB108\uB700" })
|
|
8793
|
+
]
|
|
8794
|
+
}
|
|
8795
|
+
),
|
|
8796
|
+
canExpand && isExpanded && /* @__PURE__ */ jsx15(
|
|
8797
|
+
"div",
|
|
8798
|
+
{
|
|
8799
|
+
style: {
|
|
8800
|
+
padding: "8px 16px 12px 46px",
|
|
8801
|
+
backgroundColor: "var(--chatllm-bg-secondary, #f9fafb)",
|
|
8802
|
+
margin: "0 8px 4px",
|
|
8803
|
+
borderRadius: "6px",
|
|
8804
|
+
maxHeight: "300px",
|
|
8805
|
+
overflowY: "auto",
|
|
8806
|
+
fontSize: "13px",
|
|
8807
|
+
lineHeight: "1.6",
|
|
8808
|
+
color: "var(--chatllm-text-secondary, #475569)",
|
|
8809
|
+
whiteSpace: "pre-wrap",
|
|
8810
|
+
wordBreak: "break-word"
|
|
8811
|
+
},
|
|
8812
|
+
children: item.result
|
|
8813
|
+
}
|
|
8814
|
+
)
|
|
8815
|
+
] }, item.id);
|
|
8816
|
+
}) }),
|
|
8817
|
+
/* @__PURE__ */ jsxs14(
|
|
8818
|
+
"div",
|
|
8819
|
+
{
|
|
8820
|
+
style: {
|
|
8821
|
+
padding: "10px 16px",
|
|
8822
|
+
display: "flex",
|
|
8823
|
+
justifyContent: "space-between",
|
|
8824
|
+
alignItems: "center",
|
|
8825
|
+
borderTop: "1px solid var(--chatllm-border, #e5e7eb)"
|
|
8826
|
+
},
|
|
8827
|
+
children: [
|
|
8828
|
+
/* @__PURE__ */ jsxs14("span", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #94a3b8)" }, children: [
|
|
8829
|
+
doneCount,
|
|
8830
|
+
"/",
|
|
8831
|
+
items.length,
|
|
8832
|
+
" \uC644\uB8CC"
|
|
8833
|
+
] }),
|
|
8834
|
+
isRunning && onAbort && /* @__PURE__ */ jsx15(
|
|
8835
|
+
"button",
|
|
8836
|
+
{
|
|
8837
|
+
onClick: onAbort,
|
|
8838
|
+
style: {
|
|
8839
|
+
padding: "4px 12px",
|
|
8840
|
+
fontSize: "12px",
|
|
8841
|
+
fontWeight: 500,
|
|
8842
|
+
color: "var(--chatllm-text-muted, #94a3b8)",
|
|
8843
|
+
backgroundColor: "transparent",
|
|
8844
|
+
border: "1px solid var(--chatllm-border, #e5e7eb)",
|
|
8845
|
+
borderRadius: "4px",
|
|
8846
|
+
cursor: "pointer",
|
|
8847
|
+
transition: "all 0.15s ease"
|
|
8848
|
+
},
|
|
8849
|
+
children: "\uC911\uB2E8"
|
|
8850
|
+
}
|
|
8851
|
+
)
|
|
8852
|
+
]
|
|
8853
|
+
}
|
|
8854
|
+
)
|
|
8855
|
+
]
|
|
8856
|
+
}
|
|
8857
|
+
);
|
|
8858
|
+
};
|
|
8859
|
+
|
|
8860
|
+
// src/react/components/MessageBubble.tsx
|
|
8861
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
8141
8862
|
var MessageBubble = ({
|
|
8142
8863
|
message,
|
|
8143
8864
|
isLoading,
|
|
@@ -8157,10 +8878,13 @@ var MessageBubble = ({
|
|
|
8157
8878
|
showThinking = true,
|
|
8158
8879
|
thinkingDefaultOpen = false,
|
|
8159
8880
|
isLoadingAlternative = false,
|
|
8160
|
-
onPollSubmit
|
|
8881
|
+
onPollSubmit,
|
|
8882
|
+
onChecklistAbort,
|
|
8883
|
+
onChecklistRetry,
|
|
8884
|
+
onChecklistSkip
|
|
8161
8885
|
}) => {
|
|
8162
|
-
const [showActions, setShowActions] =
|
|
8163
|
-
const [showModelMenu, setShowModelMenu] =
|
|
8886
|
+
const [showActions, setShowActions] = useState15(false);
|
|
8887
|
+
const [showModelMenu, setShowModelMenu] = useState15(false);
|
|
8164
8888
|
const isUser = message.role === "user";
|
|
8165
8889
|
const isAssistant = message.role === "assistant";
|
|
8166
8890
|
const relevantAlternatives = isUser ? alternatives : message.alternatives;
|
|
@@ -8171,7 +8895,7 @@ var MessageBubble = ({
|
|
|
8171
8895
|
const displayModel = isAssistant && relevantAlternatives && relevantAlternatives.length > 0 && relevantActiveIndex > 0 ? relevantAlternatives[relevantActiveIndex - 1]?.model : message.model;
|
|
8172
8896
|
const displaySources = isAssistant && relevantAlternatives && relevantAlternatives.length > 0 && relevantActiveIndex > 0 ? relevantAlternatives[relevantActiveIndex - 1]?.sources : message.sources;
|
|
8173
8897
|
if (isUser) {
|
|
8174
|
-
return /* @__PURE__ */
|
|
8898
|
+
return /* @__PURE__ */ jsxs15(
|
|
8175
8899
|
"div",
|
|
8176
8900
|
{
|
|
8177
8901
|
className: "chatllm-message chatllm-message--user",
|
|
@@ -8184,7 +8908,7 @@ var MessageBubble = ({
|
|
|
8184
8908
|
onMouseEnter: () => setShowActions(true),
|
|
8185
8909
|
onMouseLeave: () => setShowActions(false),
|
|
8186
8910
|
children: [
|
|
8187
|
-
/* @__PURE__ */
|
|
8911
|
+
/* @__PURE__ */ jsx16(
|
|
8188
8912
|
"div",
|
|
8189
8913
|
{
|
|
8190
8914
|
style: {
|
|
@@ -8194,9 +8918,9 @@ var MessageBubble = ({
|
|
|
8194
8918
|
borderRadius: "16px",
|
|
8195
8919
|
borderTopRightRadius: "4px"
|
|
8196
8920
|
},
|
|
8197
|
-
children: message.contentParts?.length ? /* @__PURE__ */
|
|
8921
|
+
children: message.contentParts?.length ? /* @__PURE__ */ jsx16("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: message.contentParts.map((part, idx) => {
|
|
8198
8922
|
if (part.type === "text") {
|
|
8199
|
-
return /* @__PURE__ */
|
|
8923
|
+
return /* @__PURE__ */ jsx16(
|
|
8200
8924
|
"div",
|
|
8201
8925
|
{
|
|
8202
8926
|
style: {
|
|
@@ -8211,7 +8935,7 @@ var MessageBubble = ({
|
|
|
8211
8935
|
);
|
|
8212
8936
|
}
|
|
8213
8937
|
if (part.type === "image") {
|
|
8214
|
-
return /* @__PURE__ */
|
|
8938
|
+
return /* @__PURE__ */ jsx16(
|
|
8215
8939
|
"img",
|
|
8216
8940
|
{
|
|
8217
8941
|
src: part.url,
|
|
@@ -8227,7 +8951,7 @@ var MessageBubble = ({
|
|
|
8227
8951
|
);
|
|
8228
8952
|
}
|
|
8229
8953
|
if (part.type === "file") {
|
|
8230
|
-
return /* @__PURE__ */
|
|
8954
|
+
return /* @__PURE__ */ jsxs15(
|
|
8231
8955
|
"div",
|
|
8232
8956
|
{
|
|
8233
8957
|
style: {
|
|
@@ -8241,15 +8965,15 @@ var MessageBubble = ({
|
|
|
8241
8965
|
color: "var(--chatllm-text)"
|
|
8242
8966
|
},
|
|
8243
8967
|
children: [
|
|
8244
|
-
/* @__PURE__ */
|
|
8245
|
-
/* @__PURE__ */
|
|
8968
|
+
/* @__PURE__ */ jsx16(IconSvg, { name: "file-text-line", size: 16, color: "var(--chatllm-text-muted)" }),
|
|
8969
|
+
/* @__PURE__ */ jsx16("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: part.name })
|
|
8246
8970
|
]
|
|
8247
8971
|
},
|
|
8248
8972
|
idx
|
|
8249
8973
|
);
|
|
8250
8974
|
}
|
|
8251
8975
|
return null;
|
|
8252
|
-
}) }) : /* @__PURE__ */
|
|
8976
|
+
}) }) : /* @__PURE__ */ jsx16(
|
|
8253
8977
|
"div",
|
|
8254
8978
|
{
|
|
8255
8979
|
style: {
|
|
@@ -8263,7 +8987,7 @@ var MessageBubble = ({
|
|
|
8263
8987
|
)
|
|
8264
8988
|
}
|
|
8265
8989
|
),
|
|
8266
|
-
!isLoading && /* @__PURE__ */
|
|
8990
|
+
!isLoading && /* @__PURE__ */ jsxs15(
|
|
8267
8991
|
"div",
|
|
8268
8992
|
{
|
|
8269
8993
|
style: {
|
|
@@ -8275,7 +8999,7 @@ var MessageBubble = ({
|
|
|
8275
8999
|
transition: "opacity 0.15s ease"
|
|
8276
9000
|
},
|
|
8277
9001
|
children: [
|
|
8278
|
-
/* @__PURE__ */
|
|
9002
|
+
/* @__PURE__ */ jsx16("button", { onClick: onCopy, style: actionButtonSmallStyle, title: "\uBCF5\uC0AC", children: /* @__PURE__ */ jsx16(
|
|
8279
9003
|
IconSvg,
|
|
8280
9004
|
{
|
|
8281
9005
|
name: isCopied ? "check-line" : "file-copy-line",
|
|
@@ -8283,7 +9007,7 @@ var MessageBubble = ({
|
|
|
8283
9007
|
color: isCopied ? "var(--chatllm-success)" : "var(--chatllm-text-muted)"
|
|
8284
9008
|
}
|
|
8285
9009
|
) }),
|
|
8286
|
-
/* @__PURE__ */
|
|
9010
|
+
/* @__PURE__ */ jsx16("button", { onClick: onEdit, style: actionButtonSmallStyle, title: "\uC218\uC815", children: /* @__PURE__ */ jsx16(IconSvg, { name: "edit-line", size: 12, color: "var(--chatllm-text-muted)" }) })
|
|
8287
9011
|
]
|
|
8288
9012
|
}
|
|
8289
9013
|
)
|
|
@@ -8291,7 +9015,7 @@ var MessageBubble = ({
|
|
|
8291
9015
|
}
|
|
8292
9016
|
);
|
|
8293
9017
|
}
|
|
8294
|
-
return /* @__PURE__ */
|
|
9018
|
+
return /* @__PURE__ */ jsxs15(
|
|
8295
9019
|
"div",
|
|
8296
9020
|
{
|
|
8297
9021
|
className: "chatllm-message chatllm-message--assistant",
|
|
@@ -8304,7 +9028,7 @@ var MessageBubble = ({
|
|
|
8304
9028
|
onMouseEnter: () => setShowActions(true),
|
|
8305
9029
|
onMouseLeave: () => setShowActions(false),
|
|
8306
9030
|
children: [
|
|
8307
|
-
/* @__PURE__ */
|
|
9031
|
+
/* @__PURE__ */ jsxs15(
|
|
8308
9032
|
"div",
|
|
8309
9033
|
{
|
|
8310
9034
|
className: "chatllm-sheet",
|
|
@@ -8315,7 +9039,7 @@ var MessageBubble = ({
|
|
|
8315
9039
|
gap: "12px"
|
|
8316
9040
|
},
|
|
8317
9041
|
children: [
|
|
8318
|
-
/* @__PURE__ */
|
|
9042
|
+
/* @__PURE__ */ jsx16("div", { style: { flexShrink: 0 }, children: /* @__PURE__ */ jsx16(
|
|
8319
9043
|
"div",
|
|
8320
9044
|
{
|
|
8321
9045
|
style: {
|
|
@@ -8328,11 +9052,11 @@ var MessageBubble = ({
|
|
|
8328
9052
|
justifyContent: "center",
|
|
8329
9053
|
color: "var(--chatllm-primary)"
|
|
8330
9054
|
},
|
|
8331
|
-
children: /* @__PURE__ */
|
|
9055
|
+
children: /* @__PURE__ */ jsx16(IconSvg, { name: "magic-line", size: 20 })
|
|
8332
9056
|
}
|
|
8333
9057
|
) }),
|
|
8334
|
-
/* @__PURE__ */
|
|
8335
|
-
displayModel && /* @__PURE__ */
|
|
9058
|
+
/* @__PURE__ */ jsxs15("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
9059
|
+
displayModel && /* @__PURE__ */ jsx16(
|
|
8336
9060
|
"div",
|
|
8337
9061
|
{
|
|
8338
9062
|
style: {
|
|
@@ -8341,7 +9065,7 @@ var MessageBubble = ({
|
|
|
8341
9065
|
gap: "8px",
|
|
8342
9066
|
marginBottom: "8px"
|
|
8343
9067
|
},
|
|
8344
|
-
children: /* @__PURE__ */
|
|
9068
|
+
children: /* @__PURE__ */ jsx16(
|
|
8345
9069
|
"span",
|
|
8346
9070
|
{
|
|
8347
9071
|
style: {
|
|
@@ -8356,9 +9080,9 @@ var MessageBubble = ({
|
|
|
8356
9080
|
)
|
|
8357
9081
|
}
|
|
8358
9082
|
),
|
|
8359
|
-
message.isDeepResearch && message.researchProgress && message.researchProgress.phase !== "done" && /* @__PURE__ */
|
|
8360
|
-
message.skillExecution && message.skillExecution.status !== "done" && (message.skillExecution.progress?.subAgents ? /* @__PURE__ */
|
|
8361
|
-
message.isDeepResearch && displayContent && /* @__PURE__ */
|
|
9083
|
+
message.isDeepResearch && message.researchProgress && message.researchProgress.phase !== "done" && /* @__PURE__ */ jsx16(DeepResearchProgressUI, { progress: message.researchProgress }),
|
|
9084
|
+
message.skillExecution && message.skillExecution.status !== "done" && (message.skillExecution.progress?.subAgents ? /* @__PURE__ */ jsx16(DeepResearchProgressUI, { progress: message.skillExecution.progress }) : /* @__PURE__ */ jsx16(SkillProgressUI, { execution: message.skillExecution })),
|
|
9085
|
+
message.isDeepResearch && displayContent && /* @__PURE__ */ jsxs15(
|
|
8362
9086
|
"div",
|
|
8363
9087
|
{
|
|
8364
9088
|
className: "chatllm-deep-research__header",
|
|
@@ -8371,8 +9095,8 @@ var MessageBubble = ({
|
|
|
8371
9095
|
borderBottom: "1px solid var(--chatllm-border-light)"
|
|
8372
9096
|
},
|
|
8373
9097
|
children: [
|
|
8374
|
-
/* @__PURE__ */
|
|
8375
|
-
/* @__PURE__ */
|
|
9098
|
+
/* @__PURE__ */ jsx16(IconSvg, { name: "search-eye-line", size: 18, color: "var(--chatllm-primary)" }),
|
|
9099
|
+
/* @__PURE__ */ jsx16(
|
|
8376
9100
|
"span",
|
|
8377
9101
|
{
|
|
8378
9102
|
style: {
|
|
@@ -8383,7 +9107,7 @@ var MessageBubble = ({
|
|
|
8383
9107
|
children: "\uC2EC\uCE35\uC5F0\uAD6C"
|
|
8384
9108
|
}
|
|
8385
9109
|
),
|
|
8386
|
-
displaySources && displaySources.length > 0 && /* @__PURE__ */
|
|
9110
|
+
displaySources && displaySources.length > 0 && /* @__PURE__ */ jsxs15(
|
|
8387
9111
|
"span",
|
|
8388
9112
|
{
|
|
8389
9113
|
className: "chatllm-deep-research__source-count",
|
|
@@ -8405,7 +9129,7 @@ var MessageBubble = ({
|
|
|
8405
9129
|
]
|
|
8406
9130
|
}
|
|
8407
9131
|
),
|
|
8408
|
-
!!message.contentParts?.length && /* @__PURE__ */
|
|
9132
|
+
!!message.contentParts?.length && /* @__PURE__ */ jsx16("div", { style: { wordBreak: "break-word" }, children: /* @__PURE__ */ jsx16(
|
|
8409
9133
|
ContentPartRenderer,
|
|
8410
9134
|
{
|
|
8411
9135
|
parts: message.contentParts,
|
|
@@ -8416,13 +9140,13 @@ var MessageBubble = ({
|
|
|
8416
9140
|
) }),
|
|
8417
9141
|
isLoading && !displayContent && !message.isDeepResearch && (message.contentParts?.length ? (
|
|
8418
9142
|
/* contentParts 있을 때: 간소화된 AI 응답 대기 표시 */
|
|
8419
|
-
/* @__PURE__ */
|
|
8420
|
-
/* @__PURE__ */
|
|
8421
|
-
/* @__PURE__ */
|
|
8422
|
-
/* @__PURE__ */
|
|
8423
|
-
/* @__PURE__ */
|
|
9143
|
+
/* @__PURE__ */ jsxs15("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginTop: "4px" }, children: [
|
|
9144
|
+
/* @__PURE__ */ jsxs15("div", { style: { display: "flex", gap: "4px", alignItems: "center" }, children: [
|
|
9145
|
+
/* @__PURE__ */ jsx16("span", { className: "chatllm-dot-bounce", style: dotStyle }),
|
|
9146
|
+
/* @__PURE__ */ jsx16("span", { className: "chatllm-dot-bounce", style: dotStyle }),
|
|
9147
|
+
/* @__PURE__ */ jsx16("span", { className: "chatllm-dot-bounce", style: dotStyle })
|
|
8424
9148
|
] }),
|
|
8425
|
-
/* @__PURE__ */
|
|
9149
|
+
/* @__PURE__ */ jsx16(
|
|
8426
9150
|
"span",
|
|
8427
9151
|
{
|
|
8428
9152
|
style: {
|
|
@@ -8437,14 +9161,14 @@ var MessageBubble = ({
|
|
|
8437
9161
|
] })
|
|
8438
9162
|
) : (
|
|
8439
9163
|
/* contentParts 없을 때: 풀 스켈레톤 */
|
|
8440
|
-
/* @__PURE__ */
|
|
8441
|
-
/* @__PURE__ */
|
|
8442
|
-
/* @__PURE__ */
|
|
8443
|
-
/* @__PURE__ */
|
|
8444
|
-
/* @__PURE__ */
|
|
8445
|
-
/* @__PURE__ */
|
|
9164
|
+
/* @__PURE__ */ jsxs15("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
9165
|
+
/* @__PURE__ */ jsxs15("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
|
|
9166
|
+
/* @__PURE__ */ jsxs15("div", { style: { display: "flex", gap: "4px", alignItems: "center" }, children: [
|
|
9167
|
+
/* @__PURE__ */ jsx16("span", { className: "chatllm-dot-bounce", style: dotStyle }),
|
|
9168
|
+
/* @__PURE__ */ jsx16("span", { className: "chatllm-dot-bounce", style: dotStyle }),
|
|
9169
|
+
/* @__PURE__ */ jsx16("span", { className: "chatllm-dot-bounce", style: dotStyle })
|
|
8446
9170
|
] }),
|
|
8447
|
-
/* @__PURE__ */
|
|
9171
|
+
/* @__PURE__ */ jsx16(
|
|
8448
9172
|
"span",
|
|
8449
9173
|
{
|
|
8450
9174
|
style: {
|
|
@@ -8457,17 +9181,17 @@ var MessageBubble = ({
|
|
|
8457
9181
|
}
|
|
8458
9182
|
)
|
|
8459
9183
|
] }),
|
|
8460
|
-
/* @__PURE__ */
|
|
8461
|
-
/* @__PURE__ */
|
|
8462
|
-
/* @__PURE__ */
|
|
8463
|
-
/* @__PURE__ */
|
|
8464
|
-
/* @__PURE__ */
|
|
8465
|
-
/* @__PURE__ */
|
|
9184
|
+
/* @__PURE__ */ jsxs15("div", { className: "chatllm-skeleton-pulse", style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
9185
|
+
/* @__PURE__ */ jsx16("div", { style: { height: "32px", width: "75%", backgroundColor: "var(--chatllm-bg-tertiary)", borderRadius: "8px" } }),
|
|
9186
|
+
/* @__PURE__ */ jsxs15("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
9187
|
+
/* @__PURE__ */ jsx16("div", { style: { height: "16px", width: "100%", backgroundColor: "var(--chatllm-bg-secondary)", borderRadius: "4px" } }),
|
|
9188
|
+
/* @__PURE__ */ jsx16("div", { style: { height: "16px", width: "85%", backgroundColor: "var(--chatllm-bg-secondary)", borderRadius: "4px" } }),
|
|
9189
|
+
/* @__PURE__ */ jsx16("div", { style: { height: "16px", width: "65%", backgroundColor: "var(--chatllm-bg-secondary)", borderRadius: "4px" } })
|
|
8466
9190
|
] })
|
|
8467
9191
|
] })
|
|
8468
9192
|
] })
|
|
8469
9193
|
)),
|
|
8470
|
-
displayContent ? /* @__PURE__ */
|
|
9194
|
+
displayContent ? /* @__PURE__ */ jsx16("div", { style: { wordBreak: "break-word" }, children: /* @__PURE__ */ jsx16(
|
|
8471
9195
|
MarkdownRenderer,
|
|
8472
9196
|
{
|
|
8473
9197
|
content: displayContent,
|
|
@@ -8476,7 +9200,7 @@ var MessageBubble = ({
|
|
|
8476
9200
|
thinkingDefaultOpen
|
|
8477
9201
|
}
|
|
8478
9202
|
) }) : null,
|
|
8479
|
-
message.pollBlock && message.pollBlock.questions.length > 0 && /* @__PURE__ */
|
|
9203
|
+
message.pollBlock && message.pollBlock.questions.length > 0 && /* @__PURE__ */ jsx16(
|
|
8480
9204
|
PollCard,
|
|
8481
9205
|
{
|
|
8482
9206
|
questions: message.pollBlock.questions,
|
|
@@ -8488,7 +9212,18 @@ var MessageBubble = ({
|
|
|
8488
9212
|
}
|
|
8489
9213
|
}
|
|
8490
9214
|
),
|
|
8491
|
-
|
|
9215
|
+
message.checklistBlock && message.checklistBlock.items.length > 0 && /* @__PURE__ */ jsx16(
|
|
9216
|
+
ChecklistCard,
|
|
9217
|
+
{
|
|
9218
|
+
items: message.checklistBlock.items,
|
|
9219
|
+
currentStep: message.checklistBlock.currentStep,
|
|
9220
|
+
completed: message.checklistBlock.completed,
|
|
9221
|
+
onAbort: onChecklistAbort,
|
|
9222
|
+
onRetryStep: onChecklistRetry,
|
|
9223
|
+
onSkipStep: onChecklistSkip
|
|
9224
|
+
}
|
|
9225
|
+
),
|
|
9226
|
+
!isLoading && !displayContent && !message.pollBlock && !message.checklistBlock && !message.contentParts?.length && /* @__PURE__ */ jsx16(
|
|
8492
9227
|
"div",
|
|
8493
9228
|
{
|
|
8494
9229
|
style: {
|
|
@@ -8501,7 +9236,7 @@ var MessageBubble = ({
|
|
|
8501
9236
|
children: "\uC751\uB2F5\uC744 \uC0DD\uC131\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694."
|
|
8502
9237
|
}
|
|
8503
9238
|
),
|
|
8504
|
-
displaySources && displaySources.length > 0 && /* @__PURE__ */
|
|
9239
|
+
displaySources && displaySources.length > 0 && /* @__PURE__ */ jsxs15(
|
|
8505
9240
|
"div",
|
|
8506
9241
|
{
|
|
8507
9242
|
style: {
|
|
@@ -8513,7 +9248,7 @@ var MessageBubble = ({
|
|
|
8513
9248
|
borderTop: "1px solid var(--chatllm-border-light)"
|
|
8514
9249
|
},
|
|
8515
9250
|
children: [
|
|
8516
|
-
/* @__PURE__ */
|
|
9251
|
+
/* @__PURE__ */ jsx16(
|
|
8517
9252
|
"span",
|
|
8518
9253
|
{
|
|
8519
9254
|
style: {
|
|
@@ -8525,7 +9260,7 @@ var MessageBubble = ({
|
|
|
8525
9260
|
children: "\uCD9C\uCC98:"
|
|
8526
9261
|
}
|
|
8527
9262
|
),
|
|
8528
|
-
displaySources.map((source, index) => /* @__PURE__ */
|
|
9263
|
+
displaySources.map((source, index) => /* @__PURE__ */ jsx16(
|
|
8529
9264
|
LinkChip,
|
|
8530
9265
|
{
|
|
8531
9266
|
text: source.title,
|
|
@@ -8538,7 +9273,7 @@ var MessageBubble = ({
|
|
|
8538
9273
|
]
|
|
8539
9274
|
}
|
|
8540
9275
|
),
|
|
8541
|
-
relevantAlternatives && relevantAlternatives.length > 0 && /* @__PURE__ */
|
|
9276
|
+
relevantAlternatives && relevantAlternatives.length > 0 && /* @__PURE__ */ jsxs15(
|
|
8542
9277
|
"div",
|
|
8543
9278
|
{
|
|
8544
9279
|
style: {
|
|
@@ -8552,8 +9287,8 @@ var MessageBubble = ({
|
|
|
8552
9287
|
fontSize: "12px"
|
|
8553
9288
|
},
|
|
8554
9289
|
children: [
|
|
8555
|
-
/* @__PURE__ */
|
|
8556
|
-
/* @__PURE__ */
|
|
9290
|
+
/* @__PURE__ */ jsx16("span", { style: { color: "var(--chatllm-text-muted)", marginRight: "4px" }, children: displayModel || "\uBAA8\uB378" }),
|
|
9291
|
+
/* @__PURE__ */ jsx16(
|
|
8557
9292
|
"button",
|
|
8558
9293
|
{
|
|
8559
9294
|
onClick: () => onAlternativeChange?.(Math.max(0, relevantActiveIndex - 1)),
|
|
@@ -8563,15 +9298,15 @@ var MessageBubble = ({
|
|
|
8563
9298
|
opacity: relevantActiveIndex === 0 ? 0.5 : 1,
|
|
8564
9299
|
cursor: relevantActiveIndex === 0 ? "not-allowed" : "pointer"
|
|
8565
9300
|
},
|
|
8566
|
-
children: /* @__PURE__ */
|
|
9301
|
+
children: /* @__PURE__ */ jsx16(IconSvg, { name: "arrow-left-line", size: 12 })
|
|
8567
9302
|
}
|
|
8568
9303
|
),
|
|
8569
|
-
/* @__PURE__ */
|
|
9304
|
+
/* @__PURE__ */ jsxs15("span", { style: { color: "var(--chatllm-text-secondary)" }, children: [
|
|
8570
9305
|
relevantActiveIndex + 1,
|
|
8571
9306
|
" / ",
|
|
8572
9307
|
relevantAlternatives.length + 1
|
|
8573
9308
|
] }),
|
|
8574
|
-
/* @__PURE__ */
|
|
9309
|
+
/* @__PURE__ */ jsx16(
|
|
8575
9310
|
"button",
|
|
8576
9311
|
{
|
|
8577
9312
|
onClick: () => onAlternativeChange?.(Math.min(relevantAlternatives.length, relevantActiveIndex + 1)),
|
|
@@ -8581,13 +9316,13 @@ var MessageBubble = ({
|
|
|
8581
9316
|
opacity: relevantActiveIndex === relevantAlternatives.length ? 0.5 : 1,
|
|
8582
9317
|
cursor: relevantActiveIndex === relevantAlternatives.length ? "not-allowed" : "pointer"
|
|
8583
9318
|
},
|
|
8584
|
-
children: /* @__PURE__ */
|
|
9319
|
+
children: /* @__PURE__ */ jsx16(IconSvg, { name: "arrow-right-line", size: 12 })
|
|
8585
9320
|
}
|
|
8586
9321
|
)
|
|
8587
9322
|
]
|
|
8588
9323
|
}
|
|
8589
9324
|
),
|
|
8590
|
-
isLoadingAlternative && /* @__PURE__ */
|
|
9325
|
+
isLoadingAlternative && /* @__PURE__ */ jsxs15(
|
|
8591
9326
|
"div",
|
|
8592
9327
|
{
|
|
8593
9328
|
style: {
|
|
@@ -8602,12 +9337,12 @@ var MessageBubble = ({
|
|
|
8602
9337
|
color: "var(--chatllm-primary, #3584FA)"
|
|
8603
9338
|
},
|
|
8604
9339
|
children: [
|
|
8605
|
-
/* @__PURE__ */
|
|
8606
|
-
/* @__PURE__ */
|
|
8607
|
-
/* @__PURE__ */
|
|
8608
|
-
/* @__PURE__ */
|
|
9340
|
+
/* @__PURE__ */ jsxs15("div", { style: { display: "flex", gap: "4px", alignItems: "center" }, children: [
|
|
9341
|
+
/* @__PURE__ */ jsx16("span", { className: "chatllm-dot-bounce", style: dotStyle }),
|
|
9342
|
+
/* @__PURE__ */ jsx16("span", { className: "chatllm-dot-bounce", style: dotStyle }),
|
|
9343
|
+
/* @__PURE__ */ jsx16("span", { className: "chatllm-dot-bounce", style: dotStyle })
|
|
8609
9344
|
] }),
|
|
8610
|
-
/* @__PURE__ */
|
|
9345
|
+
/* @__PURE__ */ jsx16("span", { style: { fontWeight: 500 }, children: "\uB2E4\uB978 \uBAA8\uB378 \uC751\uB2F5 \uC0DD\uC131 \uC911..." })
|
|
8611
9346
|
]
|
|
8612
9347
|
}
|
|
8613
9348
|
)
|
|
@@ -8615,7 +9350,7 @@ var MessageBubble = ({
|
|
|
8615
9350
|
]
|
|
8616
9351
|
}
|
|
8617
9352
|
),
|
|
8618
|
-
!isLoading && /* @__PURE__ */
|
|
9353
|
+
!isLoading && /* @__PURE__ */ jsxs15(
|
|
8619
9354
|
"div",
|
|
8620
9355
|
{
|
|
8621
9356
|
style: {
|
|
@@ -8628,7 +9363,7 @@ var MessageBubble = ({
|
|
|
8628
9363
|
transition: "opacity 0.15s ease"
|
|
8629
9364
|
},
|
|
8630
9365
|
children: [
|
|
8631
|
-
/* @__PURE__ */
|
|
9366
|
+
/* @__PURE__ */ jsx16("button", { onClick: onCopy, style: actionButtonSmallStyle, title: "\uBCF5\uC0AC", children: /* @__PURE__ */ jsx16(
|
|
8632
9367
|
IconSvg,
|
|
8633
9368
|
{
|
|
8634
9369
|
name: isCopied ? "check-line" : "file-copy-line",
|
|
@@ -8636,18 +9371,18 @@ var MessageBubble = ({
|
|
|
8636
9371
|
color: isCopied ? "var(--chatllm-success)" : "var(--chatllm-text-muted)"
|
|
8637
9372
|
}
|
|
8638
9373
|
) }),
|
|
8639
|
-
onRegenerate && /* @__PURE__ */
|
|
8640
|
-
onAskOtherModel && otherModels.length > 0 && /* @__PURE__ */
|
|
8641
|
-
/* @__PURE__ */
|
|
9374
|
+
onRegenerate && /* @__PURE__ */ jsx16("button", { onClick: onRegenerate, style: actionButtonSmallStyle, title: "\uB2E4\uC2DC \uC0DD\uC131", children: /* @__PURE__ */ jsx16(IconSvg, { name: "refresh-line", size: 12, color: "var(--chatllm-text-muted)" }) }),
|
|
9375
|
+
onAskOtherModel && otherModels.length > 0 && /* @__PURE__ */ jsxs15("div", { style: { position: "relative" }, children: [
|
|
9376
|
+
/* @__PURE__ */ jsx16(
|
|
8642
9377
|
"button",
|
|
8643
9378
|
{
|
|
8644
9379
|
onClick: () => setShowModelMenu(!showModelMenu),
|
|
8645
9380
|
style: actionButtonSmallStyle,
|
|
8646
9381
|
title: "\uB2E4\uB978 \uBAA8\uB378\uC5D0\uAC8C \uC9C8\uBB38",
|
|
8647
|
-
children: /* @__PURE__ */
|
|
9382
|
+
children: /* @__PURE__ */ jsx16(IconSvg, { name: "robot-line", size: 12, color: "var(--chatllm-text-muted)" })
|
|
8648
9383
|
}
|
|
8649
9384
|
),
|
|
8650
|
-
showModelMenu && /* @__PURE__ */
|
|
9385
|
+
showModelMenu && /* @__PURE__ */ jsx16(
|
|
8651
9386
|
ModelMenu,
|
|
8652
9387
|
{
|
|
8653
9388
|
models: otherModels,
|
|
@@ -8666,7 +9401,7 @@ var MessageBubble = ({
|
|
|
8666
9401
|
}
|
|
8667
9402
|
);
|
|
8668
9403
|
};
|
|
8669
|
-
var ModelMenu = ({ models, onSelect, onClose }) => /* @__PURE__ */
|
|
9404
|
+
var ModelMenu = ({ models, onSelect, onClose }) => /* @__PURE__ */ jsxs15(
|
|
8670
9405
|
"div",
|
|
8671
9406
|
{
|
|
8672
9407
|
style: {
|
|
@@ -8684,7 +9419,7 @@ var ModelMenu = ({ models, onSelect, onClose }) => /* @__PURE__ */ jsxs14(
|
|
|
8684
9419
|
},
|
|
8685
9420
|
onMouseLeave: onClose,
|
|
8686
9421
|
children: [
|
|
8687
|
-
/* @__PURE__ */
|
|
9422
|
+
/* @__PURE__ */ jsx16(
|
|
8688
9423
|
"div",
|
|
8689
9424
|
{
|
|
8690
9425
|
style: {
|
|
@@ -8699,7 +9434,7 @@ var ModelMenu = ({ models, onSelect, onClose }) => /* @__PURE__ */ jsxs14(
|
|
|
8699
9434
|
children: "\uB2E4\uB978 \uBAA8\uB378\uC5D0\uAC8C \uC9C8\uBB38"
|
|
8700
9435
|
}
|
|
8701
9436
|
),
|
|
8702
|
-
models.map((model) => /* @__PURE__ */
|
|
9437
|
+
models.map((model) => /* @__PURE__ */ jsxs15(
|
|
8703
9438
|
"button",
|
|
8704
9439
|
{
|
|
8705
9440
|
onClick: () => onSelect(model.id),
|
|
@@ -8724,9 +9459,9 @@ var ModelMenu = ({ models, onSelect, onClose }) => /* @__PURE__ */ jsxs14(
|
|
|
8724
9459
|
e.currentTarget.style.backgroundColor = "transparent";
|
|
8725
9460
|
},
|
|
8726
9461
|
children: [
|
|
8727
|
-
/* @__PURE__ */
|
|
8728
|
-
/* @__PURE__ */
|
|
8729
|
-
model.provider && /* @__PURE__ */
|
|
9462
|
+
/* @__PURE__ */ jsx16(IconSvg, { name: "robot-line", size: 16, color: "var(--chatllm-primary)" }),
|
|
9463
|
+
/* @__PURE__ */ jsx16("span", { style: { flex: 1, fontWeight: 500 }, children: model.name }),
|
|
9464
|
+
model.provider && /* @__PURE__ */ jsx16(
|
|
8730
9465
|
"span",
|
|
8731
9466
|
{
|
|
8732
9467
|
style: {
|
|
@@ -8775,7 +9510,7 @@ var navButtonStyle = {
|
|
|
8775
9510
|
};
|
|
8776
9511
|
|
|
8777
9512
|
// src/react/components/MessageList.tsx
|
|
8778
|
-
import { jsx as
|
|
9513
|
+
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
8779
9514
|
var MessageList = ({
|
|
8780
9515
|
messages,
|
|
8781
9516
|
isLoading,
|
|
@@ -8793,13 +9528,16 @@ var MessageList = ({
|
|
|
8793
9528
|
showThinking = true,
|
|
8794
9529
|
thinkingDefaultOpen = false,
|
|
8795
9530
|
loadingAlternativeFor,
|
|
8796
|
-
onPollSubmit
|
|
9531
|
+
onPollSubmit,
|
|
9532
|
+
onChecklistAbort,
|
|
9533
|
+
onChecklistRetry,
|
|
9534
|
+
onChecklistSkip
|
|
8797
9535
|
}) => {
|
|
8798
9536
|
const messagesEndRef = useRef8(null);
|
|
8799
9537
|
const containerRef = useRef8(null);
|
|
8800
|
-
const [selectedText, setSelectedText] =
|
|
8801
|
-
const [selectionPosition, setSelectionPosition] =
|
|
8802
|
-
const [showScrollButton, setShowScrollButton] =
|
|
9538
|
+
const [selectedText, setSelectedText] = useState16("");
|
|
9539
|
+
const [selectionPosition, setSelectionPosition] = useState16(null);
|
|
9540
|
+
const [showScrollButton, setShowScrollButton] = useState16(false);
|
|
8803
9541
|
const isUserScrolledUpRef = useRef8(false);
|
|
8804
9542
|
const SCROLL_THRESHOLD = 100;
|
|
8805
9543
|
const handleScroll = useCallback8(() => {
|
|
@@ -8853,7 +9591,7 @@ var MessageList = ({
|
|
|
8853
9591
|
}
|
|
8854
9592
|
}
|
|
8855
9593
|
};
|
|
8856
|
-
return /* @__PURE__ */
|
|
9594
|
+
return /* @__PURE__ */ jsxs16(
|
|
8857
9595
|
"div",
|
|
8858
9596
|
{
|
|
8859
9597
|
ref: containerRef,
|
|
@@ -8866,7 +9604,7 @@ var MessageList = ({
|
|
|
8866
9604
|
onScroll: handleScroll,
|
|
8867
9605
|
onMouseUp: handleMouseUp,
|
|
8868
9606
|
children: [
|
|
8869
|
-
/* @__PURE__ */
|
|
9607
|
+
/* @__PURE__ */ jsxs16(
|
|
8870
9608
|
"div",
|
|
8871
9609
|
{
|
|
8872
9610
|
style: {
|
|
@@ -8881,7 +9619,7 @@ var MessageList = ({
|
|
|
8881
9619
|
const nextAssistant = message.role === "user" && index + 1 < messages.length ? messages[index + 1] : null;
|
|
8882
9620
|
const assistantForAlts = nextAssistant?.role === "assistant" ? nextAssistant : null;
|
|
8883
9621
|
const activeAltIndex = assistantForAlts ? activeAlternatives[assistantForAlts.id] ?? 0 : 0;
|
|
8884
|
-
return /* @__PURE__ */
|
|
9622
|
+
return /* @__PURE__ */ jsx17(
|
|
8885
9623
|
MessageBubble,
|
|
8886
9624
|
{
|
|
8887
9625
|
message,
|
|
@@ -8907,16 +9645,19 @@ var MessageList = ({
|
|
|
8907
9645
|
showThinking,
|
|
8908
9646
|
thinkingDefaultOpen,
|
|
8909
9647
|
isLoadingAlternative: loadingAlternativeFor === message.id,
|
|
8910
|
-
onPollSubmit: message.role === "assistant" && onPollSubmit ? (response) => onPollSubmit(message.id, response) : void 0
|
|
9648
|
+
onPollSubmit: message.role === "assistant" && onPollSubmit ? (response) => onPollSubmit(message.id, response) : void 0,
|
|
9649
|
+
onChecklistAbort: message.role === "assistant" && onChecklistAbort ? onChecklistAbort : void 0,
|
|
9650
|
+
onChecklistRetry: message.role === "assistant" && onChecklistRetry ? (stepIndex) => onChecklistRetry(message.id, stepIndex) : void 0,
|
|
9651
|
+
onChecklistSkip: message.role === "assistant" && onChecklistSkip ? (stepIndex) => onChecklistSkip(message.id, stepIndex) : void 0
|
|
8911
9652
|
},
|
|
8912
9653
|
message.id
|
|
8913
9654
|
);
|
|
8914
9655
|
}),
|
|
8915
|
-
/* @__PURE__ */
|
|
9656
|
+
/* @__PURE__ */ jsx17("div", { ref: messagesEndRef })
|
|
8916
9657
|
]
|
|
8917
9658
|
}
|
|
8918
9659
|
),
|
|
8919
|
-
showScrollButton && /* @__PURE__ */
|
|
9660
|
+
showScrollButton && /* @__PURE__ */ jsx17(
|
|
8920
9661
|
"button",
|
|
8921
9662
|
{
|
|
8922
9663
|
onClick: scrollToBottom,
|
|
@@ -8939,10 +9680,10 @@ var MessageList = ({
|
|
|
8939
9680
|
zIndex: 10,
|
|
8940
9681
|
transition: "opacity 0.2s"
|
|
8941
9682
|
},
|
|
8942
|
-
children: /* @__PURE__ */
|
|
9683
|
+
children: /* @__PURE__ */ jsx17(IconSvg, { name: "arrow-down-s-line", size: 24, color: "var(--chatllm-text-secondary)" })
|
|
8943
9684
|
}
|
|
8944
9685
|
),
|
|
8945
|
-
selectionPosition && /* @__PURE__ */
|
|
9686
|
+
selectionPosition && /* @__PURE__ */ jsxs16(
|
|
8946
9687
|
"div",
|
|
8947
9688
|
{
|
|
8948
9689
|
style: {
|
|
@@ -8954,7 +9695,7 @@ var MessageList = ({
|
|
|
8954
9695
|
pointerEvents: "auto"
|
|
8955
9696
|
},
|
|
8956
9697
|
children: [
|
|
8957
|
-
/* @__PURE__ */
|
|
9698
|
+
/* @__PURE__ */ jsxs16(
|
|
8958
9699
|
"button",
|
|
8959
9700
|
{
|
|
8960
9701
|
onClick: handleQuote,
|
|
@@ -8974,12 +9715,12 @@ var MessageList = ({
|
|
|
8974
9715
|
whiteSpace: "nowrap"
|
|
8975
9716
|
},
|
|
8976
9717
|
children: [
|
|
8977
|
-
/* @__PURE__ */
|
|
9718
|
+
/* @__PURE__ */ jsx17(IconSvg, { name: "double-quotes-l", size: 16, color: "#ffffff" }),
|
|
8978
9719
|
"\uC778\uC6A9\uD558\uAE30"
|
|
8979
9720
|
]
|
|
8980
9721
|
}
|
|
8981
9722
|
),
|
|
8982
|
-
/* @__PURE__ */
|
|
9723
|
+
/* @__PURE__ */ jsx17(
|
|
8983
9724
|
"div",
|
|
8984
9725
|
{
|
|
8985
9726
|
style: {
|
|
@@ -9004,8 +9745,8 @@ var MessageList = ({
|
|
|
9004
9745
|
};
|
|
9005
9746
|
|
|
9006
9747
|
// src/react/components/SettingsModal.tsx
|
|
9007
|
-
import { useState as
|
|
9008
|
-
import { jsx as
|
|
9748
|
+
import { useState as useState17, useEffect as useEffect9 } from "react";
|
|
9749
|
+
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
9009
9750
|
var DEFAULT_PERSONALIZATION2 = {
|
|
9010
9751
|
responseStyle: {
|
|
9011
9752
|
warmth: "medium",
|
|
@@ -9040,8 +9781,8 @@ var SettingsModal = ({
|
|
|
9040
9781
|
currentProjectTitle,
|
|
9041
9782
|
showMemoryTab = true
|
|
9042
9783
|
}) => {
|
|
9043
|
-
const [activeTab, setActiveTab] =
|
|
9044
|
-
const [localApiKey, setLocalApiKey] =
|
|
9784
|
+
const [activeTab, setActiveTab] = useState17("general");
|
|
9785
|
+
const [localApiKey, setLocalApiKey] = useState17(apiKey);
|
|
9045
9786
|
useEffect9(() => {
|
|
9046
9787
|
setLocalApiKey(apiKey);
|
|
9047
9788
|
}, [apiKey]);
|
|
@@ -9068,7 +9809,7 @@ var SettingsModal = ({
|
|
|
9068
9809
|
setLocalApiKey(value);
|
|
9069
9810
|
onApiKeyChange?.(value);
|
|
9070
9811
|
};
|
|
9071
|
-
return /* @__PURE__ */
|
|
9812
|
+
return /* @__PURE__ */ jsx18(
|
|
9072
9813
|
"div",
|
|
9073
9814
|
{
|
|
9074
9815
|
className: "chatllm-settings-overlay",
|
|
@@ -9082,7 +9823,7 @@ var SettingsModal = ({
|
|
|
9082
9823
|
zIndex: 1e3
|
|
9083
9824
|
},
|
|
9084
9825
|
onClick: onClose,
|
|
9085
|
-
children: /* @__PURE__ */
|
|
9826
|
+
children: /* @__PURE__ */ jsxs17(
|
|
9086
9827
|
"div",
|
|
9087
9828
|
{
|
|
9088
9829
|
className: "chatllm-settings-modal",
|
|
@@ -9100,7 +9841,7 @@ var SettingsModal = ({
|
|
|
9100
9841
|
},
|
|
9101
9842
|
onClick: (e) => e.stopPropagation(),
|
|
9102
9843
|
children: [
|
|
9103
|
-
/* @__PURE__ */
|
|
9844
|
+
/* @__PURE__ */ jsxs17(
|
|
9104
9845
|
"div",
|
|
9105
9846
|
{
|
|
9106
9847
|
style: {
|
|
@@ -9111,7 +9852,7 @@ var SettingsModal = ({
|
|
|
9111
9852
|
flexDirection: "column"
|
|
9112
9853
|
},
|
|
9113
9854
|
children: [
|
|
9114
|
-
/* @__PURE__ */
|
|
9855
|
+
/* @__PURE__ */ jsx18("div", { style: { padding: "16px", borderBottom: "1px solid var(--chatllm-border, #e5e7eb)" }, children: /* @__PURE__ */ jsx18(
|
|
9115
9856
|
"button",
|
|
9116
9857
|
{
|
|
9117
9858
|
onClick: onClose,
|
|
@@ -9125,11 +9866,11 @@ var SettingsModal = ({
|
|
|
9125
9866
|
alignItems: "center",
|
|
9126
9867
|
justifyContent: "center"
|
|
9127
9868
|
},
|
|
9128
|
-
children: /* @__PURE__ */
|
|
9869
|
+
children: /* @__PURE__ */ jsx18(IconSvg, { name: "close-line", size: 20, color: "var(--chatllm-text-muted, #6b7280)" })
|
|
9129
9870
|
}
|
|
9130
9871
|
) }),
|
|
9131
|
-
/* @__PURE__ */
|
|
9132
|
-
/* @__PURE__ */
|
|
9872
|
+
/* @__PURE__ */ jsxs17("nav", { style: { flex: 1, padding: "8px" }, children: [
|
|
9873
|
+
/* @__PURE__ */ jsx18(
|
|
9133
9874
|
TabButton,
|
|
9134
9875
|
{
|
|
9135
9876
|
active: activeTab === "general",
|
|
@@ -9138,7 +9879,7 @@ var SettingsModal = ({
|
|
|
9138
9879
|
label: "\uC77C\uBC18"
|
|
9139
9880
|
}
|
|
9140
9881
|
),
|
|
9141
|
-
/* @__PURE__ */
|
|
9882
|
+
/* @__PURE__ */ jsx18(
|
|
9142
9883
|
TabButton,
|
|
9143
9884
|
{
|
|
9144
9885
|
active: activeTab === "personalization",
|
|
@@ -9147,7 +9888,7 @@ var SettingsModal = ({
|
|
|
9147
9888
|
label: "\uAC1C\uC778 \uB9DE\uCDA4 \uC124\uC815"
|
|
9148
9889
|
}
|
|
9149
9890
|
),
|
|
9150
|
-
showMemoryTab && /* @__PURE__ */
|
|
9891
|
+
showMemoryTab && /* @__PURE__ */ jsx18(
|
|
9151
9892
|
TabButton,
|
|
9152
9893
|
{
|
|
9153
9894
|
active: activeTab === "memory",
|
|
@@ -9156,7 +9897,7 @@ var SettingsModal = ({
|
|
|
9156
9897
|
label: "AI \uBA54\uBAA8\uB9AC"
|
|
9157
9898
|
}
|
|
9158
9899
|
),
|
|
9159
|
-
showMemoryTab && enableProjects && /* @__PURE__ */
|
|
9900
|
+
showMemoryTab && enableProjects && /* @__PURE__ */ jsx18(
|
|
9160
9901
|
TabButton,
|
|
9161
9902
|
{
|
|
9162
9903
|
active: activeTab === "project-memory",
|
|
@@ -9165,7 +9906,7 @@ var SettingsModal = ({
|
|
|
9165
9906
|
label: "\uD504\uB85C\uC81D\uD2B8 \uBA54\uBAA8\uB9AC"
|
|
9166
9907
|
}
|
|
9167
9908
|
),
|
|
9168
|
-
/* @__PURE__ */
|
|
9909
|
+
/* @__PURE__ */ jsx18(
|
|
9169
9910
|
TabButton,
|
|
9170
9911
|
{
|
|
9171
9912
|
active: activeTab === "data",
|
|
@@ -9178,24 +9919,24 @@ var SettingsModal = ({
|
|
|
9178
9919
|
]
|
|
9179
9920
|
}
|
|
9180
9921
|
),
|
|
9181
|
-
/* @__PURE__ */
|
|
9182
|
-
activeTab === "general" && /* @__PURE__ */
|
|
9183
|
-
/* @__PURE__ */
|
|
9184
|
-
/* @__PURE__ */
|
|
9922
|
+
/* @__PURE__ */ jsxs17("div", { style: { flex: 1, overflow: "auto", padding: "24px" }, children: [
|
|
9923
|
+
activeTab === "general" && /* @__PURE__ */ jsxs17("div", { children: [
|
|
9924
|
+
/* @__PURE__ */ jsx18("h2", { style: { fontSize: "20px", fontWeight: 600, marginBottom: "24px", color: "var(--chatllm-text, #1f2937)" }, children: "\uC77C\uBC18" }),
|
|
9925
|
+
/* @__PURE__ */ jsx18(SettingRow, { label: "\uC5B8\uC5B4", children: /* @__PURE__ */ jsxs17(
|
|
9185
9926
|
"select",
|
|
9186
9927
|
{
|
|
9187
9928
|
value: personalization.language,
|
|
9188
9929
|
onChange: (e) => onPersonalizationChange({ ...personalization, language: e.target.value }),
|
|
9189
9930
|
style: selectStyle,
|
|
9190
9931
|
children: [
|
|
9191
|
-
/* @__PURE__ */
|
|
9192
|
-
/* @__PURE__ */
|
|
9193
|
-
/* @__PURE__ */
|
|
9194
|
-
/* @__PURE__ */
|
|
9932
|
+
/* @__PURE__ */ jsx18("option", { value: "auto", children: "\uC790\uB3D9 \uD0D0\uC9C0" }),
|
|
9933
|
+
/* @__PURE__ */ jsx18("option", { value: "ko", children: "\uD55C\uAD6D\uC5B4" }),
|
|
9934
|
+
/* @__PURE__ */ jsx18("option", { value: "en", children: "English" }),
|
|
9935
|
+
/* @__PURE__ */ jsx18("option", { value: "ja", children: "\u65E5\u672C\u8A9E" })
|
|
9195
9936
|
]
|
|
9196
9937
|
}
|
|
9197
9938
|
) }),
|
|
9198
|
-
/* @__PURE__ */
|
|
9939
|
+
/* @__PURE__ */ jsx18(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__ */ jsx18(
|
|
9199
9940
|
"button",
|
|
9200
9941
|
{
|
|
9201
9942
|
onClick: () => onPersonalizationChange(DEFAULT_PERSONALIZATION2),
|
|
@@ -9203,11 +9944,11 @@ var SettingsModal = ({
|
|
|
9203
9944
|
children: "\uCD08\uAE30\uD654"
|
|
9204
9945
|
}
|
|
9205
9946
|
) }),
|
|
9206
|
-
onApiKeyChange && /* @__PURE__ */
|
|
9207
|
-
/* @__PURE__ */
|
|
9208
|
-
/* @__PURE__ */
|
|
9209
|
-
/* @__PURE__ */
|
|
9210
|
-
/* @__PURE__ */
|
|
9947
|
+
onApiKeyChange && /* @__PURE__ */ jsxs17("div", { style: { marginTop: "32px", paddingTop: "24px", borderTop: "1px solid var(--chatllm-border, #e5e7eb)" }, children: [
|
|
9948
|
+
/* @__PURE__ */ jsx18("h3", { style: { fontSize: "16px", fontWeight: 500, marginBottom: "16px", color: "var(--chatllm-text, #1f2937)" }, children: "API \uC124\uC815" }),
|
|
9949
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
9950
|
+
/* @__PURE__ */ jsx18("label", { style: { display: "block", fontSize: "14px", marginBottom: "8px", color: "var(--chatllm-text, #374151)" }, children: apiKeyLabel }),
|
|
9951
|
+
/* @__PURE__ */ jsx18(
|
|
9211
9952
|
"input",
|
|
9212
9953
|
{
|
|
9213
9954
|
type: "password",
|
|
@@ -9217,18 +9958,18 @@ var SettingsModal = ({
|
|
|
9217
9958
|
style: inputStyle
|
|
9218
9959
|
}
|
|
9219
9960
|
),
|
|
9220
|
-
/* @__PURE__ */
|
|
9961
|
+
/* @__PURE__ */ jsx18("p", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #9ca3af)", marginTop: "4px" }, children: apiKeyDescription })
|
|
9221
9962
|
] })
|
|
9222
9963
|
] })
|
|
9223
9964
|
] }),
|
|
9224
|
-
activeTab === "personalization" && /* @__PURE__ */
|
|
9225
|
-
/* @__PURE__ */
|
|
9226
|
-
/* @__PURE__ */
|
|
9227
|
-
/* @__PURE__ */
|
|
9228
|
-
/* @__PURE__ */
|
|
9229
|
-
/* @__PURE__ */
|
|
9230
|
-
/* @__PURE__ */
|
|
9231
|
-
/* @__PURE__ */
|
|
9965
|
+
activeTab === "personalization" && /* @__PURE__ */ jsxs17("div", { children: [
|
|
9966
|
+
/* @__PURE__ */ jsx18("h2", { style: { fontSize: "20px", fontWeight: 600, marginBottom: "24px", color: "var(--chatllm-text, #1f2937)" }, children: "\uAC1C\uC778 \uB9DE\uCDA4 \uC124\uC815" }),
|
|
9967
|
+
/* @__PURE__ */ jsxs17("section", { style: { marginBottom: "32px" }, children: [
|
|
9968
|
+
/* @__PURE__ */ jsx18("h3", { style: { fontSize: "14px", fontWeight: 500, color: "var(--chatllm-text-muted, #6b7280)", marginBottom: "16px" }, children: "\uC0AC\uC6A9\uC790 \uD504\uB85C\uD544" }),
|
|
9969
|
+
/* @__PURE__ */ jsxs17("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
9970
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
9971
|
+
/* @__PURE__ */ jsx18("label", { style: labelStyle, children: "\uB2C9\uB124\uC784" }),
|
|
9972
|
+
/* @__PURE__ */ jsx18(
|
|
9232
9973
|
"input",
|
|
9233
9974
|
{
|
|
9234
9975
|
type: "text",
|
|
@@ -9239,9 +9980,9 @@ var SettingsModal = ({
|
|
|
9239
9980
|
}
|
|
9240
9981
|
)
|
|
9241
9982
|
] }),
|
|
9242
|
-
/* @__PURE__ */
|
|
9243
|
-
/* @__PURE__ */
|
|
9244
|
-
/* @__PURE__ */
|
|
9983
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
9984
|
+
/* @__PURE__ */ jsx18("label", { style: labelStyle, children: "\uC9C1\uC5C5" }),
|
|
9985
|
+
/* @__PURE__ */ jsx18(
|
|
9245
9986
|
"input",
|
|
9246
9987
|
{
|
|
9247
9988
|
type: "text",
|
|
@@ -9252,9 +9993,9 @@ var SettingsModal = ({
|
|
|
9252
9993
|
}
|
|
9253
9994
|
)
|
|
9254
9995
|
] }),
|
|
9255
|
-
/* @__PURE__ */
|
|
9256
|
-
/* @__PURE__ */
|
|
9257
|
-
/* @__PURE__ */
|
|
9996
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
9997
|
+
/* @__PURE__ */ jsx18("label", { style: labelStyle, children: "\uCD94\uAC00 \uC815\uBCF4" }),
|
|
9998
|
+
/* @__PURE__ */ jsx18(
|
|
9258
9999
|
"textarea",
|
|
9259
10000
|
{
|
|
9260
10001
|
value: personalization.userProfile.additionalInfo || "",
|
|
@@ -9267,62 +10008,62 @@ var SettingsModal = ({
|
|
|
9267
10008
|
] })
|
|
9268
10009
|
] })
|
|
9269
10010
|
] }),
|
|
9270
|
-
/* @__PURE__ */
|
|
9271
|
-
/* @__PURE__ */
|
|
9272
|
-
/* @__PURE__ */
|
|
10011
|
+
/* @__PURE__ */ jsxs17("section", { children: [
|
|
10012
|
+
/* @__PURE__ */ jsx18("h3", { style: { fontSize: "14px", fontWeight: 500, color: "var(--chatllm-text-muted, #6b7280)", marginBottom: "16px" }, children: "\uC751\uB2F5 \uC2A4\uD0C0\uC77C" }),
|
|
10013
|
+
/* @__PURE__ */ jsx18(SettingRow, { label: "\uB530\uB73B\uD568", children: /* @__PURE__ */ jsxs17(
|
|
9273
10014
|
"select",
|
|
9274
10015
|
{
|
|
9275
10016
|
value: personalization.responseStyle.warmth,
|
|
9276
10017
|
onChange: (e) => updateResponseStyle("warmth", e.target.value),
|
|
9277
10018
|
style: selectStyle,
|
|
9278
10019
|
children: [
|
|
9279
|
-
/* @__PURE__ */
|
|
9280
|
-
/* @__PURE__ */
|
|
9281
|
-
/* @__PURE__ */
|
|
10020
|
+
/* @__PURE__ */ jsx18("option", { value: "high", children: "\uB192\uC74C - \uCE5C\uADFC\uD558\uACE0 \uB530\uB73B\uD558\uAC8C" }),
|
|
10021
|
+
/* @__PURE__ */ jsx18("option", { value: "medium", children: "\uAE30\uBCF8\uAC12" }),
|
|
10022
|
+
/* @__PURE__ */ jsx18("option", { value: "low", children: "\uB0AE\uC74C - \uAC04\uACB0\uD558\uACE0 \uC0AC\uBB34\uC801\uC73C\uB85C" })
|
|
9282
10023
|
]
|
|
9283
10024
|
}
|
|
9284
10025
|
) }),
|
|
9285
|
-
/* @__PURE__ */
|
|
10026
|
+
/* @__PURE__ */ jsx18(SettingRow, { label: "\uC5F4\uC815\uC801", children: /* @__PURE__ */ jsxs17(
|
|
9286
10027
|
"select",
|
|
9287
10028
|
{
|
|
9288
10029
|
value: personalization.responseStyle.enthusiasm,
|
|
9289
10030
|
onChange: (e) => updateResponseStyle("enthusiasm", e.target.value),
|
|
9290
10031
|
style: selectStyle,
|
|
9291
10032
|
children: [
|
|
9292
|
-
/* @__PURE__ */
|
|
9293
|
-
/* @__PURE__ */
|
|
9294
|
-
/* @__PURE__ */
|
|
10033
|
+
/* @__PURE__ */ jsx18("option", { value: "high", children: "\uB192\uC74C - \uC801\uADF9\uC801\uC774\uACE0 \uD65C\uBC1C\uD558\uAC8C" }),
|
|
10034
|
+
/* @__PURE__ */ jsx18("option", { value: "medium", children: "\uAE30\uBCF8\uAC12" }),
|
|
10035
|
+
/* @__PURE__ */ jsx18("option", { value: "low", children: "\uB0AE\uC74C - \uCC28\uBD84\uD558\uACE0 \uC808\uC81C\uC788\uAC8C" })
|
|
9295
10036
|
]
|
|
9296
10037
|
}
|
|
9297
10038
|
) }),
|
|
9298
|
-
/* @__PURE__ */
|
|
10039
|
+
/* @__PURE__ */ jsx18(SettingRow, { label: "\uC774\uBAA8\uC9C0 \uC0AC\uC6A9", children: /* @__PURE__ */ jsxs17(
|
|
9299
10040
|
"select",
|
|
9300
10041
|
{
|
|
9301
10042
|
value: personalization.responseStyle.emojiUsage,
|
|
9302
10043
|
onChange: (e) => updateResponseStyle("emojiUsage", e.target.value),
|
|
9303
10044
|
style: selectStyle,
|
|
9304
10045
|
children: [
|
|
9305
|
-
/* @__PURE__ */
|
|
9306
|
-
/* @__PURE__ */
|
|
9307
|
-
/* @__PURE__ */
|
|
10046
|
+
/* @__PURE__ */ jsx18("option", { value: "high", children: "\uB192\uC74C - \uC790\uC8FC \uC0AC\uC6A9" }),
|
|
10047
|
+
/* @__PURE__ */ jsx18("option", { value: "medium", children: "\uAE30\uBCF8\uAC12" }),
|
|
10048
|
+
/* @__PURE__ */ jsx18("option", { value: "low", children: "\uB0AE\uC74C - \uAC70\uC758 \uC0AC\uC6A9 \uC548 \uD568" })
|
|
9308
10049
|
]
|
|
9309
10050
|
}
|
|
9310
10051
|
) }),
|
|
9311
|
-
/* @__PURE__ */
|
|
10052
|
+
/* @__PURE__ */ jsx18(SettingRow, { label: "\uC751\uB2F5 \uAE38\uC774", children: /* @__PURE__ */ jsxs17(
|
|
9312
10053
|
"select",
|
|
9313
10054
|
{
|
|
9314
10055
|
value: personalization.responseStyle.verbosity,
|
|
9315
10056
|
onChange: (e) => updateResponseStyle("verbosity", e.target.value),
|
|
9316
10057
|
style: selectStyle,
|
|
9317
10058
|
children: [
|
|
9318
|
-
/* @__PURE__ */
|
|
9319
|
-
/* @__PURE__ */
|
|
9320
|
-
/* @__PURE__ */
|
|
10059
|
+
/* @__PURE__ */ jsx18("option", { value: "detailed", children: "\uC0C1\uC138 - \uC790\uC138\uD558\uAC8C \uC124\uBA85" }),
|
|
10060
|
+
/* @__PURE__ */ jsx18("option", { value: "balanced", children: "\uAE30\uBCF8\uAC12" }),
|
|
10061
|
+
/* @__PURE__ */ jsx18("option", { value: "concise", children: "\uAC04\uACB0 - \uD575\uC2EC\uB9CC \uC694\uC57D" })
|
|
9321
10062
|
]
|
|
9322
10063
|
}
|
|
9323
10064
|
) })
|
|
9324
10065
|
] }),
|
|
9325
|
-
onSave && /* @__PURE__ */
|
|
10066
|
+
onSave && /* @__PURE__ */ jsx18("div", { style: { marginTop: "24px", display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ jsx18(
|
|
9326
10067
|
"button",
|
|
9327
10068
|
{
|
|
9328
10069
|
onClick: onSave,
|
|
@@ -9343,7 +10084,7 @@ var SettingsModal = ({
|
|
|
9343
10084
|
}
|
|
9344
10085
|
) })
|
|
9345
10086
|
] }),
|
|
9346
|
-
activeTab === "memory" && showMemoryTab && /* @__PURE__ */
|
|
10087
|
+
activeTab === "memory" && showMemoryTab && /* @__PURE__ */ jsx18(
|
|
9347
10088
|
MemoryTabContent,
|
|
9348
10089
|
{
|
|
9349
10090
|
items: memoryItems,
|
|
@@ -9352,7 +10093,7 @@ var SettingsModal = ({
|
|
|
9352
10093
|
onClearAll: onClearMemory
|
|
9353
10094
|
}
|
|
9354
10095
|
),
|
|
9355
|
-
activeTab === "project-memory" && showMemoryTab && enableProjects && /* @__PURE__ */
|
|
10096
|
+
activeTab === "project-memory" && showMemoryTab && enableProjects && /* @__PURE__ */ jsx18(
|
|
9356
10097
|
MemoryTabContent,
|
|
9357
10098
|
{
|
|
9358
10099
|
items: projectMemoryItems,
|
|
@@ -9363,9 +10104,9 @@ var SettingsModal = ({
|
|
|
9363
10104
|
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"
|
|
9364
10105
|
}
|
|
9365
10106
|
),
|
|
9366
|
-
activeTab === "data" && /* @__PURE__ */
|
|
9367
|
-
/* @__PURE__ */
|
|
9368
|
-
/* @__PURE__ */
|
|
10107
|
+
activeTab === "data" && /* @__PURE__ */ jsxs17("div", { children: [
|
|
10108
|
+
/* @__PURE__ */ jsx18("h2", { style: { fontSize: "20px", fontWeight: 600, marginBottom: "24px", color: "var(--chatllm-text, #1f2937)" }, children: "\uB370\uC774\uD130 \uC81C\uC5B4" }),
|
|
10109
|
+
/* @__PURE__ */ jsx18(SettingRow, { label: "\uBA54\uBAA8\uB9AC \uC0AC\uC6A9", description: "\uB300\uD654 \uCEE8\uD14D\uC2A4\uD2B8\uB97C \uAE30\uC5B5\uD569\uB2C8\uB2E4", children: /* @__PURE__ */ jsx18(
|
|
9369
10110
|
"button",
|
|
9370
10111
|
{
|
|
9371
10112
|
onClick: () => onPersonalizationChange({ ...personalization, useMemory: !personalization.useMemory }),
|
|
@@ -9379,7 +10120,7 @@ var SettingsModal = ({
|
|
|
9379
10120
|
position: "relative",
|
|
9380
10121
|
transition: "background-color 0.2s"
|
|
9381
10122
|
},
|
|
9382
|
-
children: /* @__PURE__ */
|
|
10123
|
+
children: /* @__PURE__ */ jsx18(
|
|
9383
10124
|
"div",
|
|
9384
10125
|
{
|
|
9385
10126
|
style: {
|
|
@@ -9397,7 +10138,7 @@ var SettingsModal = ({
|
|
|
9397
10138
|
)
|
|
9398
10139
|
}
|
|
9399
10140
|
) }),
|
|
9400
|
-
onClearAllData && /* @__PURE__ */
|
|
10141
|
+
onClearAllData && /* @__PURE__ */ jsx18(SettingRow, { label: "\uB300\uD654 \uAE30\uB85D \uC0AD\uC81C", description: "\uBAA8\uB4E0 \uB300\uD654 \uAE30\uB85D\uC744 \uC0AD\uC81C\uD569\uB2C8\uB2E4", children: /* @__PURE__ */ jsx18(
|
|
9401
10142
|
"button",
|
|
9402
10143
|
{
|
|
9403
10144
|
onClick: () => {
|
|
@@ -9417,7 +10158,7 @@ var SettingsModal = ({
|
|
|
9417
10158
|
}
|
|
9418
10159
|
);
|
|
9419
10160
|
};
|
|
9420
|
-
var TabButton = ({ active, onClick, icon, label }) => /* @__PURE__ */
|
|
10161
|
+
var TabButton = ({ active, onClick, icon, label }) => /* @__PURE__ */ jsxs17(
|
|
9421
10162
|
"button",
|
|
9422
10163
|
{
|
|
9423
10164
|
onClick,
|
|
@@ -9438,12 +10179,12 @@ var TabButton = ({ active, onClick, icon, label }) => /* @__PURE__ */ jsxs16(
|
|
|
9438
10179
|
marginBottom: "4px"
|
|
9439
10180
|
},
|
|
9440
10181
|
children: [
|
|
9441
|
-
/* @__PURE__ */
|
|
10182
|
+
/* @__PURE__ */ jsx18(IconSvg, { name: icon, size: 20 }),
|
|
9442
10183
|
label
|
|
9443
10184
|
]
|
|
9444
10185
|
}
|
|
9445
10186
|
);
|
|
9446
|
-
var SettingRow = ({ label, description, children }) => /* @__PURE__ */
|
|
10187
|
+
var SettingRow = ({ label, description, children }) => /* @__PURE__ */ jsxs17(
|
|
9447
10188
|
"div",
|
|
9448
10189
|
{
|
|
9449
10190
|
style: {
|
|
@@ -9454,9 +10195,9 @@ var SettingRow = ({ label, description, children }) => /* @__PURE__ */ jsxs16(
|
|
|
9454
10195
|
borderBottom: "1px solid var(--chatllm-border-light, #f3f4f6)"
|
|
9455
10196
|
},
|
|
9456
10197
|
children: [
|
|
9457
|
-
/* @__PURE__ */
|
|
9458
|
-
/* @__PURE__ */
|
|
9459
|
-
description && /* @__PURE__ */
|
|
10198
|
+
/* @__PURE__ */ jsxs17("div", { children: [
|
|
10199
|
+
/* @__PURE__ */ jsx18("span", { style: { fontSize: "14px", color: "var(--chatllm-text, #374151)" }, children: label }),
|
|
10200
|
+
description && /* @__PURE__ */ jsx18("p", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #9ca3af)", marginTop: "2px" }, children: description })
|
|
9460
10201
|
] }),
|
|
9461
10202
|
children
|
|
9462
10203
|
]
|
|
@@ -9516,8 +10257,8 @@ var memoryCategoryColors = {
|
|
|
9516
10257
|
preference: "#8b5cf6"
|
|
9517
10258
|
};
|
|
9518
10259
|
var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "AI \uBA54\uBAA8\uB9AC", emptyMessage = "\uC800\uC7A5\uB41C \uBA54\uBAA8\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4", emptyDescription = "\uB300\uD654\uAC00 \uC9C4\uD589\uB418\uBA74 AI\uAC00 \uC790\uB3D9\uC73C\uB85C \uC815\uBCF4\uB97C \uD559\uC2B5\uD569\uB2C8\uB2E4" }) => {
|
|
9519
|
-
const [activeFilter, setActiveFilter] =
|
|
9520
|
-
const [expandedId, setExpandedId] =
|
|
10260
|
+
const [activeFilter, setActiveFilter] = useState17("all");
|
|
10261
|
+
const [expandedId, setExpandedId] = useState17(null);
|
|
9521
10262
|
const filteredItems = activeFilter === "all" ? items : items.filter((item) => item.category === activeFilter);
|
|
9522
10263
|
const formatDate = (timestamp) => {
|
|
9523
10264
|
const date = new Date(timestamp);
|
|
@@ -9528,15 +10269,15 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9528
10269
|
minute: "2-digit"
|
|
9529
10270
|
});
|
|
9530
10271
|
};
|
|
9531
|
-
return /* @__PURE__ */
|
|
9532
|
-
/* @__PURE__ */
|
|
9533
|
-
/* @__PURE__ */
|
|
9534
|
-
/* @__PURE__ */
|
|
10272
|
+
return /* @__PURE__ */ jsxs17("div", { children: [
|
|
10273
|
+
/* @__PURE__ */ jsxs17("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "24px" }, children: [
|
|
10274
|
+
/* @__PURE__ */ jsx18("h2", { style: { fontSize: "20px", fontWeight: 600, color: "var(--chatllm-text, #1f2937)", margin: 0 }, children: title }),
|
|
10275
|
+
/* @__PURE__ */ jsxs17("span", { style: { fontSize: "13px", color: "var(--chatllm-text-muted, #9ca3af)" }, children: [
|
|
9535
10276
|
items.length,
|
|
9536
10277
|
"\uAC1C \uD56D\uBAA9"
|
|
9537
10278
|
] })
|
|
9538
10279
|
] }),
|
|
9539
|
-
/* @__PURE__ */
|
|
10280
|
+
/* @__PURE__ */ jsx18("div", { style: { display: "flex", gap: "6px", marginBottom: "20px", flexWrap: "wrap" }, children: ["all", "fact", "skill", "preference"].map((tab) => /* @__PURE__ */ jsx18(
|
|
9540
10281
|
"button",
|
|
9541
10282
|
{
|
|
9542
10283
|
onClick: () => setActiveFilter(tab),
|
|
@@ -9554,7 +10295,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9554
10295
|
},
|
|
9555
10296
|
tab
|
|
9556
10297
|
)) }),
|
|
9557
|
-
contextSummary && activeFilter === "all" && /* @__PURE__ */
|
|
10298
|
+
contextSummary && activeFilter === "all" && /* @__PURE__ */ jsxs17(
|
|
9558
10299
|
"div",
|
|
9559
10300
|
{
|
|
9560
10301
|
style: {
|
|
@@ -9565,19 +10306,19 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9565
10306
|
borderLeft: "3px solid var(--chatllm-primary, #3584FA)"
|
|
9566
10307
|
},
|
|
9567
10308
|
children: [
|
|
9568
|
-
/* @__PURE__ */
|
|
9569
|
-
/* @__PURE__ */
|
|
9570
|
-
/* @__PURE__ */
|
|
10309
|
+
/* @__PURE__ */ jsxs17("div", { style: { display: "flex", alignItems: "center", gap: "6px", marginBottom: "8px" }, children: [
|
|
10310
|
+
/* @__PURE__ */ jsx18(IconSvg, { name: "file-text-line", size: 14, color: "var(--chatllm-primary, #3584FA)" }),
|
|
10311
|
+
/* @__PURE__ */ jsx18("span", { style: { fontSize: "12px", fontWeight: 500, color: "var(--chatllm-primary, #3584FA)" }, children: "\uB300\uD654 \uC694\uC57D" })
|
|
9571
10312
|
] }),
|
|
9572
|
-
/* @__PURE__ */
|
|
10313
|
+
/* @__PURE__ */ jsx18("p", { style: { fontSize: "13px", lineHeight: "1.6", color: "var(--chatllm-text, #374151)", margin: 0 }, children: contextSummary })
|
|
9573
10314
|
]
|
|
9574
10315
|
}
|
|
9575
10316
|
),
|
|
9576
|
-
filteredItems.length === 0 ? /* @__PURE__ */
|
|
9577
|
-
/* @__PURE__ */
|
|
9578
|
-
/* @__PURE__ */
|
|
9579
|
-
/* @__PURE__ */
|
|
9580
|
-
] }) : /* @__PURE__ */
|
|
10317
|
+
filteredItems.length === 0 ? /* @__PURE__ */ jsxs17("div", { style: { padding: "40px 16px", textAlign: "center" }, children: [
|
|
10318
|
+
/* @__PURE__ */ jsx18(IconSvg, { name: "robot-line", size: 40, color: "var(--chatllm-text-muted, #d1d5db)" }),
|
|
10319
|
+
/* @__PURE__ */ jsx18("p", { style: { fontSize: "14px", color: "var(--chatllm-text-muted, #9ca3af)", marginTop: "12px" }, children: emptyMessage }),
|
|
10320
|
+
/* @__PURE__ */ jsx18("p", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #d1d5db)", marginTop: "4px" }, children: emptyDescription })
|
|
10321
|
+
] }) : /* @__PURE__ */ jsx18("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: filteredItems.map((item) => /* @__PURE__ */ jsxs17(
|
|
9581
10322
|
"div",
|
|
9582
10323
|
{
|
|
9583
10324
|
style: {
|
|
@@ -9590,10 +10331,10 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9590
10331
|
},
|
|
9591
10332
|
onClick: () => setExpandedId(expandedId === item.id ? null : item.id),
|
|
9592
10333
|
children: [
|
|
9593
|
-
/* @__PURE__ */
|
|
9594
|
-
/* @__PURE__ */
|
|
9595
|
-
/* @__PURE__ */
|
|
9596
|
-
item.category && /* @__PURE__ */
|
|
10334
|
+
/* @__PURE__ */ jsxs17("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between" }, children: [
|
|
10335
|
+
/* @__PURE__ */ jsxs17("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
10336
|
+
/* @__PURE__ */ jsxs17("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [
|
|
10337
|
+
item.category && /* @__PURE__ */ jsx18(
|
|
9597
10338
|
"span",
|
|
9598
10339
|
{
|
|
9599
10340
|
style: {
|
|
@@ -9607,12 +10348,12 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9607
10348
|
children: memoryCategoryLabels[item.category]
|
|
9608
10349
|
}
|
|
9609
10350
|
),
|
|
9610
|
-
/* @__PURE__ */
|
|
10351
|
+
/* @__PURE__ */ jsx18("span", { style: { fontSize: "11px", color: "var(--chatllm-text-muted, #9ca3af)" }, children: formatDate(item.timestamp) })
|
|
9611
10352
|
] }),
|
|
9612
|
-
/* @__PURE__ */
|
|
10353
|
+
/* @__PURE__ */ jsx18("div", { style: { fontSize: "13px", fontWeight: 500, color: "var(--chatllm-text, #1f2937)" }, children: item.key })
|
|
9613
10354
|
] }),
|
|
9614
|
-
/* @__PURE__ */
|
|
9615
|
-
onDelete && /* @__PURE__ */
|
|
10355
|
+
/* @__PURE__ */ jsxs17("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
10356
|
+
onDelete && /* @__PURE__ */ jsx18(
|
|
9616
10357
|
"button",
|
|
9617
10358
|
{
|
|
9618
10359
|
onClick: (e) => {
|
|
@@ -9628,10 +10369,10 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9628
10369
|
opacity: 0.5
|
|
9629
10370
|
},
|
|
9630
10371
|
"aria-label": "\uBA54\uBAA8\uB9AC \uC0AD\uC81C",
|
|
9631
|
-
children: /* @__PURE__ */
|
|
10372
|
+
children: /* @__PURE__ */ jsx18(IconSvg, { name: "delete-bin-line", size: 14, color: "var(--chatllm-text-muted, #9ca3af)" })
|
|
9632
10373
|
}
|
|
9633
10374
|
),
|
|
9634
|
-
/* @__PURE__ */
|
|
10375
|
+
/* @__PURE__ */ jsx18(
|
|
9635
10376
|
IconSvg,
|
|
9636
10377
|
{
|
|
9637
10378
|
name: expandedId === item.id ? "arrow-up-s-line" : "arrow-down-s-line",
|
|
@@ -9641,7 +10382,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9641
10382
|
)
|
|
9642
10383
|
] })
|
|
9643
10384
|
] }),
|
|
9644
|
-
expandedId === item.id && /* @__PURE__ */
|
|
10385
|
+
expandedId === item.id && /* @__PURE__ */ jsx18(
|
|
9645
10386
|
"div",
|
|
9646
10387
|
{
|
|
9647
10388
|
style: {
|
|
@@ -9649,7 +10390,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9649
10390
|
paddingTop: "12px",
|
|
9650
10391
|
borderTop: "1px solid var(--chatllm-border-light, #f3f4f6)"
|
|
9651
10392
|
},
|
|
9652
|
-
children: /* @__PURE__ */
|
|
10393
|
+
children: /* @__PURE__ */ jsx18(
|
|
9653
10394
|
"p",
|
|
9654
10395
|
{
|
|
9655
10396
|
style: {
|
|
@@ -9668,7 +10409,7 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9668
10409
|
},
|
|
9669
10410
|
item.id
|
|
9670
10411
|
)) }),
|
|
9671
|
-
onClearAll && items.length > 0 && /* @__PURE__ */
|
|
10412
|
+
onClearAll && items.length > 0 && /* @__PURE__ */ jsx18("div", { style: { marginTop: "24px", paddingTop: "16px", borderTop: "1px solid var(--chatllm-border, #e5e7eb)" }, children: /* @__PURE__ */ jsx18(
|
|
9672
10413
|
"button",
|
|
9673
10414
|
{
|
|
9674
10415
|
onClick: () => {
|
|
@@ -9684,8 +10425,8 @@ var MemoryTabContent = ({ items, contextSummary, onDelete, onClearAll, title = "
|
|
|
9684
10425
|
};
|
|
9685
10426
|
|
|
9686
10427
|
// src/react/components/ProjectSettingsModal.tsx
|
|
9687
|
-
import { useState as
|
|
9688
|
-
import { jsx as
|
|
10428
|
+
import { useState as useState18, useEffect as useEffect10 } from "react";
|
|
10429
|
+
import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
9689
10430
|
var COLOR_PRESETS = [
|
|
9690
10431
|
"#3584FA",
|
|
9691
10432
|
"#7c3aed",
|
|
@@ -9705,11 +10446,11 @@ var ProjectSettingsModal = ({
|
|
|
9705
10446
|
onDeleteFile,
|
|
9706
10447
|
onDeleteProject
|
|
9707
10448
|
}) => {
|
|
9708
|
-
const [activeTab, setActiveTab] =
|
|
9709
|
-
const [title, setTitle] =
|
|
9710
|
-
const [description, setDescription] =
|
|
9711
|
-
const [instructions, setInstructions] =
|
|
9712
|
-
const [color, setColor] =
|
|
10449
|
+
const [activeTab, setActiveTab] = useState18("general");
|
|
10450
|
+
const [title, setTitle] = useState18("");
|
|
10451
|
+
const [description, setDescription] = useState18("");
|
|
10452
|
+
const [instructions, setInstructions] = useState18("");
|
|
10453
|
+
const [color, setColor] = useState18("#3584FA");
|
|
9713
10454
|
useEffect10(() => {
|
|
9714
10455
|
if (project) {
|
|
9715
10456
|
setTitle(project.title);
|
|
@@ -9766,7 +10507,7 @@ var ProjectSettingsModal = ({
|
|
|
9766
10507
|
cursor: "pointer",
|
|
9767
10508
|
fontFamily: "inherit"
|
|
9768
10509
|
});
|
|
9769
|
-
return /* @__PURE__ */
|
|
10510
|
+
return /* @__PURE__ */ jsx19(
|
|
9770
10511
|
"div",
|
|
9771
10512
|
{
|
|
9772
10513
|
style: {
|
|
@@ -9781,7 +10522,7 @@ var ProjectSettingsModal = ({
|
|
|
9781
10522
|
onClick: (e) => {
|
|
9782
10523
|
if (e.target === e.currentTarget) onClose();
|
|
9783
10524
|
},
|
|
9784
|
-
children: /* @__PURE__ */
|
|
10525
|
+
children: /* @__PURE__ */ jsxs18(
|
|
9785
10526
|
"div",
|
|
9786
10527
|
{
|
|
9787
10528
|
style: {
|
|
@@ -9795,7 +10536,7 @@ var ProjectSettingsModal = ({
|
|
|
9795
10536
|
overflow: "hidden"
|
|
9796
10537
|
},
|
|
9797
10538
|
children: [
|
|
9798
|
-
/* @__PURE__ */
|
|
10539
|
+
/* @__PURE__ */ jsxs18(
|
|
9799
10540
|
"div",
|
|
9800
10541
|
{
|
|
9801
10542
|
style: {
|
|
@@ -9805,8 +10546,8 @@ var ProjectSettingsModal = ({
|
|
|
9805
10546
|
padding: "20px 24px 0"
|
|
9806
10547
|
},
|
|
9807
10548
|
children: [
|
|
9808
|
-
/* @__PURE__ */
|
|
9809
|
-
/* @__PURE__ */
|
|
10549
|
+
/* @__PURE__ */ jsx19("h2", { style: { fontSize: "16px", fontWeight: 600, margin: 0, color: "var(--chatllm-text, #1a1a1a)" }, children: "\uD504\uB85C\uC81D\uD2B8 \uC124\uC815" }),
|
|
10550
|
+
/* @__PURE__ */ jsx19(
|
|
9810
10551
|
"button",
|
|
9811
10552
|
{
|
|
9812
10553
|
onClick: onClose,
|
|
@@ -9819,13 +10560,13 @@ var ProjectSettingsModal = ({
|
|
|
9819
10560
|
alignItems: "center"
|
|
9820
10561
|
},
|
|
9821
10562
|
"aria-label": "\uB2EB\uAE30",
|
|
9822
|
-
children: /* @__PURE__ */
|
|
10563
|
+
children: /* @__PURE__ */ jsx19(IconSvg, { name: "close-line", size: 20, color: "var(--chatllm-text-muted, #999)" })
|
|
9823
10564
|
}
|
|
9824
10565
|
)
|
|
9825
10566
|
]
|
|
9826
10567
|
}
|
|
9827
10568
|
),
|
|
9828
|
-
/* @__PURE__ */
|
|
10569
|
+
/* @__PURE__ */ jsxs18(
|
|
9829
10570
|
"div",
|
|
9830
10571
|
{
|
|
9831
10572
|
style: {
|
|
@@ -9835,9 +10576,9 @@ var ProjectSettingsModal = ({
|
|
|
9835
10576
|
borderBottom: "1px solid var(--chatllm-border, #e0e0e0)"
|
|
9836
10577
|
},
|
|
9837
10578
|
children: [
|
|
9838
|
-
/* @__PURE__ */
|
|
9839
|
-
/* @__PURE__ */
|
|
9840
|
-
/* @__PURE__ */
|
|
10579
|
+
/* @__PURE__ */ jsx19("button", { onClick: () => setActiveTab("general"), style: tabStyle("general"), children: "\uC77C\uBC18" }),
|
|
10580
|
+
/* @__PURE__ */ jsx19("button", { onClick: () => setActiveTab("instructions"), style: tabStyle("instructions"), children: "\uC9C0\uCE68" }),
|
|
10581
|
+
/* @__PURE__ */ jsxs18("button", { onClick: () => setActiveTab("files"), style: tabStyle("files"), children: [
|
|
9841
10582
|
"\uD30C\uC77C (",
|
|
9842
10583
|
project.files.length,
|
|
9843
10584
|
")"
|
|
@@ -9845,11 +10586,11 @@ var ProjectSettingsModal = ({
|
|
|
9845
10586
|
]
|
|
9846
10587
|
}
|
|
9847
10588
|
),
|
|
9848
|
-
/* @__PURE__ */
|
|
9849
|
-
activeTab === "general" && /* @__PURE__ */
|
|
9850
|
-
/* @__PURE__ */
|
|
9851
|
-
/* @__PURE__ */
|
|
9852
|
-
/* @__PURE__ */
|
|
10589
|
+
/* @__PURE__ */ jsxs18("div", { style: { padding: "24px", overflowY: "auto", flex: 1 }, children: [
|
|
10590
|
+
activeTab === "general" && /* @__PURE__ */ jsxs18("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
10591
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
10592
|
+
/* @__PURE__ */ jsx19("label", { style: { display: "block", fontSize: "13px", fontWeight: 500, marginBottom: "6px", color: "var(--chatllm-text, #1a1a1a)" }, children: "\uD504\uB85C\uC81D\uD2B8 \uC774\uB984" }),
|
|
10593
|
+
/* @__PURE__ */ jsx19(
|
|
9853
10594
|
"input",
|
|
9854
10595
|
{
|
|
9855
10596
|
type: "text",
|
|
@@ -9871,9 +10612,9 @@ var ProjectSettingsModal = ({
|
|
|
9871
10612
|
}
|
|
9872
10613
|
)
|
|
9873
10614
|
] }),
|
|
9874
|
-
/* @__PURE__ */
|
|
9875
|
-
/* @__PURE__ */
|
|
9876
|
-
/* @__PURE__ */
|
|
10615
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
10616
|
+
/* @__PURE__ */ jsx19("label", { style: { display: "block", fontSize: "13px", fontWeight: 500, marginBottom: "6px", color: "var(--chatllm-text, #1a1a1a)" }, children: "\uC124\uBA85" }),
|
|
10617
|
+
/* @__PURE__ */ jsx19(
|
|
9877
10618
|
"textarea",
|
|
9878
10619
|
{
|
|
9879
10620
|
value: description,
|
|
@@ -9894,9 +10635,9 @@ var ProjectSettingsModal = ({
|
|
|
9894
10635
|
}
|
|
9895
10636
|
)
|
|
9896
10637
|
] }),
|
|
9897
|
-
/* @__PURE__ */
|
|
9898
|
-
/* @__PURE__ */
|
|
9899
|
-
/* @__PURE__ */
|
|
10638
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
10639
|
+
/* @__PURE__ */ jsx19("label", { style: { display: "block", fontSize: "13px", fontWeight: 500, marginBottom: "6px", color: "var(--chatllm-text, #1a1a1a)" }, children: "\uC0C9\uC0C1" }),
|
|
10640
|
+
/* @__PURE__ */ jsx19("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap" }, children: COLOR_PRESETS.map((c) => /* @__PURE__ */ jsx19(
|
|
9900
10641
|
"button",
|
|
9901
10642
|
{
|
|
9902
10643
|
onClick: () => setColor(c),
|
|
@@ -9914,8 +10655,8 @@ var ProjectSettingsModal = ({
|
|
|
9914
10655
|
c
|
|
9915
10656
|
)) })
|
|
9916
10657
|
] }),
|
|
9917
|
-
/* @__PURE__ */
|
|
9918
|
-
!isDefaultProject && onDeleteProject && /* @__PURE__ */
|
|
10658
|
+
/* @__PURE__ */ jsxs18("div", { style: { display: "flex", gap: "8px", justifyContent: "flex-end", marginTop: "8px" }, children: [
|
|
10659
|
+
!isDefaultProject && onDeleteProject && /* @__PURE__ */ jsx19(
|
|
9919
10660
|
"button",
|
|
9920
10661
|
{
|
|
9921
10662
|
onClick: () => {
|
|
@@ -9938,7 +10679,7 @@ var ProjectSettingsModal = ({
|
|
|
9938
10679
|
children: "\uD504\uB85C\uC81D\uD2B8 \uC0AD\uC81C"
|
|
9939
10680
|
}
|
|
9940
10681
|
),
|
|
9941
|
-
/* @__PURE__ */
|
|
10682
|
+
/* @__PURE__ */ jsx19(
|
|
9942
10683
|
"button",
|
|
9943
10684
|
{
|
|
9944
10685
|
onClick: handleSaveGeneral,
|
|
@@ -9958,9 +10699,9 @@ var ProjectSettingsModal = ({
|
|
|
9958
10699
|
)
|
|
9959
10700
|
] })
|
|
9960
10701
|
] }),
|
|
9961
|
-
activeTab === "instructions" && /* @__PURE__ */
|
|
9962
|
-
/* @__PURE__ */
|
|
9963
|
-
/* @__PURE__ */
|
|
10702
|
+
activeTab === "instructions" && /* @__PURE__ */ jsxs18("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
10703
|
+
/* @__PURE__ */ jsx19("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." }),
|
|
10704
|
+
/* @__PURE__ */ jsx19(
|
|
9964
10705
|
"textarea",
|
|
9965
10706
|
{
|
|
9966
10707
|
value: instructions,
|
|
@@ -9981,7 +10722,7 @@ var ProjectSettingsModal = ({
|
|
|
9981
10722
|
}
|
|
9982
10723
|
}
|
|
9983
10724
|
),
|
|
9984
|
-
/* @__PURE__ */
|
|
10725
|
+
/* @__PURE__ */ jsx19("div", { style: { display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ jsx19(
|
|
9985
10726
|
"button",
|
|
9986
10727
|
{
|
|
9987
10728
|
onClick: handleSaveInstructions,
|
|
@@ -10000,10 +10741,10 @@ var ProjectSettingsModal = ({
|
|
|
10000
10741
|
}
|
|
10001
10742
|
) })
|
|
10002
10743
|
] }),
|
|
10003
|
-
activeTab === "files" && /* @__PURE__ */
|
|
10004
|
-
/* @__PURE__ */
|
|
10005
|
-
/* @__PURE__ */
|
|
10006
|
-
/* @__PURE__ */
|
|
10744
|
+
activeTab === "files" && /* @__PURE__ */ jsxs18("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
10745
|
+
/* @__PURE__ */ jsxs18("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
10746
|
+
/* @__PURE__ */ jsx19("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." }),
|
|
10747
|
+
/* @__PURE__ */ jsxs18(
|
|
10007
10748
|
"button",
|
|
10008
10749
|
{
|
|
10009
10750
|
onClick: handleFileUpload,
|
|
@@ -10021,13 +10762,13 @@ var ProjectSettingsModal = ({
|
|
|
10021
10762
|
color: "var(--chatllm-text, #1a1a1a)"
|
|
10022
10763
|
},
|
|
10023
10764
|
children: [
|
|
10024
|
-
/* @__PURE__ */
|
|
10765
|
+
/* @__PURE__ */ jsx19(IconSvg, { name: "upload-line", size: 14 }),
|
|
10025
10766
|
"\uC5C5\uB85C\uB4DC"
|
|
10026
10767
|
]
|
|
10027
10768
|
}
|
|
10028
10769
|
)
|
|
10029
10770
|
] }),
|
|
10030
|
-
project.files.length === 0 ? /* @__PURE__ */
|
|
10771
|
+
project.files.length === 0 ? /* @__PURE__ */ jsx19(
|
|
10031
10772
|
"div",
|
|
10032
10773
|
{
|
|
10033
10774
|
style: {
|
|
@@ -10040,7 +10781,7 @@ var ProjectSettingsModal = ({
|
|
|
10040
10781
|
},
|
|
10041
10782
|
children: "\uC544\uC9C1 \uD30C\uC77C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"
|
|
10042
10783
|
}
|
|
10043
|
-
) : /* @__PURE__ */
|
|
10784
|
+
) : /* @__PURE__ */ jsx19("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: project.files.map((file) => /* @__PURE__ */ jsxs18(
|
|
10044
10785
|
"div",
|
|
10045
10786
|
{
|
|
10046
10787
|
style: {
|
|
@@ -10052,10 +10793,10 @@ var ProjectSettingsModal = ({
|
|
|
10052
10793
|
borderRadius: "6px"
|
|
10053
10794
|
},
|
|
10054
10795
|
children: [
|
|
10055
|
-
/* @__PURE__ */
|
|
10056
|
-
/* @__PURE__ */
|
|
10057
|
-
/* @__PURE__ */
|
|
10058
|
-
/* @__PURE__ */
|
|
10796
|
+
/* @__PURE__ */ jsxs18("div", { style: { display: "flex", alignItems: "center", gap: "10px", overflow: "hidden" }, children: [
|
|
10797
|
+
/* @__PURE__ */ jsx19(IconSvg, { name: getFileIcon2(file.type), size: 18, color: "var(--chatllm-text-muted, #999)" }),
|
|
10798
|
+
/* @__PURE__ */ jsxs18("div", { style: { overflow: "hidden" }, children: [
|
|
10799
|
+
/* @__PURE__ */ jsx19(
|
|
10059
10800
|
"div",
|
|
10060
10801
|
{
|
|
10061
10802
|
style: {
|
|
@@ -10069,13 +10810,13 @@ var ProjectSettingsModal = ({
|
|
|
10069
10810
|
children: file.name
|
|
10070
10811
|
}
|
|
10071
10812
|
),
|
|
10072
|
-
/* @__PURE__ */
|
|
10813
|
+
/* @__PURE__ */ jsxs18("div", { style: { fontSize: "11px", color: "var(--chatllm-text-muted, #999)" }, children: [
|
|
10073
10814
|
file.type,
|
|
10074
10815
|
formatSize(file.size) ? ` \xB7 ${formatSize(file.size)}` : ""
|
|
10075
10816
|
] })
|
|
10076
10817
|
] })
|
|
10077
10818
|
] }),
|
|
10078
|
-
/* @__PURE__ */
|
|
10819
|
+
/* @__PURE__ */ jsx19(
|
|
10079
10820
|
"button",
|
|
10080
10821
|
{
|
|
10081
10822
|
onClick: () => onDeleteFile(project.id, file.id),
|
|
@@ -10096,7 +10837,7 @@ var ProjectSettingsModal = ({
|
|
|
10096
10837
|
e.currentTarget.style.opacity = "0.5";
|
|
10097
10838
|
},
|
|
10098
10839
|
"aria-label": `${file.name} \uC0AD\uC81C`,
|
|
10099
|
-
children: /* @__PURE__ */
|
|
10840
|
+
children: /* @__PURE__ */ jsx19(IconSvg, { name: "delete-bin-line", size: 16, color: "#dc2626" })
|
|
10100
10841
|
}
|
|
10101
10842
|
)
|
|
10102
10843
|
]
|
|
@@ -10113,14 +10854,14 @@ var ProjectSettingsModal = ({
|
|
|
10113
10854
|
};
|
|
10114
10855
|
|
|
10115
10856
|
// src/react/components/DisclaimerModal.tsx
|
|
10116
|
-
import { jsx as
|
|
10857
|
+
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
10117
10858
|
var highlightStyle = {
|
|
10118
10859
|
color: "var(--chatllm-text, #1e293b)",
|
|
10119
10860
|
fontWeight: 600
|
|
10120
10861
|
};
|
|
10121
10862
|
var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
10122
10863
|
if (!isOpen) return null;
|
|
10123
|
-
return /* @__PURE__ */
|
|
10864
|
+
return /* @__PURE__ */ jsx20(
|
|
10124
10865
|
"div",
|
|
10125
10866
|
{
|
|
10126
10867
|
className: "chatllm-disclaimer-overlay",
|
|
@@ -10134,7 +10875,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10134
10875
|
zIndex: 1e3
|
|
10135
10876
|
},
|
|
10136
10877
|
onClick: onClose,
|
|
10137
|
-
children: /* @__PURE__ */
|
|
10878
|
+
children: /* @__PURE__ */ jsxs19(
|
|
10138
10879
|
"div",
|
|
10139
10880
|
{
|
|
10140
10881
|
className: "chatllm-disclaimer-modal",
|
|
@@ -10152,7 +10893,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10152
10893
|
},
|
|
10153
10894
|
onClick: (e) => e.stopPropagation(),
|
|
10154
10895
|
children: [
|
|
10155
|
-
/* @__PURE__ */
|
|
10896
|
+
/* @__PURE__ */ jsxs19(
|
|
10156
10897
|
"div",
|
|
10157
10898
|
{
|
|
10158
10899
|
style: {
|
|
@@ -10163,9 +10904,9 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10163
10904
|
borderBottom: "1px solid var(--chatllm-border, #e5e7eb)"
|
|
10164
10905
|
},
|
|
10165
10906
|
children: [
|
|
10166
|
-
/* @__PURE__ */
|
|
10167
|
-
/* @__PURE__ */
|
|
10168
|
-
/* @__PURE__ */
|
|
10907
|
+
/* @__PURE__ */ jsxs19("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
10908
|
+
/* @__PURE__ */ jsx20(IconSvg, { name: "error-warning-line", size: 20, color: "var(--chatllm-primary, #3584FA)" }),
|
|
10909
|
+
/* @__PURE__ */ jsx20(
|
|
10169
10910
|
"h2",
|
|
10170
10911
|
{
|
|
10171
10912
|
style: {
|
|
@@ -10178,7 +10919,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10178
10919
|
}
|
|
10179
10920
|
)
|
|
10180
10921
|
] }),
|
|
10181
|
-
/* @__PURE__ */
|
|
10922
|
+
/* @__PURE__ */ jsx20(
|
|
10182
10923
|
"button",
|
|
10183
10924
|
{
|
|
10184
10925
|
onClick: onClose,
|
|
@@ -10193,13 +10934,13 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10193
10934
|
alignItems: "center",
|
|
10194
10935
|
justifyContent: "center"
|
|
10195
10936
|
},
|
|
10196
|
-
children: /* @__PURE__ */
|
|
10937
|
+
children: /* @__PURE__ */ jsx20(IconSvg, { name: "close-line", size: 20, color: "var(--chatllm-text-muted, #64748b)" })
|
|
10197
10938
|
}
|
|
10198
10939
|
)
|
|
10199
10940
|
]
|
|
10200
10941
|
}
|
|
10201
10942
|
),
|
|
10202
|
-
/* @__PURE__ */
|
|
10943
|
+
/* @__PURE__ */ jsxs19(
|
|
10203
10944
|
"div",
|
|
10204
10945
|
{
|
|
10205
10946
|
className: "chatllm-scrollbar",
|
|
@@ -10211,12 +10952,12 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10211
10952
|
color: "var(--chatllm-text-secondary, #475569)"
|
|
10212
10953
|
},
|
|
10213
10954
|
children: [
|
|
10214
|
-
/* @__PURE__ */
|
|
10955
|
+
/* @__PURE__ */ jsxs19("p", { style: { margin: "0 0 16px" }, children: [
|
|
10215
10956
|
"\uC800\uB294 \uC5EC\uB7EC\uBD84\uC758 \uC9C8\uBB38\uC5D0 ",
|
|
10216
|
-
/* @__PURE__ */
|
|
10957
|
+
/* @__PURE__ */ jsx20("span", { style: highlightStyle, children: "\uCD5C\uC120\uC758 \uB2F5\uBCC0\uC744 \uB4DC\uB9AC\uAE30 \uC704\uD574 \uD56D\uC0C1 \uB178\uB825" }),
|
|
10217
10958
|
"\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."
|
|
10218
10959
|
] }),
|
|
10219
|
-
/* @__PURE__ */
|
|
10960
|
+
/* @__PURE__ */ jsxs19(
|
|
10220
10961
|
"div",
|
|
10221
10962
|
{
|
|
10222
10963
|
style: {
|
|
@@ -10229,33 +10970,33 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10229
10970
|
lineHeight: 1.7
|
|
10230
10971
|
},
|
|
10231
10972
|
children: [
|
|
10232
|
-
/* @__PURE__ */
|
|
10233
|
-
/* @__PURE__ */
|
|
10234
|
-
/* @__PURE__ */
|
|
10235
|
-
/* @__PURE__ */
|
|
10236
|
-
/* @__PURE__ */
|
|
10973
|
+
/* @__PURE__ */ jsx20("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" }),
|
|
10974
|
+
/* @__PURE__ */ jsxs19("ul", { style: { margin: 0, paddingLeft: "18px", display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
10975
|
+
/* @__PURE__ */ jsx20("li", { children: "\uCD5C\uC2E0 \uC815\uBCF4\uB97C \uBC18\uC601\uD558\uC9C0 \uBABB\uD55C \uB2F5\uBCC0\uC744 \uB4DC\uB9AC\uB294 \uACBD\uC6B0" }),
|
|
10976
|
+
/* @__PURE__ */ jsx20("li", { children: "\uADF8\uB7F4\uB4EF\uD558\uAC8C \uB4E4\uB9AC\uC9C0\uB9CC \uC2E4\uC81C\uB85C\uB294 \uC815\uD655\uD558\uC9C0 \uC54A\uC740 \uB0B4\uC6A9" }),
|
|
10977
|
+
/* @__PURE__ */ jsx20("li", { children: "\uC2E4\uC81C\uB85C \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 \uCD9C\uCC98\uB098 \uC778\uC6A9\uC744 \uB9CC\uB4E4\uC5B4\uB0B4\uB294 \uACBD\uC6B0" })
|
|
10237
10978
|
] })
|
|
10238
10979
|
]
|
|
10239
10980
|
}
|
|
10240
10981
|
),
|
|
10241
|
-
/* @__PURE__ */
|
|
10982
|
+
/* @__PURE__ */ jsxs19("p", { style: { margin: "0 0 16px" }, children: [
|
|
10242
10983
|
"\uC774\uB7F0 \uD604\uC0C1\uC744 ",
|
|
10243
|
-
/* @__PURE__ */
|
|
10984
|
+
/* @__PURE__ */ jsx20("span", { style: highlightStyle, children: "'\uD658\uAC01(Hallucination)'" }),
|
|
10244
10985
|
"\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, ",
|
|
10245
|
-
/* @__PURE__ */
|
|
10986
|
+
/* @__PURE__ */ jsx20("span", { style: highlightStyle, children: "\uD55C \uBC88 \uB354 \uD655\uC778" }),
|
|
10246
10987
|
"\uD574 \uC8FC\uC2DC\uBA74 \uAC10\uC0AC\uD558\uACA0\uC2B5\uB2C8\uB2E4."
|
|
10247
10988
|
] }),
|
|
10248
|
-
/* @__PURE__ */
|
|
10249
|
-
/* @__PURE__ */
|
|
10989
|
+
/* @__PURE__ */ jsxs19("p", { style: { margin: "0 0 16px" }, children: [
|
|
10990
|
+
/* @__PURE__ */ jsx20("span", { style: highlightStyle, children: "\uC81C \uB2F5\uBCC0\uC740 \uCC38\uACE0 \uC790\uB8CC" }),
|
|
10250
10991
|
"\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."
|
|
10251
10992
|
] }),
|
|
10252
|
-
/* @__PURE__ */
|
|
10993
|
+
/* @__PURE__ */ jsxs19("p", { style: { margin: "0 0 16px" }, children: [
|
|
10253
10994
|
"\uC81C\uAC00 \uC6F9 \uAC80\uC0C9 \uACB0\uACFC\uB97C \uC54C\uB824\uB4DC\uB9B4 \uB54C\uB3C4,",
|
|
10254
10995
|
" ",
|
|
10255
|
-
/* @__PURE__ */
|
|
10996
|
+
/* @__PURE__ */ jsx20("span", { style: highlightStyle, children: "\uC6D0\uBCF8 \uCD9C\uCC98\uB97C \uC9C1\uC811 \uD655\uC778" }),
|
|
10256
10997
|
"\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."
|
|
10257
10998
|
] }),
|
|
10258
|
-
/* @__PURE__ */
|
|
10999
|
+
/* @__PURE__ */ jsx20(
|
|
10259
11000
|
"div",
|
|
10260
11001
|
{
|
|
10261
11002
|
style: {
|
|
@@ -10266,10 +11007,10 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10266
11007
|
lineHeight: 1.7,
|
|
10267
11008
|
textAlign: "center"
|
|
10268
11009
|
},
|
|
10269
|
-
children: /* @__PURE__ */
|
|
11010
|
+
children: /* @__PURE__ */ jsxs19("p", { style: { margin: 0 }, children: [
|
|
10270
11011
|
"\uC800\uC5D0 \uB300\uD55C \uC758\uACAC\uC774\uB098 \uAC1C\uC120 \uC81C\uC548\uC774 \uC788\uC73C\uC2DC\uB2E4\uBA74",
|
|
10271
11012
|
" ",
|
|
10272
|
-
/* @__PURE__ */
|
|
11013
|
+
/* @__PURE__ */ jsx20(
|
|
10273
11014
|
"a",
|
|
10274
11015
|
{
|
|
10275
11016
|
href: "mailto:info@gendive.ai",
|
|
@@ -10282,7 +11023,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10282
11023
|
}
|
|
10283
11024
|
),
|
|
10284
11025
|
"\uB85C \uC54C\uB824\uC8FC\uC138\uC694.",
|
|
10285
|
-
/* @__PURE__ */
|
|
11026
|
+
/* @__PURE__ */ jsx20("br", {}),
|
|
10286
11027
|
"\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."
|
|
10287
11028
|
] })
|
|
10288
11029
|
}
|
|
@@ -10298,7 +11039,7 @@ var DisclaimerModal = ({ isOpen, onClose }) => {
|
|
|
10298
11039
|
};
|
|
10299
11040
|
|
|
10300
11041
|
// src/react/ChatUI.tsx
|
|
10301
|
-
import { Fragment as Fragment8, jsx as
|
|
11042
|
+
import { Fragment as Fragment8, jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
10302
11043
|
var DEFAULT_ACTIONS = [];
|
|
10303
11044
|
var DEFAULT_TEMPLATES = [];
|
|
10304
11045
|
var DEFAULT_MODELS = [
|
|
@@ -10341,6 +11082,17 @@ var injectStyles = () => {
|
|
|
10341
11082
|
100% { transform: rotate(360deg); }
|
|
10342
11083
|
}
|
|
10343
11084
|
|
|
11085
|
+
@keyframes chatllm-checklist-pulse {
|
|
11086
|
+
0%, 100% { opacity: 1; }
|
|
11087
|
+
50% { opacity: 0.4; }
|
|
11088
|
+
}
|
|
11089
|
+
|
|
11090
|
+
@keyframes chatllm-checklist-check {
|
|
11091
|
+
0% { transform: scale(0); opacity: 0; }
|
|
11092
|
+
50% { transform: scale(1.2); }
|
|
11093
|
+
100% { transform: scale(1); opacity: 1; }
|
|
11094
|
+
}
|
|
11095
|
+
|
|
10344
11096
|
@keyframes chatllm-welcome-exit {
|
|
10345
11097
|
from { opacity: 1; transform: translateY(0); }
|
|
10346
11098
|
to { opacity: 0; transform: translateY(-16px); }
|
|
@@ -10622,12 +11374,16 @@ var ChatUIView = ({
|
|
|
10622
11374
|
openProjectSettings,
|
|
10623
11375
|
closeProjectSettings,
|
|
10624
11376
|
projectMemory,
|
|
10625
|
-
isSessionsLoading
|
|
11377
|
+
isSessionsLoading,
|
|
11378
|
+
// Checklist
|
|
11379
|
+
handleChecklistAbort,
|
|
11380
|
+
handleChecklistRetry,
|
|
11381
|
+
handleChecklistSkip
|
|
10626
11382
|
} = state;
|
|
10627
|
-
const [disclaimerOpen, setDisclaimerOpen] =
|
|
10628
|
-
const [welcomeExiting, setWelcomeExiting] =
|
|
10629
|
-
const prevMessageCountRef =
|
|
10630
|
-
|
|
11383
|
+
const [disclaimerOpen, setDisclaimerOpen] = React16.useState(false);
|
|
11384
|
+
const [welcomeExiting, setWelcomeExiting] = React16.useState(false);
|
|
11385
|
+
const prevMessageCountRef = React16.useRef(messages.length);
|
|
11386
|
+
React16.useEffect(() => {
|
|
10631
11387
|
let timer;
|
|
10632
11388
|
if (prevMessageCountRef.current === 0 && messages.length > 0) {
|
|
10633
11389
|
setWelcomeExiting(true);
|
|
@@ -10651,7 +11407,7 @@ var ChatUIView = ({
|
|
|
10651
11407
|
const handleChoiceClick = (choice) => {
|
|
10652
11408
|
setInput(choice.text);
|
|
10653
11409
|
};
|
|
10654
|
-
const memoryItems =
|
|
11410
|
+
const memoryItems = React16.useMemo(() => {
|
|
10655
11411
|
if (!globalMemory?.state.entries) return [];
|
|
10656
11412
|
const items = [];
|
|
10657
11413
|
for (const [key, entry] of globalMemory.state.entries) {
|
|
@@ -10665,7 +11421,7 @@ var ChatUIView = ({
|
|
|
10665
11421
|
}
|
|
10666
11422
|
return items;
|
|
10667
11423
|
}, [globalMemory?.state.entries]);
|
|
10668
|
-
const projectMemoryItems =
|
|
11424
|
+
const projectMemoryItems = React16.useMemo(() => {
|
|
10669
11425
|
if (!projectMemory?.state.entries) return [];
|
|
10670
11426
|
const items = [];
|
|
10671
11427
|
for (const [key, entry] of projectMemory.state.entries) {
|
|
@@ -10680,7 +11436,7 @@ var ChatUIView = ({
|
|
|
10680
11436
|
return items;
|
|
10681
11437
|
}, [projectMemory?.state.entries]);
|
|
10682
11438
|
const themeClass = theme?.mode === "dark" ? "chatllm-dark" : "";
|
|
10683
|
-
return /* @__PURE__ */
|
|
11439
|
+
return /* @__PURE__ */ jsxs20(
|
|
10684
11440
|
"div",
|
|
10685
11441
|
{
|
|
10686
11442
|
className: `chatllm-root ${themeClass} ${className}`,
|
|
@@ -10693,7 +11449,7 @@ var ChatUIView = ({
|
|
|
10693
11449
|
position: "relative"
|
|
10694
11450
|
},
|
|
10695
11451
|
children: [
|
|
10696
|
-
showSidebar && /* @__PURE__ */
|
|
11452
|
+
showSidebar && /* @__PURE__ */ jsx21(
|
|
10697
11453
|
ChatSidebar,
|
|
10698
11454
|
{
|
|
10699
11455
|
sessions,
|
|
@@ -10725,7 +11481,7 @@ var ChatUIView = ({
|
|
|
10725
11481
|
isLoading: isSessionsLoading
|
|
10726
11482
|
}
|
|
10727
11483
|
),
|
|
10728
|
-
/* @__PURE__ */
|
|
11484
|
+
/* @__PURE__ */ jsxs20(
|
|
10729
11485
|
"main",
|
|
10730
11486
|
{
|
|
10731
11487
|
style: {
|
|
@@ -10737,7 +11493,7 @@ var ChatUIView = ({
|
|
|
10737
11493
|
minWidth: 0
|
|
10738
11494
|
},
|
|
10739
11495
|
children: [
|
|
10740
|
-
/* @__PURE__ */
|
|
11496
|
+
/* @__PURE__ */ jsx21(
|
|
10741
11497
|
ChatHeader,
|
|
10742
11498
|
{
|
|
10743
11499
|
title: currentSession?.title || "\uC0C8 \uB300\uD654",
|
|
@@ -10751,7 +11507,7 @@ var ChatUIView = ({
|
|
|
10751
11507
|
showSettings
|
|
10752
11508
|
}
|
|
10753
11509
|
),
|
|
10754
|
-
(messages.length === 0 || welcomeExiting) && /* @__PURE__ */
|
|
11510
|
+
(messages.length === 0 || welcomeExiting) && /* @__PURE__ */ jsxs20(
|
|
10755
11511
|
"div",
|
|
10756
11512
|
{
|
|
10757
11513
|
style: {
|
|
@@ -10766,7 +11522,7 @@ var ChatUIView = ({
|
|
|
10766
11522
|
pointerEvents: welcomeExiting ? "none" : "auto"
|
|
10767
11523
|
},
|
|
10768
11524
|
children: [
|
|
10769
|
-
/* @__PURE__ */
|
|
11525
|
+
/* @__PURE__ */ jsx21(
|
|
10770
11526
|
"h1",
|
|
10771
11527
|
{
|
|
10772
11528
|
style: {
|
|
@@ -10780,7 +11536,7 @@ var ChatUIView = ({
|
|
|
10780
11536
|
children: greeting ? `${greeting} \u273A` : "\u273A \uBB34\uC5C7\uC744 \uC0DD\uAC01\uD574 \uBCFC\uAE4C\uC694?"
|
|
10781
11537
|
}
|
|
10782
11538
|
),
|
|
10783
|
-
/* @__PURE__ */
|
|
11539
|
+
/* @__PURE__ */ jsx21("div", { style: { width: "100%", maxWidth: "680px" }, children: /* @__PURE__ */ jsx21(
|
|
10784
11540
|
ChatInput,
|
|
10785
11541
|
{
|
|
10786
11542
|
value: input,
|
|
@@ -10808,7 +11564,7 @@ var ChatUIView = ({
|
|
|
10808
11564
|
inline: true
|
|
10809
11565
|
}
|
|
10810
11566
|
) }),
|
|
10811
|
-
suggestedPrompts && suggestedPrompts.length > 0 && /* @__PURE__ */
|
|
11567
|
+
suggestedPrompts && suggestedPrompts.length > 0 && /* @__PURE__ */ jsx21(
|
|
10812
11568
|
"div",
|
|
10813
11569
|
{
|
|
10814
11570
|
style: {
|
|
@@ -10818,7 +11574,7 @@ var ChatUIView = ({
|
|
|
10818
11574
|
justifyContent: "center",
|
|
10819
11575
|
maxWidth: "680px"
|
|
10820
11576
|
},
|
|
10821
|
-
children: suggestedPrompts.map((sp) => /* @__PURE__ */
|
|
11577
|
+
children: suggestedPrompts.map((sp) => /* @__PURE__ */ jsxs20(
|
|
10822
11578
|
"button",
|
|
10823
11579
|
{
|
|
10824
11580
|
onClick: () => setInput(sp.prompt),
|
|
@@ -10837,7 +11593,7 @@ var ChatUIView = ({
|
|
|
10837
11593
|
transition: "all 0.2s"
|
|
10838
11594
|
},
|
|
10839
11595
|
children: [
|
|
10840
|
-
sp.icon && /* @__PURE__ */
|
|
11596
|
+
sp.icon && /* @__PURE__ */ jsx21(IconSvg, { name: sp.icon, size: 16, color: "var(--chatllm-text-muted)" }),
|
|
10841
11597
|
sp.label
|
|
10842
11598
|
]
|
|
10843
11599
|
},
|
|
@@ -10848,8 +11604,8 @@ var ChatUIView = ({
|
|
|
10848
11604
|
]
|
|
10849
11605
|
}
|
|
10850
11606
|
),
|
|
10851
|
-
messages.length > 0 && /* @__PURE__ */
|
|
10852
|
-
/* @__PURE__ */
|
|
11607
|
+
messages.length > 0 && /* @__PURE__ */ jsxs20(Fragment8, { children: [
|
|
11608
|
+
/* @__PURE__ */ jsx21(
|
|
10853
11609
|
MessageList,
|
|
10854
11610
|
{
|
|
10855
11611
|
messages,
|
|
@@ -10868,10 +11624,13 @@ var ChatUIView = ({
|
|
|
10868
11624
|
showThinking,
|
|
10869
11625
|
thinkingDefaultOpen,
|
|
10870
11626
|
loadingAlternativeFor,
|
|
10871
|
-
onPollSubmit: handlePollSubmit
|
|
11627
|
+
onPollSubmit: handlePollSubmit,
|
|
11628
|
+
onChecklistAbort: handleChecklistAbort,
|
|
11629
|
+
onChecklistRetry: handleChecklistRetry,
|
|
11630
|
+
onChecklistSkip: handleChecklistSkip
|
|
10872
11631
|
}
|
|
10873
11632
|
),
|
|
10874
|
-
/* @__PURE__ */
|
|
11633
|
+
/* @__PURE__ */ jsx21(
|
|
10875
11634
|
ChatInput,
|
|
10876
11635
|
{
|
|
10877
11636
|
value: input,
|
|
@@ -10902,7 +11661,7 @@ var ChatUIView = ({
|
|
|
10902
11661
|
]
|
|
10903
11662
|
}
|
|
10904
11663
|
),
|
|
10905
|
-
showSettings && /* @__PURE__ */
|
|
11664
|
+
showSettings && /* @__PURE__ */ jsx21(
|
|
10906
11665
|
SettingsModal,
|
|
10907
11666
|
{
|
|
10908
11667
|
isOpen: settingsOpen,
|
|
@@ -10929,7 +11688,7 @@ var ChatUIView = ({
|
|
|
10929
11688
|
currentProjectTitle: currentProject?.title
|
|
10930
11689
|
}
|
|
10931
11690
|
),
|
|
10932
|
-
/* @__PURE__ */
|
|
11691
|
+
/* @__PURE__ */ jsx21(
|
|
10933
11692
|
ProjectSettingsModal,
|
|
10934
11693
|
{
|
|
10935
11694
|
isOpen: projectSettingsOpen,
|
|
@@ -10941,7 +11700,7 @@ var ChatUIView = ({
|
|
|
10941
11700
|
onDeleteProject: deleteProject
|
|
10942
11701
|
}
|
|
10943
11702
|
),
|
|
10944
|
-
/* @__PURE__ */
|
|
11703
|
+
/* @__PURE__ */ jsx21(DisclaimerModal, { isOpen: disclaimerOpen, onClose: () => setDisclaimerOpen(false) })
|
|
10945
11704
|
]
|
|
10946
11705
|
}
|
|
10947
11706
|
);
|
|
@@ -11044,7 +11803,7 @@ var ChatUIWithHook = ({
|
|
|
11044
11803
|
onDeleteProjectFile
|
|
11045
11804
|
};
|
|
11046
11805
|
const state = useChatUI(hookOptions);
|
|
11047
|
-
return /* @__PURE__ */
|
|
11806
|
+
return /* @__PURE__ */ jsx21(
|
|
11048
11807
|
ChatUIView,
|
|
11049
11808
|
{
|
|
11050
11809
|
state,
|
|
@@ -11092,7 +11851,7 @@ var ChatUI = (props) => {
|
|
|
11092
11851
|
deepResearch,
|
|
11093
11852
|
suggestedPrompts: chatStateSuggestedPrompts
|
|
11094
11853
|
} = props;
|
|
11095
|
-
return /* @__PURE__ */
|
|
11854
|
+
return /* @__PURE__ */ jsx21(
|
|
11096
11855
|
ChatUIView,
|
|
11097
11856
|
{
|
|
11098
11857
|
state: props.chatState,
|
|
@@ -11117,11 +11876,11 @@ var ChatUI = (props) => {
|
|
|
11117
11876
|
}
|
|
11118
11877
|
);
|
|
11119
11878
|
}
|
|
11120
|
-
return /* @__PURE__ */
|
|
11879
|
+
return /* @__PURE__ */ jsx21(ChatUIWithHook, { ...props });
|
|
11121
11880
|
};
|
|
11122
11881
|
|
|
11123
11882
|
// src/react/hooks/useDeepResearch.ts
|
|
11124
|
-
import { useState as
|
|
11883
|
+
import { useState as useState19, useCallback as useCallback9, useRef as useRef9 } from "react";
|
|
11125
11884
|
var REPORT_GENERATION_PROMPT2 = `\uB2F9\uC2E0\uC740 \uB9AC\uC11C\uCE58 \uBCF4\uACE0\uC11C \uC791\uC131 \uC804\uBB38\uAC00\uC785\uB2C8\uB2E4.
|
|
11126
11885
|
|
|
11127
11886
|
<collected_sources>
|
|
@@ -11172,8 +11931,8 @@ var QUERY_ANALYSIS_PROMPT2 = `\uC0AC\uC6A9\uC790 \uC9C8\uBB38\uC744 \uBD84\uC11D
|
|
|
11172
11931
|
- JSON \uC678 \uB2E4\uB978 \uD14D\uC2A4\uD2B8 \uCD9C\uB825 \uAE08\uC9C0`;
|
|
11173
11932
|
var useDeepResearch = (options) => {
|
|
11174
11933
|
const { onWebSearch, onExtractContent, apiEndpoint, apiKey, model, provider } = options;
|
|
11175
|
-
const [isResearching, setIsResearching] =
|
|
11176
|
-
const [progress, setProgress] =
|
|
11934
|
+
const [isResearching, setIsResearching] = useState19(false);
|
|
11935
|
+
const [progress, setProgress] = useState19(null);
|
|
11177
11936
|
const abortControllerRef = useRef9(null);
|
|
11178
11937
|
const callLLM2 = useCallback9(
|
|
11179
11938
|
async (prompt, stream = false) => {
|
|
@@ -11435,7 +12194,7 @@ var useDeepResearch = (options) => {
|
|
|
11435
12194
|
};
|
|
11436
12195
|
|
|
11437
12196
|
// src/react/components/EmptyState.tsx
|
|
11438
|
-
import { jsx as
|
|
12197
|
+
import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
11439
12198
|
var EmptyState = ({
|
|
11440
12199
|
greeting,
|
|
11441
12200
|
templates = [],
|
|
@@ -11453,7 +12212,7 @@ var EmptyState = ({
|
|
|
11453
12212
|
return iconMap[icon] || "sparkling-line";
|
|
11454
12213
|
};
|
|
11455
12214
|
const hasContent = actions.length > 0 || templates.length > 0;
|
|
11456
|
-
return /* @__PURE__ */
|
|
12215
|
+
return /* @__PURE__ */ jsxs21(
|
|
11457
12216
|
"div",
|
|
11458
12217
|
{
|
|
11459
12218
|
className: "chatllm-empty-state",
|
|
@@ -11468,7 +12227,7 @@ var EmptyState = ({
|
|
|
11468
12227
|
textAlign: "center"
|
|
11469
12228
|
},
|
|
11470
12229
|
children: [
|
|
11471
|
-
/* @__PURE__ */
|
|
12230
|
+
/* @__PURE__ */ jsx22(
|
|
11472
12231
|
"div",
|
|
11473
12232
|
{
|
|
11474
12233
|
className: "chatllm-sheet",
|
|
@@ -11482,10 +12241,10 @@ var EmptyState = ({
|
|
|
11482
12241
|
marginBottom: "32px",
|
|
11483
12242
|
color: "var(--chatllm-primary)"
|
|
11484
12243
|
},
|
|
11485
|
-
children: /* @__PURE__ */
|
|
12244
|
+
children: /* @__PURE__ */ jsx22(IconSvg, { name: "chat-1-line", size: 40 })
|
|
11486
12245
|
}
|
|
11487
12246
|
),
|
|
11488
|
-
/* @__PURE__ */
|
|
12247
|
+
/* @__PURE__ */ jsx22(
|
|
11489
12248
|
"h1",
|
|
11490
12249
|
{
|
|
11491
12250
|
style: {
|
|
@@ -11498,7 +12257,7 @@ var EmptyState = ({
|
|
|
11498
12257
|
children: "How can I help you today?"
|
|
11499
12258
|
}
|
|
11500
12259
|
),
|
|
11501
|
-
(actions.length > 0 || templates.length > 0) && /* @__PURE__ */
|
|
12260
|
+
(actions.length > 0 || templates.length > 0) && /* @__PURE__ */ jsxs21(
|
|
11502
12261
|
"div",
|
|
11503
12262
|
{
|
|
11504
12263
|
style: {
|
|
@@ -11510,7 +12269,7 @@ var EmptyState = ({
|
|
|
11510
12269
|
marginBottom: "48px"
|
|
11511
12270
|
},
|
|
11512
12271
|
children: [
|
|
11513
|
-
actions.map((action) => /* @__PURE__ */
|
|
12272
|
+
actions.map((action) => /* @__PURE__ */ jsxs21(
|
|
11514
12273
|
"button",
|
|
11515
12274
|
{
|
|
11516
12275
|
onClick: () => onActionSelect?.(action),
|
|
@@ -11524,7 +12283,7 @@ var EmptyState = ({
|
|
|
11524
12283
|
fontWeight: 500
|
|
11525
12284
|
},
|
|
11526
12285
|
children: [
|
|
11527
|
-
/* @__PURE__ */
|
|
12286
|
+
/* @__PURE__ */ jsx22(
|
|
11528
12287
|
IconSvg,
|
|
11529
12288
|
{
|
|
11530
12289
|
name: getActionIcon(action.icon),
|
|
@@ -11537,7 +12296,7 @@ var EmptyState = ({
|
|
|
11537
12296
|
},
|
|
11538
12297
|
action.id
|
|
11539
12298
|
)),
|
|
11540
|
-
templates.slice(0, 4).map((template) => /* @__PURE__ */
|
|
12299
|
+
templates.slice(0, 4).map((template) => /* @__PURE__ */ jsxs21(
|
|
11541
12300
|
"button",
|
|
11542
12301
|
{
|
|
11543
12302
|
onClick: () => onTemplateClick(template),
|
|
@@ -11551,7 +12310,7 @@ var EmptyState = ({
|
|
|
11551
12310
|
fontWeight: 500
|
|
11552
12311
|
},
|
|
11553
12312
|
children: [
|
|
11554
|
-
/* @__PURE__ */
|
|
12313
|
+
/* @__PURE__ */ jsx22(
|
|
11555
12314
|
IconSvg,
|
|
11556
12315
|
{
|
|
11557
12316
|
name: "sparkling-line",
|
|
@@ -11573,8 +12332,8 @@ var EmptyState = ({
|
|
|
11573
12332
|
};
|
|
11574
12333
|
|
|
11575
12334
|
// src/react/components/MemoryPanel.tsx
|
|
11576
|
-
import { useState as
|
|
11577
|
-
import { jsx as
|
|
12335
|
+
import { useState as useState20 } from "react";
|
|
12336
|
+
import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
11578
12337
|
var categoryLabels = {
|
|
11579
12338
|
fact: "\uC0AC\uC6A9\uC790 \uC815\uBCF4",
|
|
11580
12339
|
skill: "\uC804\uBB38 \uBD84\uC57C/\uAE30\uC220",
|
|
@@ -11593,8 +12352,8 @@ var MemoryPanel = ({
|
|
|
11593
12352
|
isOpen,
|
|
11594
12353
|
onToggle
|
|
11595
12354
|
}) => {
|
|
11596
|
-
const [expandedId, setExpandedId] =
|
|
11597
|
-
const [activeTab, setActiveTab] =
|
|
12355
|
+
const [expandedId, setExpandedId] = useState20(null);
|
|
12356
|
+
const [activeTab, setActiveTab] = useState20("all");
|
|
11598
12357
|
const filteredItems = activeTab === "all" ? items : items.filter((item) => item.category === activeTab);
|
|
11599
12358
|
const formatDate = (timestamp) => {
|
|
11600
12359
|
const date = new Date(timestamp);
|
|
@@ -11606,7 +12365,7 @@ var MemoryPanel = ({
|
|
|
11606
12365
|
});
|
|
11607
12366
|
};
|
|
11608
12367
|
if (!isOpen) {
|
|
11609
|
-
return /* @__PURE__ */
|
|
12368
|
+
return /* @__PURE__ */ jsx23(
|
|
11610
12369
|
"button",
|
|
11611
12370
|
{
|
|
11612
12371
|
onClick: onToggle,
|
|
@@ -11626,11 +12385,11 @@ var MemoryPanel = ({
|
|
|
11626
12385
|
justifyContent: "center",
|
|
11627
12386
|
zIndex: 100
|
|
11628
12387
|
},
|
|
11629
|
-
children: /* @__PURE__ */
|
|
12388
|
+
children: /* @__PURE__ */ jsx23(IconSvg, { name: "robot-line", size: 24, color: "#ffffff" })
|
|
11630
12389
|
}
|
|
11631
12390
|
);
|
|
11632
12391
|
}
|
|
11633
|
-
return /* @__PURE__ */
|
|
12392
|
+
return /* @__PURE__ */ jsxs22(
|
|
11634
12393
|
"div",
|
|
11635
12394
|
{
|
|
11636
12395
|
className: "chatllm-memory-panel",
|
|
@@ -11650,7 +12409,7 @@ var MemoryPanel = ({
|
|
|
11650
12409
|
zIndex: 100
|
|
11651
12410
|
},
|
|
11652
12411
|
children: [
|
|
11653
|
-
/* @__PURE__ */
|
|
12412
|
+
/* @__PURE__ */ jsxs22(
|
|
11654
12413
|
"div",
|
|
11655
12414
|
{
|
|
11656
12415
|
style: {
|
|
@@ -11661,8 +12420,8 @@ var MemoryPanel = ({
|
|
|
11661
12420
|
borderBottom: "1px solid var(--chatllm-border, #e5e7eb)"
|
|
11662
12421
|
},
|
|
11663
12422
|
children: [
|
|
11664
|
-
/* @__PURE__ */
|
|
11665
|
-
/* @__PURE__ */
|
|
12423
|
+
/* @__PURE__ */ jsxs22("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [
|
|
12424
|
+
/* @__PURE__ */ jsx23(
|
|
11666
12425
|
"div",
|
|
11667
12426
|
{
|
|
11668
12427
|
style: {
|
|
@@ -11674,19 +12433,19 @@ var MemoryPanel = ({
|
|
|
11674
12433
|
alignItems: "center",
|
|
11675
12434
|
justifyContent: "center"
|
|
11676
12435
|
},
|
|
11677
|
-
children: /* @__PURE__ */
|
|
12436
|
+
children: /* @__PURE__ */ jsx23(IconSvg, { name: "robot-line", size: 18, color: "var(--chatllm-primary, #3584FA)" })
|
|
11678
12437
|
}
|
|
11679
12438
|
),
|
|
11680
|
-
/* @__PURE__ */
|
|
11681
|
-
/* @__PURE__ */
|
|
11682
|
-
/* @__PURE__ */
|
|
12439
|
+
/* @__PURE__ */ jsxs22("div", { children: [
|
|
12440
|
+
/* @__PURE__ */ jsx23("div", { style: { fontSize: "15px", fontWeight: 600, color: "var(--chatllm-text, #1f2937)" }, children: "AI \uBA54\uBAA8\uB9AC" }),
|
|
12441
|
+
/* @__PURE__ */ jsxs22("div", { style: { fontSize: "12px", color: "var(--chatllm-text-muted, #9ca3af)" }, children: [
|
|
11683
12442
|
items.length,
|
|
11684
12443
|
"\uAC1C \uD56D\uBAA9"
|
|
11685
12444
|
] })
|
|
11686
12445
|
] })
|
|
11687
12446
|
] }),
|
|
11688
|
-
/* @__PURE__ */
|
|
11689
|
-
onClearAll && items.length > 0 && /* @__PURE__ */
|
|
12447
|
+
/* @__PURE__ */ jsxs22("div", { style: { display: "flex", gap: "4px" }, children: [
|
|
12448
|
+
onClearAll && items.length > 0 && /* @__PURE__ */ jsx23(
|
|
11690
12449
|
"button",
|
|
11691
12450
|
{
|
|
11692
12451
|
onClick: onClearAll,
|
|
@@ -11698,10 +12457,10 @@ var MemoryPanel = ({
|
|
|
11698
12457
|
cursor: "pointer"
|
|
11699
12458
|
},
|
|
11700
12459
|
title: "\uC804\uCCB4 \uC0AD\uC81C",
|
|
11701
|
-
children: /* @__PURE__ */
|
|
12460
|
+
children: /* @__PURE__ */ jsx23(IconSvg, { name: "delete-bin-line", size: 18, color: "var(--chatllm-text-muted, #9ca3af)" })
|
|
11702
12461
|
}
|
|
11703
12462
|
),
|
|
11704
|
-
/* @__PURE__ */
|
|
12463
|
+
/* @__PURE__ */ jsx23(
|
|
11705
12464
|
"button",
|
|
11706
12465
|
{
|
|
11707
12466
|
onClick: onToggle,
|
|
@@ -11712,14 +12471,14 @@ var MemoryPanel = ({
|
|
|
11712
12471
|
borderRadius: "8px",
|
|
11713
12472
|
cursor: "pointer"
|
|
11714
12473
|
},
|
|
11715
|
-
children: /* @__PURE__ */
|
|
12474
|
+
children: /* @__PURE__ */ jsx23(IconSvg, { name: "close-line", size: 18, color: "var(--chatllm-text-muted, #9ca3af)" })
|
|
11716
12475
|
}
|
|
11717
12476
|
)
|
|
11718
12477
|
] })
|
|
11719
12478
|
]
|
|
11720
12479
|
}
|
|
11721
12480
|
),
|
|
11722
|
-
/* @__PURE__ */
|
|
12481
|
+
/* @__PURE__ */ jsx23(
|
|
11723
12482
|
"div",
|
|
11724
12483
|
{
|
|
11725
12484
|
style: {
|
|
@@ -11729,7 +12488,7 @@ var MemoryPanel = ({
|
|
|
11729
12488
|
borderBottom: "1px solid var(--chatllm-border-light, #f3f4f6)",
|
|
11730
12489
|
overflowX: "auto"
|
|
11731
12490
|
},
|
|
11732
|
-
children: ["all", "fact", "skill", "preference"].map((tab) => /* @__PURE__ */
|
|
12491
|
+
children: ["all", "fact", "skill", "preference"].map((tab) => /* @__PURE__ */ jsx23(
|
|
11733
12492
|
"button",
|
|
11734
12493
|
{
|
|
11735
12494
|
onClick: () => setActiveTab(tab),
|
|
@@ -11750,8 +12509,8 @@ var MemoryPanel = ({
|
|
|
11750
12509
|
))
|
|
11751
12510
|
}
|
|
11752
12511
|
),
|
|
11753
|
-
/* @__PURE__ */
|
|
11754
|
-
contextSummary && activeTab === "all" && /* @__PURE__ */
|
|
12512
|
+
/* @__PURE__ */ jsxs22("div", { style: { flex: 1, overflow: "auto", padding: "12px" }, children: [
|
|
12513
|
+
contextSummary && activeTab === "all" && /* @__PURE__ */ jsxs22(
|
|
11755
12514
|
"div",
|
|
11756
12515
|
{
|
|
11757
12516
|
style: {
|
|
@@ -11762,7 +12521,7 @@ var MemoryPanel = ({
|
|
|
11762
12521
|
borderLeft: "3px solid var(--chatllm-primary, #3584FA)"
|
|
11763
12522
|
},
|
|
11764
12523
|
children: [
|
|
11765
|
-
/* @__PURE__ */
|
|
12524
|
+
/* @__PURE__ */ jsxs22(
|
|
11766
12525
|
"div",
|
|
11767
12526
|
{
|
|
11768
12527
|
style: {
|
|
@@ -11772,12 +12531,12 @@ var MemoryPanel = ({
|
|
|
11772
12531
|
marginBottom: "8px"
|
|
11773
12532
|
},
|
|
11774
12533
|
children: [
|
|
11775
|
-
/* @__PURE__ */
|
|
11776
|
-
/* @__PURE__ */
|
|
12534
|
+
/* @__PURE__ */ jsx23(IconSvg, { name: "file-text-line", size: 14, color: "var(--chatllm-primary, #3584FA)" }),
|
|
12535
|
+
/* @__PURE__ */ jsx23("span", { style: { fontSize: "12px", fontWeight: 500, color: "var(--chatllm-primary, #3584FA)" }, children: "\uB300\uD654 \uC694\uC57D" })
|
|
11777
12536
|
]
|
|
11778
12537
|
}
|
|
11779
12538
|
),
|
|
11780
|
-
/* @__PURE__ */
|
|
12539
|
+
/* @__PURE__ */ jsx23(
|
|
11781
12540
|
"p",
|
|
11782
12541
|
{
|
|
11783
12542
|
style: {
|
|
@@ -11792,7 +12551,7 @@ var MemoryPanel = ({
|
|
|
11792
12551
|
]
|
|
11793
12552
|
}
|
|
11794
12553
|
),
|
|
11795
|
-
filteredItems.length === 0 ? /* @__PURE__ */
|
|
12554
|
+
filteredItems.length === 0 ? /* @__PURE__ */ jsxs22(
|
|
11796
12555
|
"div",
|
|
11797
12556
|
{
|
|
11798
12557
|
style: {
|
|
@@ -11801,11 +12560,11 @@ var MemoryPanel = ({
|
|
|
11801
12560
|
color: "var(--chatllm-text-muted, #9ca3af)"
|
|
11802
12561
|
},
|
|
11803
12562
|
children: [
|
|
11804
|
-
/* @__PURE__ */
|
|
11805
|
-
/* @__PURE__ */
|
|
12563
|
+
/* @__PURE__ */ jsx23(IconSvg, { name: "robot-line", size: 32, color: "var(--chatllm-text-muted, #d1d5db)" }),
|
|
12564
|
+
/* @__PURE__ */ jsx23("p", { style: { fontSize: "14px", marginTop: "12px" }, children: "\uC800\uC7A5\uB41C \uBA54\uBAA8\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4" })
|
|
11806
12565
|
]
|
|
11807
12566
|
}
|
|
11808
|
-
) : /* @__PURE__ */
|
|
12567
|
+
) : /* @__PURE__ */ jsx23("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: filteredItems.map((item) => /* @__PURE__ */ jsxs22(
|
|
11809
12568
|
"div",
|
|
11810
12569
|
{
|
|
11811
12570
|
style: {
|
|
@@ -11818,10 +12577,10 @@ var MemoryPanel = ({
|
|
|
11818
12577
|
},
|
|
11819
12578
|
onClick: () => setExpandedId(expandedId === item.id ? null : item.id),
|
|
11820
12579
|
children: [
|
|
11821
|
-
/* @__PURE__ */
|
|
11822
|
-
/* @__PURE__ */
|
|
11823
|
-
/* @__PURE__ */
|
|
11824
|
-
item.category && /* @__PURE__ */
|
|
12580
|
+
/* @__PURE__ */ jsxs22("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between" }, children: [
|
|
12581
|
+
/* @__PURE__ */ jsxs22("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
12582
|
+
/* @__PURE__ */ jsxs22("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [
|
|
12583
|
+
item.category && /* @__PURE__ */ jsx23(
|
|
11825
12584
|
"span",
|
|
11826
12585
|
{
|
|
11827
12586
|
style: {
|
|
@@ -11835,9 +12594,9 @@ var MemoryPanel = ({
|
|
|
11835
12594
|
children: categoryLabels[item.category]
|
|
11836
12595
|
}
|
|
11837
12596
|
),
|
|
11838
|
-
/* @__PURE__ */
|
|
12597
|
+
/* @__PURE__ */ jsx23("span", { style: { fontSize: "11px", color: "var(--chatllm-text-muted, #9ca3af)" }, children: formatDate(item.timestamp) })
|
|
11839
12598
|
] }),
|
|
11840
|
-
/* @__PURE__ */
|
|
12599
|
+
/* @__PURE__ */ jsx23(
|
|
11841
12600
|
"div",
|
|
11842
12601
|
{
|
|
11843
12602
|
style: {
|
|
@@ -11849,8 +12608,8 @@ var MemoryPanel = ({
|
|
|
11849
12608
|
}
|
|
11850
12609
|
)
|
|
11851
12610
|
] }),
|
|
11852
|
-
/* @__PURE__ */
|
|
11853
|
-
onDelete && /* @__PURE__ */
|
|
12611
|
+
/* @__PURE__ */ jsxs22("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
12612
|
+
onDelete && /* @__PURE__ */ jsx23(
|
|
11854
12613
|
"button",
|
|
11855
12614
|
{
|
|
11856
12615
|
onClick: (e) => {
|
|
@@ -11865,10 +12624,10 @@ var MemoryPanel = ({
|
|
|
11865
12624
|
cursor: "pointer",
|
|
11866
12625
|
opacity: 0.5
|
|
11867
12626
|
},
|
|
11868
|
-
children: /* @__PURE__ */
|
|
12627
|
+
children: /* @__PURE__ */ jsx23(IconSvg, { name: "delete-bin-line", size: 14, color: "var(--chatllm-text-muted, #9ca3af)" })
|
|
11869
12628
|
}
|
|
11870
12629
|
),
|
|
11871
|
-
/* @__PURE__ */
|
|
12630
|
+
/* @__PURE__ */ jsx23(
|
|
11872
12631
|
IconSvg,
|
|
11873
12632
|
{
|
|
11874
12633
|
name: expandedId === item.id ? "arrow-up-s-line" : "arrow-down-s-line",
|
|
@@ -11878,7 +12637,7 @@ var MemoryPanel = ({
|
|
|
11878
12637
|
)
|
|
11879
12638
|
] })
|
|
11880
12639
|
] }),
|
|
11881
|
-
expandedId === item.id && /* @__PURE__ */
|
|
12640
|
+
expandedId === item.id && /* @__PURE__ */ jsx23(
|
|
11882
12641
|
"div",
|
|
11883
12642
|
{
|
|
11884
12643
|
style: {
|
|
@@ -11886,7 +12645,7 @@ var MemoryPanel = ({
|
|
|
11886
12645
|
paddingTop: "12px",
|
|
11887
12646
|
borderTop: "1px solid var(--chatllm-border-light, #f3f4f6)"
|
|
11888
12647
|
},
|
|
11889
|
-
children: /* @__PURE__ */
|
|
12648
|
+
children: /* @__PURE__ */ jsx23(
|
|
11890
12649
|
"p",
|
|
11891
12650
|
{
|
|
11892
12651
|
style: {
|
|
@@ -11915,6 +12674,7 @@ export {
|
|
|
11915
12674
|
ChatInput,
|
|
11916
12675
|
ChatSidebar,
|
|
11917
12676
|
ChatUI,
|
|
12677
|
+
ChecklistCard,
|
|
11918
12678
|
ContentPartRenderer,
|
|
11919
12679
|
DEFAULT_PROJECT_ID,
|
|
11920
12680
|
DEFAULT_PROJECT_TITLE,
|