@kimuson/claude-code-viewer 0.4.2-beta.2 → 0.4.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/main.js +35 -13
- package/dist/main.js.map +3 -3
- package/dist/static/assets/{index-CK6hOCWi.js → index-9_i65aDK.js} +1 -1
- package/dist/static/assets/index-BOZi-nvY.js +115 -0
- package/dist/static/assets/{index-ctyalk2m.js → index-C4k414nW.js} +1 -1
- package/dist/static/assets/index-CUFn_afi.js +6 -0
- package/dist/static/assets/{index-BGPIfxUi.js → index-CUzR7g73.js} +54 -54
- package/dist/static/assets/{index-DIDGF7dr.js → index-Gic8S5Lu.js} +1 -1
- package/dist/static/assets/index-dP8USCrN.js +1 -0
- package/dist/static/assets/{formatLocaleDate-Dt6P14B9.js → label-CwNfCtYa.js} +6 -6
- package/dist/static/assets/messages-Bbqi5Aw-.js +1 -0
- package/dist/static/assets/messages-CQJqvH5I.js +1 -0
- package/dist/static/index.html +1 -1
- package/package.json +2 -1
- package/dist/static/assets/index-BCLB4du1.js +0 -1
- package/dist/static/assets/index-DfIIjCmW.js +0 -6
- package/dist/static/assets/index-u3TFrHTl.js +0 -115
- package/dist/static/assets/messages-B2As9KeS.js +0 -1
- package/dist/static/assets/messages-CTBgz1qg.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o,N as n,T as s}from"./index-
|
|
1
|
+
import{j as o,N as n,T as s}from"./index-BOZi-nvY.js";const t=()=>o.jsx(n,{message:o.jsx(s,{id:"notfound.session.title",message:"Session Not Found"}),description:o.jsx(s,{id:"notfound.session.description",message:"The session you are looking for does not exist."})});export{t as notFoundComponent};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as f,a as N,p as x,b as w,j as e,C as v,d as y,e as C,f as b,g as j,T as s,B as l,L as P,r as c,h as k,i as L,k as S,t as h,l as D}from"./index-BOZi-nvY.js";import{F as u,f as _,u as F,C as I,L as M,a as E,D as q,b as H,P as T,c as $,d as A,e as Q,g as B,h as O,i as R,G}from"./label-CwNfCtYa.js";/**
|
|
2
|
+
* @license lucide-react v0.548.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const K=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],V=f("history",K),z=()=>N({queryKey:x.queryKey,queryFn:x.queryFn}),U=()=>{const{data:{projects:o}}=z(),{config:n}=w();return o.length,e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:o.map(t=>e.jsxs(v,{className:"hover:shadow-md transition-shadow",children:[e.jsxs(y,{children:[e.jsxs(C,{className:"flex items-center gap-2",children:[e.jsx(u,{className:"w-5 h-5"}),e.jsx("span",{className:"truncate",children:t.meta.projectName??t.claudeProjectPath})]}),t.meta.projectPath?e.jsx(b,{children:t.meta.projectPath}):null]}),e.jsxs(j,{className:"space-y-2",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.jsx(s,{id:"project_list.last_modified",message:"Last modified:"})," ",t.lastModifiedAt?_(t.lastModifiedAt,{locale:n.locale,target:"time"}):""]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[e.jsx(s,{id:"project_list.messages",message:"Messages:"})," ",t.meta.sessionCount]})]}),e.jsx(j,{className:"pt-0",children:e.jsx(l,{asChild:!0,className:"w-full",children:e.jsx(P,{to:"/projects/$projectId/latest",params:{projectId:t.id},children:e.jsx(s,{id:"project_list.view_conversations",message:"View Conversations"})})})})]},t.id))})},W=({onPathChange:o})=>{const[n,t]=c.useState(void 0),[d,m]=c.useState(!1),{data:r,isLoading:i}=F(k(n,d));c.useEffect(()=>{r?.currentPath&&o(r.currentPath)},[r?.currentPath,o]);const p=a=>{if(a===""){t(void 0);return}const g=`/${a}`;t(g)};return e.jsxs("div",{className:"border rounded-md",children:[e.jsx("div",{className:"p-3 border-b bg-muted/50",children:e.jsxs("p",{className:"text-sm font-medium",children:[e.jsx(s,{id:"directory_picker.current",message:"Current:"})," ",e.jsx("span",{className:"font-mono",children:r?.currentPath||"~"})]})}),e.jsxs("div",{className:"p-3 border-b flex items-center gap-2",children:[e.jsx(I,{id:"show-hidden",checked:d,onCheckedChange:a=>m(a===!0)}),e.jsx(M,{htmlFor:"show-hidden",className:"text-sm cursor-pointer",children:e.jsx(s,{id:"directory_picker.show_hidden",message:"Show hidden files"})})]}),e.jsx("div",{className:"max-h-96 overflow-auto",children:i?e.jsx("div",{className:"p-8 text-center text-sm text-muted-foreground",children:e.jsx(s,{id:"directory_picker.loading",message:"Loading..."})}):r?.entries&&r.entries.length>0?e.jsx("div",{className:"divide-y",children:r.entries.filter(a=>a.type==="directory").filter(a=>d||a.name===".."||!a.name.startsWith(".")).map(a=>e.jsxs("button",{type:"button",onClick:()=>p(a.path),className:"w-full px-3 py-2 flex items-center gap-2 hover:bg-muted/50 transition-colors text-left",children:[a.name===".."?e.jsx(E,{className:"w-4 h-4 rotate-180"}):e.jsx(u,{className:"w-4 h-4 text-blue-500"}),e.jsx("span",{className:"text-sm",children:a.name})]},a.path))}):e.jsx("div",{className:"p-8 text-center text-sm text-muted-foreground",children:e.jsx(s,{id:"directory_picker.no_directories",message:"No directories found"})})})]})},Y=()=>{const[o,n]=c.useState(!1),[t,d]=c.useState(""),m=L(),r=S({mutationFn:async()=>{const i=await D.api.projects.$post({json:{projectPath:t}});if(!i.ok)throw new Error("Failed to set up project");return await i.json()},onSuccess:i=>{h.success("Project set up successfully"),n(!1),m({to:"/projects/$projectId/sessions/$sessionId",params:{projectId:i.projectId,sessionId:i.sessionId}})},onError:i=>{h.error(i instanceof Error?i.message:"Failed to set up project")}});return e.jsxs(q,{open:o,onOpenChange:n,children:[e.jsx(H,{asChild:!0,children:e.jsxs(l,{"data-testid":"new-project-button",children:[e.jsx(T,{className:"w-4 h-4 mr-2"}),e.jsx(s,{id:"project.new",message:"New Project"})]})}),e.jsxs($,{className:"max-w-2xl","data-testid":"new-project-modal",children:[e.jsxs(A,{children:[e.jsx(Q,{children:e.jsx(s,{id:"project.setup.title",message:"Setup New Project"})}),e.jsx(B,{children:e.jsx(s,{id:"project.setup.description",message:"Navigate to a directory to set up as a Claude Code project. If CLAUDE.md exists, the project will be described. Otherwise, <0>/init</0> will be run to initialize it.",components:{0:e.jsx("code",{className:"text-sm bg-muted px-1 py-0.5 rounded"})}})})]}),e.jsx("div",{className:"py-4",children:e.jsx(W,{onPathChange:d})}),e.jsxs(O,{children:[e.jsx(l,{variant:"outline",onClick:()=>n(!1),children:e.jsx(s,{id:"common.action.cancel",message:"Cancel"})}),e.jsx(l,{onClick:async()=>await r.mutateAsync(),disabled:!t||r.isPending,children:r.isPending?e.jsxs(e.Fragment,{children:[e.jsx(R,{className:"w-4 h-4 mr-2 animate-spin"}),e.jsx(s,{id:"project.setup.action.setting_up",message:"Setting up..."})]}):e.jsx(s,{id:"project.setup.action.setup",message:"Setup Project"})})]})]})]})},J=()=>e.jsxs("div",{className:"flex h-screen max-h-screen overflow-hidden",children:[e.jsx(G,{}),e.jsx("div",{className:"flex-1 overflow-auto",children:e.jsxs("div",{className:"container mx-auto px-4 py-8",children:[e.jsxs("header",{className:"mb-8",children:[e.jsxs("h1",{className:"text-3xl font-bold mb-2 flex items-center gap-2",children:[e.jsx(V,{className:"w-8 h-8"}),"Claude Code Viewer"]}),e.jsx("p",{className:"text-muted-foreground",children:e.jsx(s,{id:"projects.page.description",message:"Browse your Claude Code conversation history and project interactions"})})]}),e.jsx("main",{children:e.jsxs("section",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h2",{className:"text-xl font-semibold",children:e.jsx(s,{id:"projects.page.title",message:"Your Projects"})}),e.jsx(Y,{})]}),e.jsx(c.Suspense,{fallback:e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx("div",{className:"text-muted-foreground",children:e.jsx(s,{id:"projects.page.loading",message:"Loading projects..."})})}),children:e.jsx(U,{})})]})})]})})]});function ee(){return e.jsx(J,{})}export{ee as component};
|