create-interview-cockpit 0.21.0 → 0.22.0
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/package.json
CHANGED
|
@@ -295,6 +295,13 @@ export default function CodeContextPanel() {
|
|
|
295
295
|
[currentQuestion, updateCodeContext],
|
|
296
296
|
);
|
|
297
297
|
|
|
298
|
+
const selectAllFiles = useCallback(() => {
|
|
299
|
+
if (!currentQuestion || availableFiles.length === 0) return;
|
|
300
|
+
const next = [...availableFiles];
|
|
301
|
+
setSelectedFiles(next);
|
|
302
|
+
updateCodeContext(currentQuestion.id, next);
|
|
303
|
+
}, [availableFiles, currentQuestion, updateCodeContext]);
|
|
304
|
+
|
|
298
305
|
const toggleExpand = useCallback((path: string) => {
|
|
299
306
|
setExpandedFolders((prev) => {
|
|
300
307
|
const next = new Set(prev);
|
|
@@ -308,6 +315,10 @@ export default function CodeContextPanel() {
|
|
|
308
315
|
}, []);
|
|
309
316
|
|
|
310
317
|
const filter = search.toLowerCase();
|
|
318
|
+
const selectedSet = new Set(selectedFiles);
|
|
319
|
+
const allFilesSelected =
|
|
320
|
+
availableFiles.length > 0 &&
|
|
321
|
+
availableFiles.every((filePath) => selectedSet.has(filePath));
|
|
311
322
|
|
|
312
323
|
return (
|
|
313
324
|
<div className="w-72 h-full min-h-0 border-l border-slate-800 flex flex-col bg-slate-900/30 shrink-0 overflow-hidden">
|
|
@@ -317,7 +328,19 @@ export default function CodeContextPanel() {
|
|
|
317
328
|
<span className="text-xs font-bold uppercase tracking-wider text-slate-500">
|
|
318
329
|
Code Context
|
|
319
330
|
</span>
|
|
320
|
-
<
|
|
331
|
+
<div className="flex items-center gap-2">
|
|
332
|
+
{currentQuestion && availableFiles.length > 0 && (
|
|
333
|
+
<button
|
|
334
|
+
onClick={selectAllFiles}
|
|
335
|
+
disabled={allFilesSelected}
|
|
336
|
+
className="text-[10px] text-cyan-400/70 hover:text-cyan-300 disabled:text-slate-600 disabled:cursor-not-allowed"
|
|
337
|
+
title="Select all code-context files"
|
|
338
|
+
>
|
|
339
|
+
Select all
|
|
340
|
+
</button>
|
|
341
|
+
)}
|
|
342
|
+
<FolderOpen className="w-3.5 h-3.5 text-slate-600" />
|
|
343
|
+
</div>
|
|
321
344
|
</div>
|
|
322
345
|
<div className="relative">
|
|
323
346
|
<Search className="absolute left-2 top-1/2 -translate-y-1/2 w-3 h-3 text-slate-600" />
|
package/template/cockpit.json
CHANGED