@hienlh/ppm 0.11.0 → 0.11.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/CHANGELOG.md +11 -0
- package/dist/web/assets/{chat-tab-CbguR_l0.js → chat-tab-DYf6U6UF.js} +3 -3
- package/dist/web/assets/{code-editor-DbZP0Dnj.js → code-editor-BPxBeu0S.js} +2 -2
- package/dist/web/assets/{conflict-editor-BzrH1UpC.js → conflict-editor-BCkYHDUy.js} +1 -1
- package/dist/web/assets/{database-viewer-CqMOv2Sg.js → database-viewer-CCe8qa1Q.js} +1 -1
- package/dist/web/assets/{diff-viewer-B6a2oYYn.js → diff-viewer-DIjzWvaG.js} +1 -1
- package/dist/web/assets/{extension-webview-CZr_fvOm.js → extension-webview-HY8XueLo.js} +1 -1
- package/dist/web/assets/index-DpRxWGjM.js +26 -0
- package/dist/web/assets/{markdown-renderer-BhNYbXCp.js → markdown-renderer-BQV0AIm5.js} +1 -1
- package/dist/web/assets/{port-forwarding-tab-Dw9MUu5a.js → port-forwarding-tab-DPmTpfFX.js} +1 -1
- package/dist/web/assets/{postgres-viewer-YKyNjTLp.js → postgres-viewer-BUSNt_7x.js} +1 -1
- package/dist/web/assets/{settings-tab-2tdZuQIn.js → settings-tab-DHBG5O0C.js} +1 -1
- package/dist/web/assets/{sqlite-viewer-Fx9qDD4-.js → sqlite-viewer-B7WnFN29.js} +1 -1
- package/dist/web/assets/{terminal-tab-BxljmYb7.js → terminal-tab-1K4ijyNe.js} +1 -1
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/src/providers/claude-agent-sdk.ts +6 -9
- package/src/services/account.service.ts +9 -5
- package/src/web/components/explorer/file-tree.tsx +61 -19
- package/dist/web/assets/index-C68PuiOm.js +0 -26
|
@@ -11,6 +11,9 @@ import {
|
|
|
11
11
|
ChevronDown,
|
|
12
12
|
Download,
|
|
13
13
|
Loader2,
|
|
14
|
+
FilePlus,
|
|
15
|
+
FolderPlus,
|
|
16
|
+
RefreshCw,
|
|
14
17
|
} from "lucide-react";
|
|
15
18
|
import { useShallow } from "zustand/react/shallow";
|
|
16
19
|
import { useFileStore, type FileNode } from "@/stores/file-store";
|
|
@@ -28,6 +31,9 @@ import {
|
|
|
28
31
|
import { FileActions } from "./file-actions";
|
|
29
32
|
import { downloadFile, downloadFolder } from "@/lib/file-download";
|
|
30
33
|
|
|
34
|
+
/** Synthetic root node for creating files/folders at project root */
|
|
35
|
+
const ROOT_NODE: FileNode = { name: "", path: "", type: "directory" };
|
|
36
|
+
|
|
31
37
|
const FILE_ICON_MAP: Record<string, React.ComponentType<{ className?: string }>> = {
|
|
32
38
|
ts: FileCode,
|
|
33
39
|
tsx: FileCode,
|
|
@@ -301,25 +307,61 @@ export function FileTree({ onFileOpen }: FileTreeProps = {}) {
|
|
|
301
307
|
return a.name.localeCompare(b.name);
|
|
302
308
|
});
|
|
303
309
|
|
|
310
|
+
const toolbarBtnClass = "p-1 rounded-sm text-text-secondary hover:text-foreground hover:bg-surface-elevated transition-colors";
|
|
311
|
+
|
|
304
312
|
return (
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
313
|
+
<div className="flex flex-col h-full">
|
|
314
|
+
{/* Toolbar */}
|
|
315
|
+
<div className="flex items-center gap-0.5 px-2 h-8 border-b border-border shrink-0">
|
|
316
|
+
<button onClick={() => handleAction("new-file", ROOT_NODE)} title="New File" className={toolbarBtnClass}>
|
|
317
|
+
<FilePlus className="size-3.5" />
|
|
318
|
+
</button>
|
|
319
|
+
<button onClick={() => handleAction("new-folder", ROOT_NODE)} title="New Folder" className={toolbarBtnClass}>
|
|
320
|
+
<FolderPlus className="size-3.5" />
|
|
321
|
+
</button>
|
|
322
|
+
<div className="flex-1" />
|
|
323
|
+
<button onClick={loadTree} title="Refresh" className={toolbarBtnClass}>
|
|
324
|
+
<RefreshCw className="size-3.5" />
|
|
325
|
+
</button>
|
|
326
|
+
</div>
|
|
327
|
+
|
|
328
|
+
{/* File tree with blank-area context menu */}
|
|
329
|
+
<ContextMenu>
|
|
330
|
+
<ContextMenuTrigger asChild>
|
|
331
|
+
<ScrollArea className="flex-1">
|
|
332
|
+
<div className="py-1">
|
|
333
|
+
{sorted.map((node) => (
|
|
334
|
+
<TreeNode
|
|
335
|
+
key={node.path}
|
|
336
|
+
node={node}
|
|
337
|
+
depth={0}
|
|
338
|
+
projectName={activeProject.name}
|
|
339
|
+
onAction={handleAction}
|
|
340
|
+
onFileOpen={onFileOpen}
|
|
341
|
+
/>
|
|
342
|
+
))}
|
|
343
|
+
{sorted.length === 0 && (
|
|
344
|
+
<p className="p-3 text-xs text-text-subtle">Empty project.</p>
|
|
345
|
+
)}
|
|
346
|
+
</div>
|
|
347
|
+
</ScrollArea>
|
|
348
|
+
</ContextMenuTrigger>
|
|
349
|
+
<ContextMenuContent>
|
|
350
|
+
<ContextMenuItem onClick={() => handleAction("new-file", ROOT_NODE)}>
|
|
351
|
+
<FilePlus className="size-3.5 mr-2" />
|
|
352
|
+
New File
|
|
353
|
+
</ContextMenuItem>
|
|
354
|
+
<ContextMenuItem onClick={() => handleAction("new-folder", ROOT_NODE)}>
|
|
355
|
+
<FolderPlus className="size-3.5 mr-2" />
|
|
356
|
+
New Folder
|
|
357
|
+
</ContextMenuItem>
|
|
358
|
+
<ContextMenuSeparator />
|
|
359
|
+
<ContextMenuItem onClick={loadTree}>
|
|
360
|
+
<RefreshCw className="size-3.5 mr-2" />
|
|
361
|
+
Refresh
|
|
362
|
+
</ContextMenuItem>
|
|
363
|
+
</ContextMenuContent>
|
|
364
|
+
</ContextMenu>
|
|
323
365
|
|
|
324
366
|
{actionState && (
|
|
325
367
|
<FileActions
|
|
@@ -330,6 +372,6 @@ export function FileTree({ onFileOpen }: FileTreeProps = {}) {
|
|
|
330
372
|
onRefresh={loadTree}
|
|
331
373
|
/>
|
|
332
374
|
)}
|
|
333
|
-
|
|
375
|
+
</div>
|
|
334
376
|
);
|
|
335
377
|
}
|