@yr-kits/dev-copilot 0.1.1 → 0.1.2
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/app/index.d.mts +2 -0
- package/dist/app/index.mjs +4 -0
- package/dist/bin/bridge.mjs +4 -916
- package/dist/bin/bridge.mjs.map +1 -1
- package/dist/bin/dev-copilot.mjs +13 -3
- package/dist/bin/dev-copilot.mjs.map +1 -1
- package/dist/bridge/app/index.d.mts +24 -0
- package/dist/bridge/app/index.d.mts.map +1 -0
- package/dist/bridge/app/index.mjs +3 -0
- package/dist/{types/index.d.mts → copilot-D8--qKgC.d.mts} +3 -3
- package/dist/copilot-D8--qKgC.d.mts.map +1 -0
- package/dist/copilot-overlay-ClRoIHew.mjs +1129 -0
- package/dist/copilot-overlay-ClRoIHew.mjs.map +1 -0
- package/dist/copilot-overlay-NlUgrMjy.d.mts +7 -0
- package/dist/copilot-overlay-NlUgrMjy.d.mts.map +1 -0
- package/dist/dev-copilot-context-CA9bqV_U.mjs +35 -0
- package/dist/dev-copilot-context-CA9bqV_U.mjs.map +1 -0
- package/dist/dev-copilot-provider-CP_gJvWG.d.mts +22 -0
- package/dist/dev-copilot-provider-CP_gJvWG.d.mts.map +1 -0
- package/dist/dev-copilot-provider-D0_wEEem.mjs +14 -0
- package/dist/dev-copilot-provider-D0_wEEem.mjs.map +1 -0
- package/dist/index.d.mts +5 -33
- package/dist/index.mjs +6 -863
- package/dist/run-bridge-cli-DVLGcVgq.mjs +1510 -0
- package/dist/run-bridge-cli-DVLGcVgq.mjs.map +1 -0
- package/dist/types.d.mts +2 -0
- package/dist/widgets/copilot-overlay/index.d.mts +2 -0
- package/dist/widgets/copilot-overlay/index.mjs +4 -0
- package/package.json +25 -7
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/types/index.d.mts.map +0 -1
- /package/dist/{types/index.mjs → types.mjs} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,864 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import "./dev-copilot-context-CA9bqV_U.mjs";
|
|
2
|
+
import { t as DevCopilotProvider } from "./dev-copilot-provider-D0_wEEem.mjs";
|
|
3
|
+
import "./app/index.mjs";
|
|
4
|
+
import { t as CopilotOverlayWidget } from "./copilot-overlay-ClRoIHew.mjs";
|
|
5
|
+
import "./widgets/copilot-overlay/index.mjs";
|
|
3
6
|
|
|
4
|
-
|
|
5
|
-
const defaultConfig = {
|
|
6
|
-
enabled: process.env.NODE_ENV === "development",
|
|
7
|
-
allowedPaths: ["."]
|
|
8
|
-
};
|
|
9
|
-
const resolveDevCopilotConfig = (config) => {
|
|
10
|
-
const nextConfig = config ?? {};
|
|
11
|
-
return {
|
|
12
|
-
...defaultConfig,
|
|
13
|
-
...nextConfig
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/components/dev-copilot-provider.tsx
|
|
19
|
-
const DevCopilotContext = createContext(null);
|
|
20
|
-
function DevCopilotProvider({ config, children }) {
|
|
21
|
-
const resolvedConfig = resolveDevCopilotConfig(config);
|
|
22
|
-
return /* @__PURE__ */ jsx(DevCopilotContext.Provider, {
|
|
23
|
-
value: resolvedConfig,
|
|
24
|
-
children
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
const useDevCopilotConfig = () => {
|
|
28
|
-
const context = useContext(DevCopilotContext);
|
|
29
|
-
if (!context) throw new Error("DevCopilotProvider 내부에서만 사용할 수 있습니다.");
|
|
30
|
-
return context;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
//#endregion
|
|
34
|
-
//#region src/lib/api-client.ts
|
|
35
|
-
const API_BASE_URL = "http://127.0.0.1:3339";
|
|
36
|
-
const BRIDGE_CONNECTION_ERROR_MESSAGE = "브릿지 서버에 연결하지 못했습니다. 브릿지 서버를 켜주세요.";
|
|
37
|
-
const parseResponse = async (response) => {
|
|
38
|
-
const payload = await response.json();
|
|
39
|
-
if (!response.ok) {
|
|
40
|
-
const errorMessage = typeof payload === "object" && payload && "error" in payload ? payload.error : "요청 처리 중 오류가 발생했습니다.";
|
|
41
|
-
throw new Error(errorMessage);
|
|
42
|
-
}
|
|
43
|
-
return payload;
|
|
44
|
-
};
|
|
45
|
-
const normalizeNetworkError = (error) => {
|
|
46
|
-
if (error instanceof TypeError && error.message.toLowerCase().includes("failed to fetch")) return new Error(BRIDGE_CONNECTION_ERROR_MESSAGE);
|
|
47
|
-
if (error instanceof Error) return error;
|
|
48
|
-
return /* @__PURE__ */ new Error("요청 처리 중 오류가 발생했습니다.");
|
|
49
|
-
};
|
|
50
|
-
const createCopilotApiClient = () => {
|
|
51
|
-
const post = async (path, body) => {
|
|
52
|
-
try {
|
|
53
|
-
return parseResponse(await fetch(`${API_BASE_URL}${path}`, {
|
|
54
|
-
method: "POST",
|
|
55
|
-
headers: { "Content-Type": "application/json" },
|
|
56
|
-
body: JSON.stringify(body)
|
|
57
|
-
}));
|
|
58
|
-
} catch (error) {
|
|
59
|
-
throw normalizeNetworkError(error);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
return {
|
|
63
|
-
status: async (agent) => {
|
|
64
|
-
const query = agent ? `?agent=${agent}` : "";
|
|
65
|
-
try {
|
|
66
|
-
return parseResponse(await fetch(`${API_BASE_URL}/status${query}`));
|
|
67
|
-
} catch (error) {
|
|
68
|
-
throw normalizeNetworkError(error);
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
chat: (payload) => post("/chat", payload),
|
|
72
|
-
apply: (payload) => post("/apply", payload)
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
//#endregion
|
|
77
|
-
//#region src/hooks/use-selection-capture.ts
|
|
78
|
-
const OVERLAY_ATTRIBUTE = "data-dev-copilot-overlay";
|
|
79
|
-
const toSelectionText = () => {
|
|
80
|
-
return window.getSelection()?.toString().trim() ?? "";
|
|
81
|
-
};
|
|
82
|
-
const isNodeInsideOverlay = (node) => {
|
|
83
|
-
if (!node) return false;
|
|
84
|
-
const element = node instanceof Element ? node : node.parentElement;
|
|
85
|
-
return Boolean(element?.closest(`[${OVERLAY_ATTRIBUTE}]`));
|
|
86
|
-
};
|
|
87
|
-
const isInsideOverlay = (target) => {
|
|
88
|
-
return target instanceof Element && Boolean(target.closest(`[${OVERLAY_ATTRIBUTE}]`));
|
|
89
|
-
};
|
|
90
|
-
const useSelectionCapture = () => {
|
|
91
|
-
const [selectedText, setSelectedText] = useState("");
|
|
92
|
-
const syncSelection = useCallback((event) => {
|
|
93
|
-
const selection = window.getSelection();
|
|
94
|
-
const startedInsideOverlay = isNodeInsideOverlay(selection?.anchorNode ?? null);
|
|
95
|
-
const endedInsideOverlay = isNodeInsideOverlay(selection?.focusNode ?? null);
|
|
96
|
-
if (isInsideOverlay(event.target) || startedInsideOverlay || endedInsideOverlay) return;
|
|
97
|
-
const nextSelectedText = selection?.toString().trim() ?? toSelectionText();
|
|
98
|
-
if (!nextSelectedText) return;
|
|
99
|
-
setSelectedText(nextSelectedText);
|
|
100
|
-
}, []);
|
|
101
|
-
useEffect(() => {
|
|
102
|
-
document.addEventListener("mouseup", syncSelection);
|
|
103
|
-
document.addEventListener("keyup", syncSelection);
|
|
104
|
-
return () => {
|
|
105
|
-
document.removeEventListener("mouseup", syncSelection);
|
|
106
|
-
document.removeEventListener("keyup", syncSelection);
|
|
107
|
-
};
|
|
108
|
-
}, [syncSelection]);
|
|
109
|
-
return {
|
|
110
|
-
selectedText,
|
|
111
|
-
setSelectedText,
|
|
112
|
-
clearSelection: () => setSelectedText("")
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
//#endregion
|
|
117
|
-
//#region src/components/icons.tsx
|
|
118
|
-
const SparklesIcon = (props) => {
|
|
119
|
-
return /* @__PURE__ */ jsxs("svg", {
|
|
120
|
-
viewBox: "0 0 24 24",
|
|
121
|
-
fill: "none",
|
|
122
|
-
stroke: "currentColor",
|
|
123
|
-
strokeWidth: "1.8",
|
|
124
|
-
strokeLinecap: "round",
|
|
125
|
-
strokeLinejoin: "round",
|
|
126
|
-
...props,
|
|
127
|
-
children: [
|
|
128
|
-
/* @__PURE__ */ jsx("path", { d: "M12 3.75 13.68 8.32 18.25 10 13.68 11.68 12 16.25 10.32 11.68 5.75 10 10.32 8.32 12 3.75Z" }),
|
|
129
|
-
/* @__PURE__ */ jsx("path", { d: "M18.5 3.75 19.08 5.42 20.75 6 19.08 6.58 18.5 8.25 17.92 6.58 16.25 6 17.92 5.42 18.5 3.75Z" }),
|
|
130
|
-
/* @__PURE__ */ jsx("path", { d: "M6 15.5 7 18.25 9.75 19.25 7 20.25 6 23 5 20.25 2.25 19.25 5 18.25 6 15.5Z" })
|
|
131
|
-
]
|
|
132
|
-
});
|
|
133
|
-
};
|
|
134
|
-
const PanelRightOpenIcon = (props) => {
|
|
135
|
-
return /* @__PURE__ */ jsxs("svg", {
|
|
136
|
-
viewBox: "0 0 24 24",
|
|
137
|
-
fill: "none",
|
|
138
|
-
stroke: "currentColor",
|
|
139
|
-
strokeWidth: "1.8",
|
|
140
|
-
strokeLinecap: "round",
|
|
141
|
-
strokeLinejoin: "round",
|
|
142
|
-
...props,
|
|
143
|
-
children: [
|
|
144
|
-
/* @__PURE__ */ jsx("rect", {
|
|
145
|
-
x: "3.75",
|
|
146
|
-
y: "4.75",
|
|
147
|
-
width: "16.5",
|
|
148
|
-
height: "14.5",
|
|
149
|
-
rx: "2.25"
|
|
150
|
-
}),
|
|
151
|
-
/* @__PURE__ */ jsx("path", { d: "M8.75 4.75v14.5" }),
|
|
152
|
-
/* @__PURE__ */ jsx("path", { d: "m13 9.25 3 2.75-3 2.75" })
|
|
153
|
-
]
|
|
154
|
-
});
|
|
155
|
-
};
|
|
156
|
-
const PanelRightCloseIcon = (props) => {
|
|
157
|
-
return /* @__PURE__ */ jsxs("svg", {
|
|
158
|
-
viewBox: "0 0 24 24",
|
|
159
|
-
fill: "none",
|
|
160
|
-
stroke: "currentColor",
|
|
161
|
-
strokeWidth: "1.8",
|
|
162
|
-
strokeLinecap: "round",
|
|
163
|
-
strokeLinejoin: "round",
|
|
164
|
-
...props,
|
|
165
|
-
children: [
|
|
166
|
-
/* @__PURE__ */ jsx("rect", {
|
|
167
|
-
x: "3.75",
|
|
168
|
-
y: "4.75",
|
|
169
|
-
width: "16.5",
|
|
170
|
-
height: "14.5",
|
|
171
|
-
rx: "2.25"
|
|
172
|
-
}),
|
|
173
|
-
/* @__PURE__ */ jsx("path", { d: "M15.25 4.75v14.5" }),
|
|
174
|
-
/* @__PURE__ */ jsx("path", { d: "m11 9.25-3 2.75 3 2.75" })
|
|
175
|
-
]
|
|
176
|
-
});
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
//#endregion
|
|
180
|
-
//#region src/components/dev-copilot-overlay.tsx
|
|
181
|
-
const FLOATING_BUTTON_SIZE = 48;
|
|
182
|
-
const DRAG_CLICK_THRESHOLD = 4;
|
|
183
|
-
const PANEL_WIDTH = "min(1028px, calc(100vw - 48px))";
|
|
184
|
-
const INPUT_PANEL_WIDTH = 420;
|
|
185
|
-
const RAIL_WIDTH = 36;
|
|
186
|
-
const AGENT_LABELS = {
|
|
187
|
-
codex: "Codex CLI",
|
|
188
|
-
claude: "Claude Code CLI"
|
|
189
|
-
};
|
|
190
|
-
const UI_LABELS = {
|
|
191
|
-
title: "Dev Copilot",
|
|
192
|
-
subtitle: "텍스트를 선택한 뒤 프롬프트를 입력하세요.",
|
|
193
|
-
promptPlaceholder: "무엇을 도와드릴까요?",
|
|
194
|
-
askButton: "질문",
|
|
195
|
-
editButton: "코드 수정 제안",
|
|
196
|
-
applyButton: "미리보기 적용"
|
|
197
|
-
};
|
|
198
|
-
const styleText = `
|
|
199
|
-
.yrdc-trigger{transition:transform 150ms ease-out, box-shadow 150ms ease-out}
|
|
200
|
-
.yrdc-trigger:hover{transform:scale(1.05)}
|
|
201
|
-
.yrdc-pressable{transition:transform 150ms ease-out, background-color 150ms ease-out, opacity 150ms ease-out}
|
|
202
|
-
.yrdc-pressable:hover{transform:translateY(-1px)}
|
|
203
|
-
.yrdc-spinner{animation:yrdc-spin 1s linear infinite}
|
|
204
|
-
.yrdc-field:focus{outline:none;box-shadow:0 0 0 3px rgba(59,130,246,.14);border-color:#93c5fd}
|
|
205
|
-
@keyframes yrdc-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
|
|
206
|
-
`;
|
|
207
|
-
function DevCopilotOverlay() {
|
|
208
|
-
const config = useDevCopilotConfig();
|
|
209
|
-
const apiClient = useMemo(() => createCopilotApiClient(), []);
|
|
210
|
-
const { selectedText, setSelectedText } = useSelectionCapture();
|
|
211
|
-
const [open, setOpen] = useState(false);
|
|
212
|
-
const [prompt, setPrompt] = useState("");
|
|
213
|
-
const [busy, setBusy] = useState(false);
|
|
214
|
-
const [error, setError] = useState(null);
|
|
215
|
-
const [chatResult, setChatResult] = useState(null);
|
|
216
|
-
const [toastMessage, setToastMessage] = useState(null);
|
|
217
|
-
const [agentStatus, setAgentStatus] = useState(null);
|
|
218
|
-
const [selectedAgent, setSelectedAgent] = useState("codex");
|
|
219
|
-
const [position, setPosition] = useState(null);
|
|
220
|
-
const [showResponsePanel, setShowResponsePanel] = useState(false);
|
|
221
|
-
const containerRef = useRef(null);
|
|
222
|
-
const suppressMainToggleClickRef = useRef(false);
|
|
223
|
-
const dragStateRef = useRef(null);
|
|
224
|
-
useEffect(() => {
|
|
225
|
-
const onResize = () => {
|
|
226
|
-
setPosition((prev) => {
|
|
227
|
-
if (!prev) return prev;
|
|
228
|
-
return {
|
|
229
|
-
x: Math.min(Math.max(prev.x, 0), Math.max(0, window.innerWidth - FLOATING_BUTTON_SIZE)),
|
|
230
|
-
y: Math.min(Math.max(prev.y, 0), Math.max(0, window.innerHeight - FLOATING_BUTTON_SIZE))
|
|
231
|
-
};
|
|
232
|
-
});
|
|
233
|
-
};
|
|
234
|
-
window.addEventListener("resize", onResize);
|
|
235
|
-
return () => window.removeEventListener("resize", onResize);
|
|
236
|
-
}, []);
|
|
237
|
-
useEffect(() => {
|
|
238
|
-
if (!open) return;
|
|
239
|
-
let ignore = false;
|
|
240
|
-
apiClient.status(selectedAgent).then((status) => {
|
|
241
|
-
if (!ignore) setAgentStatus(status);
|
|
242
|
-
}).catch((caughtError) => {
|
|
243
|
-
if (!ignore) setAgentStatus({
|
|
244
|
-
available: false,
|
|
245
|
-
authenticated: false,
|
|
246
|
-
agent: selectedAgent,
|
|
247
|
-
message: caughtError instanceof Error ? caughtError.message : "로컬 에이전트 상태 확인에 실패했습니다."
|
|
248
|
-
});
|
|
249
|
-
});
|
|
250
|
-
return () => {
|
|
251
|
-
ignore = true;
|
|
252
|
-
};
|
|
253
|
-
}, [
|
|
254
|
-
apiClient,
|
|
255
|
-
open,
|
|
256
|
-
selectedAgent
|
|
257
|
-
]);
|
|
258
|
-
useEffect(() => {
|
|
259
|
-
if (!open) return;
|
|
260
|
-
const onPointerDownOutside = (event) => {
|
|
261
|
-
const target = event.target;
|
|
262
|
-
if (!(target instanceof Node)) return;
|
|
263
|
-
if (containerRef.current?.contains(target)) return;
|
|
264
|
-
setOpen(false);
|
|
265
|
-
setShowResponsePanel(false);
|
|
266
|
-
dragStateRef.current = null;
|
|
267
|
-
suppressMainToggleClickRef.current = false;
|
|
268
|
-
};
|
|
269
|
-
document.addEventListener("pointerdown", onPointerDownOutside);
|
|
270
|
-
return () => {
|
|
271
|
-
document.removeEventListener("pointerdown", onPointerDownOutside);
|
|
272
|
-
};
|
|
273
|
-
}, [open]);
|
|
274
|
-
if (!config.enabled) return null;
|
|
275
|
-
const onPointerDown = (event) => {
|
|
276
|
-
if (event.button !== 0) return;
|
|
277
|
-
const wrapperRect = containerRef.current?.getBoundingClientRect();
|
|
278
|
-
const originX = position?.x ?? wrapperRect?.left ?? 0;
|
|
279
|
-
const originY = position?.y ?? wrapperRect?.top ?? 0;
|
|
280
|
-
event.currentTarget.setPointerCapture(event.pointerId);
|
|
281
|
-
dragStateRef.current = {
|
|
282
|
-
pointerId: event.pointerId,
|
|
283
|
-
startX: event.clientX,
|
|
284
|
-
startY: event.clientY,
|
|
285
|
-
originX,
|
|
286
|
-
originY,
|
|
287
|
-
moved: false
|
|
288
|
-
};
|
|
289
|
-
};
|
|
290
|
-
const onPointerMove = (event) => {
|
|
291
|
-
const dragState = dragStateRef.current;
|
|
292
|
-
if (!dragState || dragState.pointerId !== event.pointerId) return;
|
|
293
|
-
const deltaX = event.clientX - dragState.startX;
|
|
294
|
-
const deltaY = event.clientY - dragState.startY;
|
|
295
|
-
if (!(Math.abs(deltaX) > DRAG_CLICK_THRESHOLD || Math.abs(deltaY) > DRAG_CLICK_THRESHOLD) && !dragState.moved) return;
|
|
296
|
-
dragState.moved = true;
|
|
297
|
-
setPosition({
|
|
298
|
-
x: Math.min(Math.max(dragState.originX + deltaX, 0), Math.max(0, window.innerWidth - FLOATING_BUTTON_SIZE)),
|
|
299
|
-
y: Math.min(Math.max(dragState.originY + deltaY, 0), Math.max(0, window.innerHeight - FLOATING_BUTTON_SIZE))
|
|
300
|
-
});
|
|
301
|
-
};
|
|
302
|
-
const onPointerEnd = (event) => {
|
|
303
|
-
if (dragStateRef.current?.pointerId !== event.pointerId) return;
|
|
304
|
-
suppressMainToggleClickRef.current = dragStateRef.current.moved;
|
|
305
|
-
dragStateRef.current = null;
|
|
306
|
-
event.currentTarget.releasePointerCapture(event.pointerId);
|
|
307
|
-
};
|
|
308
|
-
const onMainToggleClick = () => {
|
|
309
|
-
if (suppressMainToggleClickRef.current) {
|
|
310
|
-
suppressMainToggleClickRef.current = false;
|
|
311
|
-
return;
|
|
312
|
-
}
|
|
313
|
-
setOpen((prev) => {
|
|
314
|
-
const next = !prev;
|
|
315
|
-
if (!next) {
|
|
316
|
-
setPosition(null);
|
|
317
|
-
dragStateRef.current = null;
|
|
318
|
-
suppressMainToggleClickRef.current = false;
|
|
319
|
-
}
|
|
320
|
-
return next;
|
|
321
|
-
});
|
|
322
|
-
};
|
|
323
|
-
const previousResponse = chatResult ? [`message:\n${chatResult.message}`, chatResult.patchPreview ? `patchPreview:\n${chatResult.patchPreview}` : ""].filter(Boolean).join("\n\n") : void 0;
|
|
324
|
-
const onSubmit = async (mode) => {
|
|
325
|
-
if (agentStatus && (!agentStatus.available || !agentStatus.authenticated)) {
|
|
326
|
-
setError(agentStatus.message);
|
|
327
|
-
return;
|
|
328
|
-
}
|
|
329
|
-
if (!prompt.trim()) {
|
|
330
|
-
setError("프롬프트를 입력해 주세요.");
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
|
-
setBusy(true);
|
|
334
|
-
setError(null);
|
|
335
|
-
setShowResponsePanel(true);
|
|
336
|
-
try {
|
|
337
|
-
const currentRoute = typeof window !== "undefined" ? window.location.pathname : void 0;
|
|
338
|
-
setChatResult(await apiClient.chat({
|
|
339
|
-
selectedText,
|
|
340
|
-
prompt,
|
|
341
|
-
mode,
|
|
342
|
-
context: {
|
|
343
|
-
route: currentRoute,
|
|
344
|
-
fileHints: config.allowedPaths,
|
|
345
|
-
previousResponse,
|
|
346
|
-
agent: selectedAgent
|
|
347
|
-
}
|
|
348
|
-
}));
|
|
349
|
-
} catch (caughtError) {
|
|
350
|
-
setError(caughtError instanceof Error ? caughtError.message : "요청 처리 중 오류가 발생했습니다.");
|
|
351
|
-
} finally {
|
|
352
|
-
setBusy(false);
|
|
353
|
-
}
|
|
354
|
-
};
|
|
355
|
-
const onApply = async () => {
|
|
356
|
-
if (!chatResult?.patchId) {
|
|
357
|
-
setError("적용 가능한 패치가 없습니다.");
|
|
358
|
-
return;
|
|
359
|
-
}
|
|
360
|
-
setBusy(true);
|
|
361
|
-
setError(null);
|
|
362
|
-
setShowResponsePanel(true);
|
|
363
|
-
try {
|
|
364
|
-
const result = await apiClient.apply({
|
|
365
|
-
patchId: chatResult.patchId,
|
|
366
|
-
approvalToken: `approve:${chatResult.patchId}`
|
|
367
|
-
});
|
|
368
|
-
if (result.applied) {
|
|
369
|
-
setToastMessage(result.summary);
|
|
370
|
-
window.setTimeout(() => {
|
|
371
|
-
setToastMessage(null);
|
|
372
|
-
}, 3e3);
|
|
373
|
-
}
|
|
374
|
-
} catch (caughtError) {
|
|
375
|
-
setError(caughtError instanceof Error ? caughtError.message : "패치 적용 중 오류가 발생했습니다.");
|
|
376
|
-
} finally {
|
|
377
|
-
setBusy(false);
|
|
378
|
-
}
|
|
379
|
-
};
|
|
380
|
-
const floatingWrapperStyle = position ? {
|
|
381
|
-
position: "fixed",
|
|
382
|
-
zIndex: 2147483e3,
|
|
383
|
-
left: `${position.x}px`,
|
|
384
|
-
top: `${position.y}px`
|
|
385
|
-
} : {
|
|
386
|
-
position: "fixed",
|
|
387
|
-
right: 24,
|
|
388
|
-
bottom: 24,
|
|
389
|
-
zIndex: 2147483e3
|
|
390
|
-
};
|
|
391
|
-
const panelStyle = {
|
|
392
|
-
position: "relative",
|
|
393
|
-
marginTop: 12,
|
|
394
|
-
display: "grid",
|
|
395
|
-
gridTemplateColumns: showResponsePanel ? `${INPUT_PANEL_WIDTH}px ${RAIL_WIDTH}px minmax(0, 1fr)` : `${INPUT_PANEL_WIDTH}px ${RAIL_WIDTH}px`,
|
|
396
|
-
width: showResponsePanel ? PANEL_WIDTH : INPUT_PANEL_WIDTH + RAIL_WIDTH,
|
|
397
|
-
maxHeight: "calc(100vh - 96px)",
|
|
398
|
-
overflow: "hidden",
|
|
399
|
-
border: "1px solid #e5e7eb",
|
|
400
|
-
borderRadius: 24,
|
|
401
|
-
background: "#f8fafc",
|
|
402
|
-
boxShadow: "0 18px 60px rgba(15, 23, 42, 0.16)",
|
|
403
|
-
color: "#0f172a",
|
|
404
|
-
fontFamily: "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
|
|
405
|
-
};
|
|
406
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
407
|
-
/* @__PURE__ */ jsx("style", { children: styleText }),
|
|
408
|
-
toastMessage ? /* @__PURE__ */ jsx("div", {
|
|
409
|
-
style: toastStyle,
|
|
410
|
-
children: /* @__PURE__ */ jsx("p", {
|
|
411
|
-
"aria-live": "polite",
|
|
412
|
-
style: { margin: 0 },
|
|
413
|
-
children: toastMessage
|
|
414
|
-
})
|
|
415
|
-
}) : null,
|
|
416
|
-
/* @__PURE__ */ jsxs("div", {
|
|
417
|
-
ref: containerRef,
|
|
418
|
-
style: floatingWrapperStyle,
|
|
419
|
-
[OVERLAY_ATTRIBUTE]: "",
|
|
420
|
-
children: [/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("button", {
|
|
421
|
-
type: "button",
|
|
422
|
-
className: "yrdc-trigger",
|
|
423
|
-
style: triggerButtonStyle,
|
|
424
|
-
onClick: onMainToggleClick,
|
|
425
|
-
onPointerDown,
|
|
426
|
-
onPointerMove,
|
|
427
|
-
onPointerUp: onPointerEnd,
|
|
428
|
-
onPointerCancel: onPointerEnd,
|
|
429
|
-
"aria-label": "Dev Copilot 열기",
|
|
430
|
-
title: "Dev Copilot 열기/닫기 / 드래그해서 이동",
|
|
431
|
-
children: /* @__PURE__ */ jsx(SparklesIcon, {
|
|
432
|
-
"aria-hidden": true,
|
|
433
|
-
style: {
|
|
434
|
-
width: 16,
|
|
435
|
-
height: 16
|
|
436
|
-
}
|
|
437
|
-
})
|
|
438
|
-
}) }), open ? /* @__PURE__ */ jsxs("section", {
|
|
439
|
-
style: panelStyle,
|
|
440
|
-
children: [
|
|
441
|
-
/* @__PURE__ */ jsxs("div", {
|
|
442
|
-
style: inputPanelStyle,
|
|
443
|
-
children: [
|
|
444
|
-
/* @__PURE__ */ jsxs("header", { children: [/* @__PURE__ */ jsx("p", {
|
|
445
|
-
style: titleStyle,
|
|
446
|
-
children: UI_LABELS.title
|
|
447
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
448
|
-
style: subtitleStyle,
|
|
449
|
-
children: UI_LABELS.subtitle
|
|
450
|
-
})] }),
|
|
451
|
-
/* @__PURE__ */ jsxs("div", {
|
|
452
|
-
style: statusBoxStyle,
|
|
453
|
-
children: [
|
|
454
|
-
/* @__PURE__ */ jsxs("p", {
|
|
455
|
-
style: statusLineStyle,
|
|
456
|
-
children: ["로컬 에이전트: ", AGENT_LABELS[selectedAgent]]
|
|
457
|
-
}),
|
|
458
|
-
agentStatus?.model ? /* @__PURE__ */ jsxs("p", {
|
|
459
|
-
style: statusLineStyle,
|
|
460
|
-
children: ["모델: ", agentStatus.model]
|
|
461
|
-
}) : null,
|
|
462
|
-
agentStatus ? /* @__PURE__ */ jsxs("p", {
|
|
463
|
-
style: {
|
|
464
|
-
...statusLineStyle,
|
|
465
|
-
color: agentStatus.authenticated ? "#15803d" : "#dc2626"
|
|
466
|
-
},
|
|
467
|
-
children: [agentStatus.message, agentStatus.loginCommand && !agentStatus.message.includes(agentStatus.loginCommand) ? ` 터미널에서 ${agentStatus.loginCommand} 실행` : ""]
|
|
468
|
-
}) : null
|
|
469
|
-
]
|
|
470
|
-
}),
|
|
471
|
-
/* @__PURE__ */ jsx("label", {
|
|
472
|
-
style: labelStyle,
|
|
473
|
-
children: "에이전트"
|
|
474
|
-
}),
|
|
475
|
-
/* @__PURE__ */ jsx("div", {
|
|
476
|
-
style: agentToggleRowStyle,
|
|
477
|
-
children: ["codex", "claude"].map((agent) => {
|
|
478
|
-
const active = selectedAgent === agent;
|
|
479
|
-
return /* @__PURE__ */ jsx("button", {
|
|
480
|
-
type: "button",
|
|
481
|
-
className: "yrdc-pressable",
|
|
482
|
-
onClick: () => setSelectedAgent(agent),
|
|
483
|
-
disabled: busy,
|
|
484
|
-
style: {
|
|
485
|
-
...agentToggleButtonStyle,
|
|
486
|
-
background: active ? "#111827" : "#e2e8f0",
|
|
487
|
-
color: active ? "#ffffff" : "#1e293b",
|
|
488
|
-
opacity: busy ? .6 : 1
|
|
489
|
-
},
|
|
490
|
-
children: AGENT_LABELS[agent]
|
|
491
|
-
}, agent);
|
|
492
|
-
})
|
|
493
|
-
}),
|
|
494
|
-
/* @__PURE__ */ jsx("label", {
|
|
495
|
-
style: labelStyle,
|
|
496
|
-
children: "선택 텍스트"
|
|
497
|
-
}),
|
|
498
|
-
/* @__PURE__ */ jsx("textarea", {
|
|
499
|
-
value: selectedText,
|
|
500
|
-
onChange: (event) => setSelectedText(event.target.value),
|
|
501
|
-
rows: 5,
|
|
502
|
-
className: "yrdc-field",
|
|
503
|
-
style: textareaStyle
|
|
504
|
-
}),
|
|
505
|
-
/* @__PURE__ */ jsx("label", {
|
|
506
|
-
style: labelStyle,
|
|
507
|
-
children: "프롬프트"
|
|
508
|
-
}),
|
|
509
|
-
/* @__PURE__ */ jsx("textarea", {
|
|
510
|
-
value: prompt,
|
|
511
|
-
onChange: (event) => setPrompt(event.target.value),
|
|
512
|
-
rows: 4,
|
|
513
|
-
placeholder: UI_LABELS.promptPlaceholder,
|
|
514
|
-
className: "yrdc-field",
|
|
515
|
-
style: textareaStyle
|
|
516
|
-
}),
|
|
517
|
-
/* @__PURE__ */ jsxs("div", {
|
|
518
|
-
style: buttonRowStyle,
|
|
519
|
-
children: [/* @__PURE__ */ jsx("button", {
|
|
520
|
-
type: "button",
|
|
521
|
-
className: "yrdc-pressable",
|
|
522
|
-
onClick: () => onSubmit("answer"),
|
|
523
|
-
disabled: busy || Boolean(agentStatus && !agentStatus.authenticated),
|
|
524
|
-
style: {
|
|
525
|
-
...buttonStyle,
|
|
526
|
-
background: "#111827",
|
|
527
|
-
color: "#ffffff",
|
|
528
|
-
opacity: busy || Boolean(agentStatus && !agentStatus.authenticated) ? .55 : 1
|
|
529
|
-
},
|
|
530
|
-
children: UI_LABELS.askButton
|
|
531
|
-
}), /* @__PURE__ */ jsx("button", {
|
|
532
|
-
type: "button",
|
|
533
|
-
className: "yrdc-pressable",
|
|
534
|
-
onClick: () => onSubmit("edit"),
|
|
535
|
-
disabled: busy || Boolean(agentStatus && !agentStatus.authenticated),
|
|
536
|
-
style: {
|
|
537
|
-
...buttonStyle,
|
|
538
|
-
background: "#2563eb",
|
|
539
|
-
color: "#ffffff",
|
|
540
|
-
opacity: busy || Boolean(agentStatus && !agentStatus.authenticated) ? .55 : 1
|
|
541
|
-
},
|
|
542
|
-
children: UI_LABELS.editButton
|
|
543
|
-
})]
|
|
544
|
-
})
|
|
545
|
-
]
|
|
546
|
-
}),
|
|
547
|
-
/* @__PURE__ */ jsx("div", {
|
|
548
|
-
style: railStyle,
|
|
549
|
-
children: /* @__PURE__ */ jsx("button", {
|
|
550
|
-
type: "button",
|
|
551
|
-
className: "yrdc-pressable",
|
|
552
|
-
style: railToggleStyle,
|
|
553
|
-
onClick: () => setShowResponsePanel((prev) => !prev),
|
|
554
|
-
"aria-label": showResponsePanel ? "응답 패널 닫기" : "응답 패널 열기",
|
|
555
|
-
title: showResponsePanel ? "응답 패널 닫기" : "응답 패널 열기",
|
|
556
|
-
children: showResponsePanel ? /* @__PURE__ */ jsx(PanelRightCloseIcon, {
|
|
557
|
-
"aria-hidden": true,
|
|
558
|
-
style: {
|
|
559
|
-
width: 14,
|
|
560
|
-
height: 14
|
|
561
|
-
}
|
|
562
|
-
}) : /* @__PURE__ */ jsx(PanelRightOpenIcon, {
|
|
563
|
-
"aria-hidden": true,
|
|
564
|
-
style: {
|
|
565
|
-
width: 14,
|
|
566
|
-
height: 14
|
|
567
|
-
}
|
|
568
|
-
})
|
|
569
|
-
})
|
|
570
|
-
}),
|
|
571
|
-
showResponsePanel ? /* @__PURE__ */ jsx("aside", {
|
|
572
|
-
style: responsePanelStyle,
|
|
573
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
574
|
-
style: {
|
|
575
|
-
display: "flex",
|
|
576
|
-
flexDirection: "column",
|
|
577
|
-
minHeight: 320,
|
|
578
|
-
height: "100%"
|
|
579
|
-
},
|
|
580
|
-
children: [/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("p", {
|
|
581
|
-
style: titleStyle,
|
|
582
|
-
children: "응답"
|
|
583
|
-
}) }), /* @__PURE__ */ jsx("div", {
|
|
584
|
-
style: responseCardStyle,
|
|
585
|
-
children: busy ? /* @__PURE__ */ jsxs("div", {
|
|
586
|
-
style: busyContainerStyle,
|
|
587
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
588
|
-
className: "yrdc-spinner",
|
|
589
|
-
style: spinnerStyle
|
|
590
|
-
}), /* @__PURE__ */ jsxs("span", { children: [AGENT_LABELS[selectedAgent], " 응답을 기다리는 중입니다."] })]
|
|
591
|
-
}) : chatResult ? /* @__PURE__ */ jsxs("article", {
|
|
592
|
-
style: articleStyle,
|
|
593
|
-
children: [
|
|
594
|
-
error ? /* @__PURE__ */ jsx("p", {
|
|
595
|
-
style: errorBoxStyle,
|
|
596
|
-
children: error
|
|
597
|
-
}) : null,
|
|
598
|
-
chatResult.warnings.length ? /* @__PURE__ */ jsx("div", {
|
|
599
|
-
style: warningBoxStyle,
|
|
600
|
-
children: chatResult.warnings.map((warning) => /* @__PURE__ */ jsx("p", {
|
|
601
|
-
style: { margin: 0 },
|
|
602
|
-
children: warning
|
|
603
|
-
}, warning))
|
|
604
|
-
}) : null,
|
|
605
|
-
/* @__PURE__ */ jsx("p", {
|
|
606
|
-
style: messageStyle,
|
|
607
|
-
children: chatResult.message
|
|
608
|
-
}),
|
|
609
|
-
chatResult.patchPreview ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("pre", {
|
|
610
|
-
style: patchPreviewStyle,
|
|
611
|
-
children: chatResult.patchPreview
|
|
612
|
-
}), chatResult.patchId ? /* @__PURE__ */ jsx("button", {
|
|
613
|
-
type: "button",
|
|
614
|
-
className: "yrdc-pressable",
|
|
615
|
-
onClick: onApply,
|
|
616
|
-
disabled: busy,
|
|
617
|
-
style: {
|
|
618
|
-
...buttonStyle,
|
|
619
|
-
alignSelf: "flex-start",
|
|
620
|
-
background: "#15803d",
|
|
621
|
-
color: "#ffffff",
|
|
622
|
-
opacity: busy ? .55 : 1
|
|
623
|
-
},
|
|
624
|
-
children: UI_LABELS.applyButton
|
|
625
|
-
}) : null] }) : null
|
|
626
|
-
]
|
|
627
|
-
}) : error ? /* @__PURE__ */ jsx("p", {
|
|
628
|
-
style: errorBoxStyle,
|
|
629
|
-
children: error
|
|
630
|
-
}) : /* @__PURE__ */ jsx("p", {
|
|
631
|
-
style: placeholderStyle,
|
|
632
|
-
children: "질문 또는 코드 수정 제안을 실행하면 이 영역에 결과가 표시됩니다."
|
|
633
|
-
})
|
|
634
|
-
})]
|
|
635
|
-
})
|
|
636
|
-
}) : null
|
|
637
|
-
]
|
|
638
|
-
}) : null]
|
|
639
|
-
})
|
|
640
|
-
] });
|
|
641
|
-
}
|
|
642
|
-
const triggerButtonStyle = {
|
|
643
|
-
display: "flex",
|
|
644
|
-
width: FLOATING_BUTTON_SIZE,
|
|
645
|
-
height: FLOATING_BUTTON_SIZE,
|
|
646
|
-
borderRadius: 9999,
|
|
647
|
-
border: "1px solid #f2d675",
|
|
648
|
-
background: "#fff4b8",
|
|
649
|
-
color: "#ffb03d",
|
|
650
|
-
alignItems: "center",
|
|
651
|
-
justifyContent: "center",
|
|
652
|
-
boxShadow: "0 12px 28px rgba(15, 23, 42, 0.18)",
|
|
653
|
-
cursor: "grab"
|
|
654
|
-
};
|
|
655
|
-
const railStyle = {
|
|
656
|
-
display: "flex",
|
|
657
|
-
minHeight: 320,
|
|
658
|
-
alignItems: "center",
|
|
659
|
-
justifyContent: "center",
|
|
660
|
-
borderLeft: "1px solid #e5e7eb",
|
|
661
|
-
background: "#f8fafc"
|
|
662
|
-
};
|
|
663
|
-
const railToggleStyle = {
|
|
664
|
-
display: "flex",
|
|
665
|
-
width: 24,
|
|
666
|
-
height: 24,
|
|
667
|
-
border: "0",
|
|
668
|
-
background: "transparent",
|
|
669
|
-
color: "#64748b",
|
|
670
|
-
cursor: "pointer",
|
|
671
|
-
alignItems: "center",
|
|
672
|
-
justifyContent: "center"
|
|
673
|
-
};
|
|
674
|
-
const inputPanelStyle = {
|
|
675
|
-
padding: 16,
|
|
676
|
-
minHeight: 0,
|
|
677
|
-
overflowY: "auto",
|
|
678
|
-
background: "#ffffff"
|
|
679
|
-
};
|
|
680
|
-
const responsePanelStyle = {
|
|
681
|
-
minHeight: 0,
|
|
682
|
-
overflow: "hidden",
|
|
683
|
-
padding: 16,
|
|
684
|
-
borderLeft: "1px solid #e5e7eb",
|
|
685
|
-
background: "#f8fafc"
|
|
686
|
-
};
|
|
687
|
-
const titleStyle = {
|
|
688
|
-
margin: 0,
|
|
689
|
-
fontSize: 18,
|
|
690
|
-
fontWeight: 700,
|
|
691
|
-
lineHeight: 1.4,
|
|
692
|
-
color: "#111827"
|
|
693
|
-
};
|
|
694
|
-
const subtitleStyle = {
|
|
695
|
-
margin: "4px 0 0",
|
|
696
|
-
fontSize: 14,
|
|
697
|
-
lineHeight: 1.5,
|
|
698
|
-
color: "#6b7280"
|
|
699
|
-
};
|
|
700
|
-
const statusBoxStyle = {
|
|
701
|
-
marginTop: 12,
|
|
702
|
-
border: "1px solid #e5e7eb",
|
|
703
|
-
borderRadius: 16,
|
|
704
|
-
background: "#ffffff",
|
|
705
|
-
padding: "12px 14px",
|
|
706
|
-
fontSize: 14,
|
|
707
|
-
lineHeight: 1.6,
|
|
708
|
-
color: "#6b7280"
|
|
709
|
-
};
|
|
710
|
-
const statusLineStyle = { margin: 0 };
|
|
711
|
-
const labelStyle = {
|
|
712
|
-
display: "block",
|
|
713
|
-
marginTop: 16,
|
|
714
|
-
fontSize: 14,
|
|
715
|
-
lineHeight: 1.5,
|
|
716
|
-
color: "#6b7280"
|
|
717
|
-
};
|
|
718
|
-
const textareaStyle = {
|
|
719
|
-
width: "100%",
|
|
720
|
-
resize: "vertical",
|
|
721
|
-
borderRadius: 16,
|
|
722
|
-
border: "1px solid #e5e7eb",
|
|
723
|
-
background: "#ffffff",
|
|
724
|
-
padding: "12px 14px",
|
|
725
|
-
marginTop: 6,
|
|
726
|
-
fontSize: 15,
|
|
727
|
-
lineHeight: 1.7,
|
|
728
|
-
color: "#111827",
|
|
729
|
-
boxSizing: "border-box",
|
|
730
|
-
minHeight: 132
|
|
731
|
-
};
|
|
732
|
-
const agentToggleRowStyle = {
|
|
733
|
-
display: "flex",
|
|
734
|
-
gap: 8,
|
|
735
|
-
marginTop: 6
|
|
736
|
-
};
|
|
737
|
-
const agentToggleButtonStyle = {
|
|
738
|
-
border: 0,
|
|
739
|
-
borderRadius: 10,
|
|
740
|
-
padding: "8px 12px",
|
|
741
|
-
fontSize: 13,
|
|
742
|
-
fontWeight: 600,
|
|
743
|
-
lineHeight: 1.2,
|
|
744
|
-
cursor: "pointer"
|
|
745
|
-
};
|
|
746
|
-
const buttonRowStyle = {
|
|
747
|
-
display: "flex",
|
|
748
|
-
alignItems: "center",
|
|
749
|
-
gap: 8,
|
|
750
|
-
marginTop: 16
|
|
751
|
-
};
|
|
752
|
-
const buttonStyle = {
|
|
753
|
-
border: 0,
|
|
754
|
-
borderRadius: 12,
|
|
755
|
-
padding: "10px 14px",
|
|
756
|
-
fontSize: 14,
|
|
757
|
-
fontWeight: 600,
|
|
758
|
-
lineHeight: 1,
|
|
759
|
-
cursor: "pointer"
|
|
760
|
-
};
|
|
761
|
-
const responseCardStyle = {
|
|
762
|
-
marginTop: 12,
|
|
763
|
-
minHeight: 0,
|
|
764
|
-
flex: 1,
|
|
765
|
-
overflowY: "auto",
|
|
766
|
-
borderRadius: 18,
|
|
767
|
-
border: "1px solid #e5e7eb",
|
|
768
|
-
background: "#ffffff",
|
|
769
|
-
padding: 16
|
|
770
|
-
};
|
|
771
|
-
const busyContainerStyle = {
|
|
772
|
-
display: "flex",
|
|
773
|
-
height: "100%",
|
|
774
|
-
minHeight: 192,
|
|
775
|
-
alignItems: "center",
|
|
776
|
-
justifyContent: "center",
|
|
777
|
-
gap: 12,
|
|
778
|
-
color: "#6b7280",
|
|
779
|
-
fontSize: 14
|
|
780
|
-
};
|
|
781
|
-
const spinnerStyle = {
|
|
782
|
-
display: "inline-block",
|
|
783
|
-
width: 18,
|
|
784
|
-
height: 18,
|
|
785
|
-
borderRadius: 9999,
|
|
786
|
-
border: "2px solid #d1d5db",
|
|
787
|
-
borderTopColor: "#2563eb"
|
|
788
|
-
};
|
|
789
|
-
const articleStyle = {
|
|
790
|
-
display: "flex",
|
|
791
|
-
flexDirection: "column",
|
|
792
|
-
gap: 12
|
|
793
|
-
};
|
|
794
|
-
const errorBoxStyle = {
|
|
795
|
-
margin: 0,
|
|
796
|
-
border: "1px solid #fca5a5",
|
|
797
|
-
borderRadius: 12,
|
|
798
|
-
background: "#fef2f2",
|
|
799
|
-
padding: "10px 12px",
|
|
800
|
-
fontSize: 14,
|
|
801
|
-
lineHeight: 1.6,
|
|
802
|
-
color: "#dc2626",
|
|
803
|
-
whiteSpace: "pre-wrap"
|
|
804
|
-
};
|
|
805
|
-
const warningBoxStyle = {
|
|
806
|
-
display: "flex",
|
|
807
|
-
flexDirection: "column",
|
|
808
|
-
gap: 6,
|
|
809
|
-
border: "1px solid #fca5a5",
|
|
810
|
-
borderRadius: 12,
|
|
811
|
-
background: "#fef2f2",
|
|
812
|
-
padding: "10px 12px",
|
|
813
|
-
fontSize: 14,
|
|
814
|
-
lineHeight: 1.6,
|
|
815
|
-
color: "#dc2626"
|
|
816
|
-
};
|
|
817
|
-
const messageStyle = {
|
|
818
|
-
margin: 0,
|
|
819
|
-
whiteSpace: "pre-wrap",
|
|
820
|
-
fontSize: 15,
|
|
821
|
-
lineHeight: 1.7,
|
|
822
|
-
color: "#111827"
|
|
823
|
-
};
|
|
824
|
-
const patchPreviewStyle = {
|
|
825
|
-
margin: 0,
|
|
826
|
-
maxHeight: 288,
|
|
827
|
-
overflow: "auto",
|
|
828
|
-
borderRadius: 12,
|
|
829
|
-
border: "1px solid #e5e7eb",
|
|
830
|
-
background: "#f8fafc",
|
|
831
|
-
padding: 12,
|
|
832
|
-
fontSize: 13,
|
|
833
|
-
lineHeight: 1.6,
|
|
834
|
-
color: "#111827",
|
|
835
|
-
fontFamily: "ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Consolas, monospace",
|
|
836
|
-
whiteSpace: "pre-wrap",
|
|
837
|
-
wordBreak: "break-word"
|
|
838
|
-
};
|
|
839
|
-
const placeholderStyle = {
|
|
840
|
-
margin: 0,
|
|
841
|
-
fontSize: 14,
|
|
842
|
-
lineHeight: 1.6,
|
|
843
|
-
color: "#6b7280"
|
|
844
|
-
};
|
|
845
|
-
const toastStyle = {
|
|
846
|
-
position: "fixed",
|
|
847
|
-
top: 16,
|
|
848
|
-
right: 16,
|
|
849
|
-
zIndex: 2147483600,
|
|
850
|
-
maxWidth: 360,
|
|
851
|
-
borderRadius: 16,
|
|
852
|
-
border: "1px solid #bbf7d0",
|
|
853
|
-
background: "#f0fdf4",
|
|
854
|
-
color: "#15803d",
|
|
855
|
-
padding: "12px 14px",
|
|
856
|
-
boxShadow: "0 12px 28px rgba(15, 23, 42, 0.12)",
|
|
857
|
-
fontFamily: "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
|
|
858
|
-
fontSize: 14,
|
|
859
|
-
lineHeight: 1.6
|
|
860
|
-
};
|
|
861
|
-
|
|
862
|
-
//#endregion
|
|
863
|
-
export { DevCopilotOverlay, DevCopilotProvider, useSelectionCapture };
|
|
864
|
-
//# sourceMappingURL=index.mjs.map
|
|
7
|
+
export { CopilotOverlayWidget as DevCopilotOverlay, DevCopilotProvider };
|