ltcai 12.2.1 → 12.4.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/README.md +40 -33
- package/docs/CHANGELOG.md +65 -0
- package/docs/COMMUNITY_AND_PLUGINS.md +1 -1
- package/docs/DEVELOPMENT.md +11 -11
- package/docs/ONBOARDING.md +1 -1
- package/docs/OPERATIONS.md +1 -1
- package/docs/ROADMAP.md +1 -1
- package/docs/TRUST_MODEL.md +1 -1
- package/docs/WHY_LATTICE.md +1 -1
- package/docs/kg-schema.md +1 -1
- package/lattice_brain/__init__.py +1 -1
- package/latticeai/__init__.py +1 -1
- package/latticeai/core/embedding_providers/autodetect.py +0 -1
- package/latticeai/core/model_compat.py +2 -2
- package/latticeai/models/model_providers.py +12 -11
- package/latticeai/services/architecture_readiness.py +1 -1
- package/latticeai/services/model_capability_registry.py +79 -2
- package/latticeai/services/model_catalog.py +38 -12
- package/latticeai/services/model_engines.py +29 -15
- package/latticeai/services/model_runtime/download.py +53 -6
- package/latticeai/services/product_readiness.py +1 -1
- package/package.json +6 -8
- package/requirements.txt +3 -1
- package/scripts/check_current_release_docs.mjs +1 -1
- package/scripts/release_screen_claims.json +24 -0
- package/src-tauri/Cargo.lock +10 -10
- package/src-tauri/Cargo.toml +1 -1
- package/src-tauri/tauri.conf.json +1 -1
- package/static/app/asset-manifest.json +46 -47
- package/static/app/assets/Act-inLiZfDE.js +2 -0
- package/static/app/assets/AdminConsole-iLFwSJSg.js +1 -0
- package/static/app/assets/Brain-Cb7noiNc.js +2 -0
- package/static/app/assets/BrainHome-CfiJ4tau.js +2 -0
- package/static/app/assets/BrainSignals-ShxKNNqr.js +1 -0
- package/static/app/assets/Capture-Cajj1Trf.js +1 -0
- package/static/app/assets/Chronicle-CPd8GP_O.js +1 -0
- package/static/app/assets/CommandPalette-Cb_GWoYC.js +1 -0
- package/static/app/assets/DigitalBrainExplorer-Df6KVrBz.js +321 -0
- package/static/app/assets/Library-Dk5Mefl_.js +1 -0
- package/static/app/assets/LivingBrain-u9X_XGC2.js +1 -0
- package/static/app/assets/{ProductFlow-DeBGF6qz.js → ProductFlow-CpX0BMr9.js} +1 -1
- package/static/app/assets/{QueryClientProvider-B3OjqSyJ.js → QueryClientProvider-CTiSBeU6.js} +1 -1
- package/static/app/assets/ReviewCard-C64YFHOR.js +3 -0
- package/static/app/assets/RunsListPanel-DKZEJcxF.js +1 -0
- package/static/app/assets/System-Dretrknf.js +1 -0
- package/static/app/assets/WorkflowGraph-CE6XgWjJ.js +1 -0
- package/static/app/assets/WorkflowsPanel-MKU05J7_.js +2 -0
- package/static/app/assets/actHelpers-BjMnKMCI.js +1 -0
- package/static/app/assets/arrow-left-Cbck4Ig2.js +1 -0
- package/static/app/assets/{bot-Dm3fmXAE.js → bot-Qgvc2PGU.js} +1 -1
- package/static/app/assets/{brain-C2XwdQL1.js → brain-BwGnubn8.js} +1 -1
- package/static/app/assets/{button-xXPeemQr.js → button-DEloiIsj.js} +1 -1
- package/static/app/assets/circle-check-CDygnRMn.js +1 -0
- package/static/app/assets/{circle-pause-B_lmNicW.js → circle-pause-CkkmXxA9.js} +1 -1
- package/static/app/assets/{circle-play-DSYCP0RD.js → circle-play-rnb6A1zq.js} +1 -1
- package/static/app/assets/{cpu-D7x-dtxi.js → cpu-CzcGFQQq.js} +1 -1
- package/static/app/assets/{download-BHuJr-5V.js → download-BTQigJvp.js} +1 -1
- package/static/app/assets/{folder-open-BiO31EwS.js → folder-open-CIXPPhhm.js} +1 -1
- package/static/app/assets/{hard-drive-CFEaZ-wP.js → hard-drive-CZXxdIcT.js} +1 -1
- package/static/app/assets/index-CHQbWj9a.js +13 -0
- package/static/app/assets/index-C_dThdD6.css +2 -0
- package/static/app/assets/{input-D3YrgxvO.js → input-CTZHuOXe.js} +1 -1
- package/static/app/assets/jsx-runtime-CU_pEDDh.js +1 -0
- package/static/app/assets/{link-2-3O-By3qc.js → link-2-BsG1NQUA.js} +1 -1
- package/static/app/assets/{permissionCopy-CNK2tfkz.js → permissionCopy-klyWL3ai.js} +1 -1
- package/static/app/assets/primitives-ZmN4jzq-.js +1 -0
- package/static/app/assets/search-xjKVb4Nh.js +1 -0
- package/static/app/assets/{share-2-BljIPAku.js → share-2-Cuv9rj7A.js} +1 -1
- package/static/app/assets/{shield-alert-WDP2DSTM.js → shield-alert-KKySFd03.js} +1 -1
- package/static/app/assets/{textarea-5v8vtDlK.js → textarea-CBwqgGSA.js} +1 -1
- package/static/app/assets/useFocusTrap-D93vds_Z.js +1 -0
- package/static/app/assets/{useMutation-Bi0PXQMC.js → useMutation-B9hHPD0p.js} +1 -1
- package/static/app/assets/{workspace-BsxrRYQI.js → workspace-JGzrc0D8.js} +1 -1
- package/static/app/index.html +4 -4
- package/static/sw.js +1 -1
- package/static/app/assets/Act-DC676bqE.js +0 -2
- package/static/app/assets/AdminConsole-aCxQgD2L.js +0 -1
- package/static/app/assets/Brain-Dbd0xvsc.js +0 -2
- package/static/app/assets/BrainHome-N00B-MAJ.js +0 -2
- package/static/app/assets/BrainSignals-CNA0d6xS.js +0 -1
- package/static/app/assets/Capture-BB19fo7P.js +0 -1
- package/static/app/assets/Chronicle-D8p3dqxZ.js +0 -1
- package/static/app/assets/CommandPalette-uVFYAa-6.js +0 -1
- package/static/app/assets/DigitalBrainExplorer-mH6ZSuvK.js +0 -321
- package/static/app/assets/Library-0q8Sdke7.js +0 -1
- package/static/app/assets/LivingBrain-wess-qJZ.js +0 -1
- package/static/app/assets/ReviewCard-DyTrDpy0.js +0 -3
- package/static/app/assets/RunsListPanel-CHJv2Qyw.js +0 -1
- package/static/app/assets/System-CyKGHQrW.js +0 -1
- package/static/app/assets/WorkflowGraph-B5nKCCGa.js +0 -1
- package/static/app/assets/WorkflowsPanel-C7RZNRGo.js +0 -2
- package/static/app/assets/actHelpers-6MYDH2kW.js +0 -1
- package/static/app/assets/arrow-left-DOnpwsVV.js +0 -1
- package/static/app/assets/circle-check-D44VI2ZE.js +0 -1
- package/static/app/assets/index-C8gwOf0C.css +0 -2
- package/static/app/assets/index-DCT79wzR.js +0 -13
- package/static/app/assets/jsx-runtime-bzQ4Vb5N.js +0 -1
- package/static/app/assets/primitives-B6DzQC3H.js +0 -1
- package/static/app/assets/search-BwMK0hjs.js +0 -1
- package/static/app/assets/sourceMeta-By2WIjlN.js +0 -1
- package/static/app/assets/useFocusTrap-ssiDeh6P.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,n as t,t as n}from"./jsx-runtime-CU_pEDDh.js";import{A as r,H as i,R as a,S as o,d as s,j as c,o as l,v as u,w as d,z as f}from"./index-CHQbWj9a.js";import{c as p,o as m,r as h,y as g}from"./primitives-ZmN4jzq-.js";import{t as _}from"./link-2-BsG1NQUA.js";var v=a(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),y=a(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),b=e(t());d({ko:{"chronicle.kicker":`기억의 연대기`,"chronicle.title":`두뇌가 자라온 시간`,"chronicle.copy":`언제 무엇이 들어왔고 무엇이 달라졌는지, 날짜로 되짚어 봅니다.`,"chronicle.loading":`연대기를 불러오는 중입니다.`,"chronicle.empty.title":`오늘부터 기록이 쌓입니다`,"chronicle.empty.detail":`자료를 넣거나 대화를 나누면, 그날부터 이 자리에 하루하루가 남습니다.`,"chronicle.lane.sources":`자료`,"chronicle.lane.entities":`개념`,"chronicle.lane.connections":`연결`,"chronicle.lane.conversations":`대화`,"chronicle.growth.title":`쌓인 기억`,"chronicle.growth.hint":`손잡이를 좌우로 옮기면 그 시점으로 돌아갑니다. 방향키로도 하루씩 움직일 수 있어요.`,"chronicle.growth.aria":`시점 고르기`,"chronicle.growth.valueText":`{date} · 자료 {sources} · 개념 {entities} · 연결 {connections} · 대화 {conversations}`,"chronicle.growth.first":`처음`,"chronicle.growth.latest":`지금`,"chronicle.heatmap.title":`활동 달력`,"chronicle.heatmap.hint":`진한 칸일수록 그날 많이 쌓였다는 뜻이에요. 칸을 누르면 그날 이야기가 아래에 열립니다.`,"chronicle.heatmap.aria":`날짜별 활동`,"chronicle.heatmap.cell":`{date}, {count}가지`,"chronicle.heatmap.cellEmpty":`{date}, 쌓인 것 없음`,"chronicle.heatmap.less":`적음`,"chronicle.heatmap.more":`많음`,"chronicle.weekday.sun":`일`,"chronicle.weekday.mon":`월`,"chronicle.weekday.tue":`화`,"chronicle.weekday.wed":`수`,"chronicle.weekday.thu":`목`,"chronicle.weekday.fri":`금`,"chronicle.weekday.sat":`토`,"chronicle.day.title":`그날의 이야기`,"chronicle.day.loading":`그날 이야기를 불러오는 중입니다.`,"chronicle.day.quiet":`이 날은 조용했습니다. 남은 기록이 없어요.`,"chronicle.group.sources":`자료`,"chronicle.group.entities":`새로 생긴 개념`,"chronicle.group.conversations":`나눈 대화`,"chronicle.group.changes":`달라진 사실`,"chronicle.group.count":`{count}개`,"chronicle.group.empty":`이 날은 없어요.`,"chronicle.group.more":`이 밖에 {count}개가 더 있어요.`,"chronicle.open.source":`기억에서 찾아보기`,"chronicle.open.entity":`지도에서 보기`,"chronicle.open.conversation":`대화로 가기`,"chronicle.open.change":`지도에서 보기`,"chronicle.sourceType.upload":`올린 파일`,"chronicle.sourceType.note":`메모`,"chronicle.sourceType.web_url":`웹 페이지`,"chronicle.sourceType.conversation":`대화`,"chronicle.sourceType.local_file":`내 컴퓨터 파일`,"chronicle.sourceType.image":`그림`,"chronicle.sourceType.other":`자료`,"chronicle.entityType.other":`개념`,"chronicle.conversation.untitled":`제목 없는 대화`,"chronicle.conversation.messages":`{count}번 주고받음`,"chronicle.change.fact_superseded":`새 내용으로 바뀐 사실`,"chronicle.change.fact_retired":`더 이상 사실이 아닌 것`,"chronicle.change.connection_superseded":`다시 이어진 관계`,"chronicle.change.connection_ended":`끊어진 관계`,"chronicle.change.other":`달라진 것`,"chronicle.rewind.title":`그때의 두뇌`,"chronicle.rewind.subtitle":`{date}에 두뇌가 알고 있던 것`,"chronicle.rewind.loading":`그때 모습을 불러오는 중입니다.`,"chronicle.rewind.entities":`기억 조각`,"chronicle.rewind.connections":`이어진 관계`,"chronicle.rewind.note":`여기 두 숫자는 그때 저장돼 있던 모든 것을 셉니다. 위 곡선의 ‘개념’과는 세는 방식이 달라요.`,"chronicle.rewind.top":`그때 중요했던 개념`,"chronicle.rewind.topEmpty":`그때는 아직 눈에 띄는 개념이 없었어요.`,"chronicle.rewind.reset":`지금으로 돌아오기`},en:{"chronicle.kicker":`Brain Chronicle`,"chronicle.title":`How your Brain grew`,"chronicle.copy":`Walk back through what arrived, and what changed, one day at a time.`,"chronicle.loading":`Loading the chronicle.`,"chronicle.empty.title":`The record starts today`,"chronicle.empty.detail":`Add something or have a conversation, and that day will show up right here.`,"chronicle.lane.sources":`Sources`,"chronicle.lane.entities":`Ideas`,"chronicle.lane.connections":`Links`,"chronicle.lane.conversations":`Chats`,"chronicle.growth.title":`What has piled up`,"chronicle.growth.hint":`Drag the handle to travel back to that moment. Arrow keys move a day at a time.`,"chronicle.growth.aria":`Pick a moment`,"chronicle.growth.valueText":`{date} · {sources} sources · {entities} ideas · {connections} links · {conversations} chats`,"chronicle.growth.first":`First`,"chronicle.growth.latest":`Now`,"chronicle.heatmap.title":`Activity calendar`,"chronicle.heatmap.hint":`A darker square means more arrived that day. Pick one and its story opens below.`,"chronicle.heatmap.aria":`Activity by day`,"chronicle.heatmap.cell":`{date}, {count} things`,"chronicle.heatmap.cellEmpty":`{date}, nothing arrived`,"chronicle.heatmap.less":`Less`,"chronicle.heatmap.more":`More`,"chronicle.weekday.sun":`Sun`,"chronicle.weekday.mon":`Mon`,"chronicle.weekday.tue":`Tue`,"chronicle.weekday.wed":`Wed`,"chronicle.weekday.thu":`Thu`,"chronicle.weekday.fri":`Fri`,"chronicle.weekday.sat":`Sat`,"chronicle.day.title":`That day's story`,"chronicle.day.loading":`Loading that day.`,"chronicle.day.quiet":`A quiet day — nothing was recorded.`,"chronicle.group.sources":`Sources`,"chronicle.group.entities":`New ideas`,"chronicle.group.conversations":`Conversations`,"chronicle.group.changes":`What changed`,"chronicle.group.count":`{count}`,"chronicle.group.empty":`Nothing this day.`,"chronicle.group.more":`And {count} more.`,"chronicle.open.source":`Find it in memory`,"chronicle.open.entity":`See it on the map`,"chronicle.open.conversation":`Go to conversations`,"chronicle.open.change":`See it on the map`,"chronicle.sourceType.upload":`Uploaded file`,"chronicle.sourceType.note":`Note`,"chronicle.sourceType.web_url":`Web page`,"chronicle.sourceType.conversation":`Conversation`,"chronicle.sourceType.local_file":`File on this computer`,"chronicle.sourceType.image":`Picture`,"chronicle.sourceType.other":`Source`,"chronicle.entityType.other":`Idea`,"chronicle.conversation.untitled":`Untitled conversation`,"chronicle.conversation.messages":`{count} messages`,"chronicle.change.fact_superseded":`Replaced by newer wording`,"chronicle.change.fact_retired":`No longer true`,"chronicle.change.connection_superseded":`Relinked a different way`,"chronicle.change.connection_ended":`Link ended`,"chronicle.change.other":`Changed`,"chronicle.rewind.title":`Your Brain back then`,"chronicle.rewind.subtitle":`What it knew on {date}`,"chronicle.rewind.loading":`Loading how it looked then.`,"chronicle.rewind.entities":`Pieces of memory`,"chronicle.rewind.connections":`Links between them`,"chronicle.rewind.note":`These two count everything stored at that moment. That is a different measure from the “ideas” line in the curve above.`,"chronicle.rewind.top":`What mattered most then`,"chronicle.rewind.topEmpty":`Nothing stood out yet at that point.`,"chronicle.rewind.reset":`Back to now`}});var x=n(),S=[`chronicle.weekday.sun`,`chronicle.weekday.mon`,`chronicle.weekday.tue`,`chronicle.weekday.wed`,`chronicle.weekday.thu`,`chronicle.weekday.fri`,`chronicle.weekday.sat`];function C({weeks:e,selectedDate:t,onSelect:n,language:r}){return(0,x.jsxs)(`section`,{className:`chronicle-panel chronicle-heatmap`,"data-testid":`chronicle-heatmap`,children:[(0,x.jsxs)(`header`,{className:`chronicle-panel-head`,children:[(0,x.jsx)(`h2`,{className:`chronicle-panel-title`,children:o(r,`chronicle.heatmap.title`)}),(0,x.jsx)(`p`,{className:`chronicle-panel-hint`,children:o(r,`chronicle.heatmap.hint`)})]}),(0,x.jsxs)(`div`,{className:`chronicle-heatmap-scroll`,children:[(0,x.jsx)(`div`,{className:`chronicle-heatmap-weekdays`,"aria-hidden":`true`,children:S.map(e=>(0,x.jsx)(`span`,{children:o(r,e)},e))}),(0,x.jsx)(`div`,{className:`chronicle-heatmap-grid`,role:`group`,"aria-label":o(r,`chronicle.heatmap.aria`),children:e.map(e=>(0,x.jsx)(`div`,{className:`chronicle-heatmap-week`,children:e.cells.map((i,a)=>i?(0,x.jsx)(`button`,{type:`button`,className:`chronicle-heatmap-cell`,"data-level":i.level,"data-testid":`chronicle-heatmap-cell`,"aria-pressed":i.date===t,"aria-label":o(r,i.daily>0?`chronicle.heatmap.cell`:`chronicle.heatmap.cellEmpty`,{date:i.date,count:s(i.daily)}),onClick:()=>n(i.date)},i.date):(0,x.jsx)(`span`,{className:`chronicle-heatmap-cell is-blank`,"aria-hidden":`true`},`${e.key}-${a}`))},e.key))})]}),(0,x.jsxs)(`p`,{className:`chronicle-heatmap-legend`,children:[(0,x.jsx)(`span`,{children:o(r,`chronicle.heatmap.less`)}),(0,x.jsx)(`span`,{className:`chronicle-heatmap-swatches`,"aria-hidden":`true`,children:[0,1,2,3,4].map(e=>(0,x.jsx)(`span`,{className:`chronicle-heatmap-cell`,"data-level":e},e))}),(0,x.jsx)(`span`,{children:o(r,`chronicle.heatmap.more`)})]})]})}var w=864e5,T=/^(\d{4})-(\d{2})-(\d{2})$/;function E(e){let t=T.exec(e);if(!t)return null;let n=Date.UTC(Number(t[1]),Number(t[2])-1,Number(t[3]));return D(n)===e?n:null}function D(e){return new Date(e).toISOString().slice(0,10)}function O(e){let t=E(e);return t===null?0:new Date(t).getUTCDay()}function k(e){let t=new Map;for(let n of e){let e=E(n.date);e!==null&&t.set(D(e),n)}let n=[...t.keys()].sort();if(!n.length)return[];let r=E(n[0]),i=E(n[n.length-1]),a=[],o=0,s=0,c=0,l=0;for(let e=r;e<=i;e+=w){let n=D(e),r=t.get(n),i=r?A(r.sources)+A(r.entities)+A(r.connections)+A(r.conversations):0;r&&(o+=A(r.sources),s+=A(r.entities),c+=A(r.connections),l+=A(r.conversations)),a.push({date:n,sources:o,entities:s,connections:c,conversations:l,total:o+s+c+l,daily:i})}return a}function A(e){return typeof e==`number`&&Number.isFinite(e)?e:0}function j(e,t){if(e<=0)return 0;if(t<=0)return 1;let n=e/t;return n>.66?4:n>.33?3:n>.12?2:1}function M(e){if(!e.length)return[];let t=e.reduce((e,t)=>Math.max(e,t.daily),0),n=E(e[0].date),r=E(e[e.length-1].date),i=n-O(e[0].date)*w,a=r+(6-O(e[e.length-1].date))*w,o=new Map(e.map(e=>[e.date,e.daily])),s=[];for(let e=i;e<=a;e+=7*w){let n=[];for(let r=0;r<7;r+=1){let i=D(e+r*w),a=o.get(i);n.push(a===void 0?null:{date:i,daily:a,level:j(a,t)})}s.push({key:D(e),cells:n})}return s}function N(e,t,n){if(!e.length)return{area:``,line:``};let r=e[e.length-1].total,i=Math.max(e.length-1,1),a=e.map((e,a)=>({x:a/i*t,y:n-(r>0?e.total/r*n:0)})),o=[`M ${P(a[0].x)} ${P(a[0].y)}`];for(let e=1;e<a.length;e+=1)o.push(`L ${P(a[e].x)} ${P(a[e-1].y)}`),o.push(`L ${P(a[e].x)} ${P(a[e].y)}`);let s=o.join(` `);return{area:`${s} ${`L ${P(a[a.length-1].x)} ${n} L ${P(a[0].x)} ${n} Z`}`,line:s}}function P(e){return Math.round(e*100)/100}function F(e){return`${e}T23:59:59`}var I=8,L=`/hybrid-search`,R=`/knowledge-graph`,z=`/brain`;function B({day:e,loading:t,language:n}){let r=(0,x.jsxs)(`header`,{className:`chronicle-panel-head`,children:[(0,x.jsx)(`h2`,{className:`chronicle-panel-title`,children:o(n,`chronicle.day.title`)}),(0,x.jsx)(`p`,{className:`chronicle-panel-hint`,"data-testid":`chronicle-day-date`,children:e?e.date:``})]});if(t||!e)return(0,x.jsxs)(`section`,{className:`chronicle-panel chronicle-day`,"data-testid":`chronicle-day`,children:[r,(0,x.jsx)(`p`,{className:`chronicle-note`,role:`status`,children:o(n,`chronicle.day.loading`)})]});let i=e.counts.sources+e.counts.entities+e.counts.conversations+e.counts.changes;return(0,x.jsxs)(`section`,{className:`chronicle-panel chronicle-day`,"data-testid":`chronicle-day`,children:[r,i===0?(0,x.jsx)(`p`,{className:`chronicle-note`,"data-testid":`chronicle-day-quiet`,children:o(n,`chronicle.day.quiet`)}):(0,x.jsxs)(`div`,{className:`chronicle-day-groups`,children:[(0,x.jsx)(V,{titleKey:`chronicle.group.sources`,icon:(0,x.jsx)(v,{"aria-hidden":`true`}),count:e.counts.sources,items:H(e,n),language:n}),(0,x.jsx)(V,{titleKey:`chronicle.group.entities`,icon:(0,x.jsx)(g,{"aria-hidden":`true`}),count:e.counts.entities,items:U(e,n),language:n}),(0,x.jsx)(V,{titleKey:`chronicle.group.conversations`,icon:(0,x.jsx)(y,{"aria-hidden":`true`}),count:e.counts.conversations,items:W(e,n),language:n}),(0,x.jsx)(V,{titleKey:`chronicle.group.changes`,icon:(0,x.jsx)(_,{"aria-hidden":`true`}),count:e.counts.changes,items:G(e,n),language:n})]})]})}function V({titleKey:e,icon:t,count:n,items:r,language:i}){let a=r.slice(0,I),c=Math.max(n-a.length,0);return(0,x.jsxs)(`article`,{className:`chronicle-group`,"data-testid":`chronicle-group`,children:[(0,x.jsxs)(`h3`,{className:`chronicle-group-title`,children:[(0,x.jsx)(`span`,{className:`chronicle-group-icon`,children:t}),o(i,e),(0,x.jsx)(`span`,{className:`chronicle-group-count`,children:o(i,`chronicle.group.count`,{count:s(n)})})]}),a.length===0?(0,x.jsx)(`p`,{className:`chronicle-group-empty`,children:o(i,`chronicle.group.empty`)}):(0,x.jsx)(`ul`,{className:`chronicle-group-list`,children:a.map(e=>(0,x.jsx)(`li`,{children:(0,x.jsxs)(`button`,{type:`button`,className:`chronicle-item`,"aria-label":`${e.title} — ${e.openLabel}`,onClick:()=>l(e.target),children:[(0,x.jsx)(`span`,{className:`chronicle-item-title`,children:e.title}),(0,x.jsx)(`span`,{className:`chronicle-item-meta`,children:e.meta})]})},e.key))}),c>0?(0,x.jsx)(`p`,{className:`chronicle-group-more`,children:o(i,`chronicle.group.more`,{count:s(c)})}):null]})}function H(e,t){let n=o(t,`chronicle.open.source`);return e.groups.sources.map(e=>({key:e.id,title:e.title,meta:q(e.source_type,t),target:L,openLabel:n}))}function U(e,t){let n=o(t,`chronicle.open.entity`);return e.groups.entities.map(e=>({key:e.id,title:e.label,meta:J(e.type,t),target:R,openLabel:n}))}function W(e,t){let n=o(t,`chronicle.open.conversation`);return e.groups.conversations.map((e,r)=>({key:e.conversation_id||`loose-${r}`,title:e.preview||o(t,`chronicle.conversation.untitled`),meta:o(t,`chronicle.conversation.messages`,{count:s(e.messages)}),target:z,openLabel:n}))}function G(e,t){let n=o(t,`chronicle.open.change`);return e.groups.changes.map((e,r)=>({key:`${e.node_id}-${r}`,title:e.label,meta:X(e.kind,t),target:R,openLabel:n}))}var K={upload:`chronicle.sourceType.upload`,note:`chronicle.sourceType.note`,web_url:`chronicle.sourceType.web_url`,conversation:`chronicle.sourceType.conversation`,local_file:`chronicle.sourceType.local_file`,image:`chronicle.sourceType.image`};function q(e,t){return o(t,K[e]||`chronicle.sourceType.other`)}function J(e,t){let n=`ui.entity.${e}`,r=o(t,n);return r===n?o(t,`chronicle.entityType.other`):r}var Y={fact_superseded:`chronicle.change.fact_superseded`,fact_retired:`chronicle.change.fact_retired`,connection_superseded:`chronicle.change.connection_superseded`,connection_ended:`chronicle.change.connection_ended`};function X(e,t){return o(t,Y[e]||`chronicle.change.other`)}var Z=1e3,Q=220,ee=7;function te({timeline:e,index:t,onIndexChange:n,language:r}){let[i,a]=b.useState(null),c=Math.max(e.length-1,0),l=e[t],u=b.useMemo(()=>N(e,Z,Q),[e]),d=c>0?t/c*100:100,f=b.useCallback((e,t)=>{let r=t.getBoundingClientRect();if(r.width<=0)return;let i=(e-r.left)/r.width;n(Math.round(Math.min(Math.max(i,0),1)*c))},[c,n]);b.useEffect(()=>{if(!i)return;let e=e=>f(e.clientX,i),t=()=>a(null);return window.addEventListener(`pointermove`,e),window.addEventListener(`pointerup`,t),window.addEventListener(`pointercancel`,t),()=>{window.removeEventListener(`pointermove`,e),window.removeEventListener(`pointerup`,t),window.removeEventListener(`pointercancel`,t)}},[i,f]);let p=e=>{let r=ne(e.key,t,c);r!==null&&(e.preventDefault(),n(r))},m=l?o(r,`chronicle.growth.valueText`,{date:l.date,sources:s(l.sources),entities:s(l.entities),connections:s(l.connections),conversations:s(l.conversations)}):o(r,`chronicle.growth.aria`);return(0,x.jsxs)(`section`,{className:`chronicle-panel chronicle-growth`,"data-testid":`chronicle-growth`,children:[(0,x.jsxs)(`header`,{className:`chronicle-panel-head`,children:[(0,x.jsx)(`h2`,{className:`chronicle-panel-title`,children:o(r,`chronicle.growth.title`)}),(0,x.jsx)(`p`,{className:`chronicle-panel-hint`,children:o(r,`chronicle.growth.hint`)})]}),(0,x.jsxs)(`div`,{className:`chronicle-growth-plot`,children:[(0,x.jsxs)(`svg`,{className:`chronicle-growth-chart`,viewBox:`0 0 ${Z} ${Q}`,preserveAspectRatio:`none`,"aria-hidden":`true`,children:[(0,x.jsx)(`path`,{className:`chronicle-growth-area`,d:u.area}),(0,x.jsx)(`path`,{className:`chronicle-growth-line`,d:u.line,vectorEffect:`non-scaling-stroke`})]}),(0,x.jsxs)(`div`,{className:`chronicle-growth-track${i?` is-dragging`:``}`,"data-testid":`chronicle-scrubber`,role:`slider`,tabIndex:0,"aria-label":o(r,`chronicle.growth.aria`),"aria-valuemin":0,"aria-valuemax":c,"aria-valuenow":t,"aria-valuetext":m,onKeyDown:p,onPointerDown:e=>{a(e.currentTarget),f(e.clientX,e.currentTarget)},children:[(0,x.jsx)(`span`,{className:`chronicle-growth-marker`,style:{left:`${d}%`},"aria-hidden":`true`}),(0,x.jsx)(`span`,{className:`chronicle-growth-handle`,style:{left:`${d}%`},"aria-hidden":`true`})]})]}),(0,x.jsxs)(`div`,{className:`chronicle-growth-axis`,children:[(0,x.jsx)(`span`,{children:o(r,`chronicle.growth.first`)}),(0,x.jsx)(`strong`,{"data-testid":`chronicle-scrubber-date`,children:l?l.date:o(r,`chronicle.growth.latest`)}),(0,x.jsx)(`span`,{children:o(r,`chronicle.growth.latest`)})]}),(0,x.jsxs)(`dl`,{className:`chronicle-lane-row`,children:[(0,x.jsx)($,{labelKey:`chronicle.lane.sources`,value:l?.sources,language:r}),(0,x.jsx)($,{labelKey:`chronicle.lane.entities`,value:l?.entities,language:r}),(0,x.jsx)($,{labelKey:`chronicle.lane.connections`,value:l?.connections,language:r}),(0,x.jsx)($,{labelKey:`chronicle.lane.conversations`,value:l?.conversations,language:r})]})]})}function $({labelKey:e,value:t,language:n}){return(0,x.jsxs)(`div`,{className:`chronicle-lane`,children:[(0,x.jsx)(`dt`,{children:o(n,e)}),(0,x.jsx)(`dd`,{children:s(t)})]})}function ne(e,t,n){let r={ArrowLeft:-1,ArrowDown:-1,ArrowRight:1,ArrowUp:1,PageDown:-7,PageUp:ee};if(e===`Home`)return 0;if(e===`End`)return n;let i=r[e];return i===void 0?null:Math.min(Math.max(t+i,0),n)}function re({asOf:e,date:t,loading:n,onReset:i,language:a}){return(0,x.jsxs)(`section`,{className:`chronicle-panel chronicle-rewind`,"data-testid":`chronicle-rewind`,children:[(0,x.jsxs)(`header`,{className:`chronicle-panel-head`,children:[(0,x.jsx)(`h2`,{className:`chronicle-panel-title`,children:o(a,`chronicle.rewind.title`)}),(0,x.jsx)(`p`,{className:`chronicle-panel-hint`,children:o(a,`chronicle.rewind.subtitle`,{date:t})}),(0,x.jsxs)(`button`,{type:`button`,className:`chronicle-reset`,onClick:i,children:[(0,x.jsx)(r,{"aria-hidden":`true`}),o(a,`chronicle.rewind.reset`)]})]}),n||!e?(0,x.jsx)(`p`,{className:`chronicle-note`,role:`status`,children:o(a,`chronicle.rewind.loading`)}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`dl`,{className:`chronicle-lane-row chronicle-rewind-stats`,children:[(0,x.jsxs)(`div`,{className:`chronicle-lane`,children:[(0,x.jsx)(`dt`,{children:o(a,`chronicle.rewind.entities`)}),(0,x.jsx)(`dd`,{"data-testid":`chronicle-rewind-entities`,children:s(e.stats.entities)})]}),(0,x.jsxs)(`div`,{className:`chronicle-lane`,children:[(0,x.jsx)(`dt`,{children:o(a,`chronicle.rewind.connections`)}),(0,x.jsx)(`dd`,{children:s(e.stats.connections)})]})]}),(0,x.jsx)(`p`,{className:`chronicle-note chronicle-rewind-note`,children:o(a,`chronicle.rewind.note`)}),(0,x.jsx)(`h3`,{className:`chronicle-group-title`,children:o(a,`chronicle.rewind.top`)}),e.top_entities.length===0?(0,x.jsx)(`p`,{className:`chronicle-group-empty`,children:o(a,`chronicle.rewind.topEmpty`)}):(0,x.jsx)(`ul`,{className:`chronicle-group-list chronicle-rewind-list`,children:e.top_entities.map(e=>(0,x.jsx)(`li`,{children:(0,x.jsxs)(`button`,{type:`button`,className:`chronicle-item`,"aria-label":`${e.label} — ${o(a,`chronicle.open.entity`)}`,onClick:()=>l(`/knowledge-graph`),children:[(0,x.jsx)(`span`,{className:`chronicle-item-title`,children:e.label}),(0,x.jsx)(`span`,{className:`chronicle-item-meta`,children:J(e.type,a)})]})},e.id))})]})]})}function ie(){let e=f(e=>e.language),t=i({queryKey:[`chronicleOverview`],queryFn:u.chronicleOverview}),n=t.data,r=n?.data,a=b.useMemo(()=>k(r?.series??[]),[r]),s=b.useMemo(()=>M(a),[a]),[l,d]=b.useState(null),g=Math.max(a.length-1,0),_=l===null?-1:a.findIndex(e=>e.date===l),v=_>=0?_:g,y=a[v],S=y?y.date:``,w=!!y&&v<g,T=i({queryKey:[`chronicleDay`,S],queryFn:()=>u.chronicleDay(S),enabled:S!==``}),E=i({queryKey:[`chronicleAsOf`,S],queryFn:()=>u.chronicleAsOf(F(S)),enabled:w});return(0,x.jsxs)(`div`,{className:`product-page chronicle-page`,"data-testid":`page-chronicle`,children:[(0,x.jsxs)(`header`,{className:`page-hero`,children:[(0,x.jsxs)(`div`,{className:`page-kicker`,children:[(0,x.jsx)(c,{className:`h-4 w-4`}),` `,o(e,`chronicle.kicker`)]}),(0,x.jsx)(`h1`,{className:`page-title`,children:o(e,`chronicle.title`)}),(0,x.jsx)(`p`,{className:`page-copy`,children:o(e,`chronicle.copy`)})]}),t.isLoading?(0,x.jsx)(m,{title:o(e,`chronicle.loading`)}):n&&!n.ok?(0,x.jsx)(p,{result:n}):a.length===0?(0,x.jsx)(h,{title:o(e,`chronicle.empty.title`),detail:o(e,`chronicle.empty.detail`)}):(0,x.jsxs)(`div`,{className:`chronicle-stack`,children:[(0,x.jsx)(te,{timeline:a,index:v,onIndexChange:e=>d(a[e].date),language:e}),(0,x.jsx)(C,{weeks:s,selectedDate:S,onSelect:d,language:e}),w?(0,x.jsx)(re,{asOf:E.data?.data??null,date:S,loading:E.isPending,onReset:()=>d(null),language:e}):null,(0,x.jsx)(B,{day:T.data?.data??null,loading:T.isPending,language:e})]})]})}export{ie as ChroniclePage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,n as t,t as n}from"./jsx-runtime-CU_pEDDh.js";import{H as r,M as i,P as a,R as o,S as s,T as c,c as l,o as u,v as d}from"./index-CHQbWj9a.js";import{t as f}from"./bot-Qgvc2PGU.js";import{t as p}from"./search-xjKVb4Nh.js";import{n as m,t as h}from"./useFocusTrap-D93vds_Z.js";var g=o(`command`,[[`path`,{d:`M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3`,key:`11bfej`}]]),_=o(`corner-down-left`,[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]),v=o(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),y=e(t()),b=n(),x=c.map(e=>{let t=e.icon;return{...e,icon:(0,b.jsx)(t,{className:`h-4 w-4`})}});function S(e,t){let[n,r]=y.useState(e);return y.useEffect(()=>{let n=window.setTimeout(()=>r(e),t);return()=>window.clearTimeout(n)},[e,t]),n}function C({language:e,initialOpen:t=!1}){let[n,o]=y.useState(t),[c,C]=y.useState(``),[w,T]=y.useState(0),E=y.useRef(null),D=S(c.trim(),220);y.useEffect(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),o(e=>!e))},t=()=>o(!0);return window.addEventListener(`keydown`,e),window.addEventListener(`lattice:open-command`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`lattice:open-command`,t)}},[]),y.useEffect(()=>{n&&(C(``),T(0),window.setTimeout(()=>E.current?.focus(),0))},[n]);let O=r({queryKey:[`commandSearch`,D],queryFn:()=>d.commandSearch(D),enabled:n&&D.length>0}),k=r({queryKey:[`commandBriefing`],queryFn:d.commandBriefing,enabled:n,staleTime:6e4}),A=y.useMemo(()=>{let t=c.trim().toLowerCase(),n=[];if(!t&&k.data?.ok){let t=(k.data.data||{}).sections||{},r=t.review||{},a=t.suggestions||{},o=Number(a.count??0)||0,c=Number(r.pending??0)||0;n.push({id:`proactive-briefing`,group:`proactive`,title:s(e,`command.proactive.briefing`),detail:o>0?s(e,`command.proactive.suggestions`,{count:o}):void 0,icon:(0,b.jsx)(m,{className:`h-4 w-4`}),target:`/brain`,action:`open-briefing`}),n.push({id:`proactive-review`,group:`proactive`,title:s(e,`command.proactive.review`),detail:c>0?s(e,`command.proactive.pending`,{count:c}):void 0,icon:(0,b.jsx)(i,{className:`h-4 w-4`}),target:`/act/review`}),n.push({id:`proactive-ask`,group:`proactive`,title:s(e,`briefing.action.askBrain`),icon:(0,b.jsx)(v,{className:`h-4 w-4`}),target:`/brain`})}let r=x.map(t=>({id:t.id,group:`pages`,title:s(e,t.labelKey),icon:t.icon,target:t.target})).filter(e=>!t||e.title.toLowerCase().includes(t)),o=l(O.data?.data?.groups),u=[];for(let t of o)for(let n of l(t.items))t.kind===`knowledge`?u.push({id:`kg-${String(n.id??u.length)}`,group:`knowledge`,title:String(n.title||n.id||``),detail:String(n.summary||n.type||``),icon:(0,b.jsx)(a,{className:`h-4 w-4`}),target:`/brain/graph`}):t.kind===`conversation`?u.push({id:`conv-${String(n.conversation_id??u.length)}`,group:`conversation`,title:String(n.snippet||``),detail:String(n.timestamp||``).slice(0,10),icon:(0,b.jsx)(v,{className:`h-4 w-4`}),target:`/brain`}):t.kind===`automation`&&u.push({id:`wf-${String(n.id??u.length)}`,group:`automation`,title:String(n.name||``),detail:n.enabled?s(e,`command.automation.enabled`):s(e,`command.automation.draft`),icon:(0,b.jsx)(f,{className:`h-4 w-4`}),target:`/act/workflows`});return[...n,...u,...r]},[e,c,O.data,k.data]);y.useEffect(()=>{T(0)},[A.length,D]);let j=y.useCallback(()=>o(!1),[]),M=h(j,n),N=y.useCallback(e=>{e&&(j(),u(e.target),e.action===`open-briefing`&&window.dispatchEvent(new Event(`lattice:open-briefing`)))},[j]),P=e=>{e.key===`Escape`?(e.preventDefault(),j()):e.key===`ArrowDown`?(e.preventDefault(),T(e=>Math.min(e+1,Math.max(A.length-1,0)))):e.key===`ArrowUp`?(e.preventDefault(),T(e=>Math.max(e-1,0))):e.key===`Enter`&&(e.preventDefault(),N(A[w]))};if(!n)return null;let F={proactive:s(e,`command.proactive.title`),pages:s(e,`command.group.pages`),knowledge:s(e,`command.group.knowledge`),conversation:s(e,`command.group.conversation`),automation:s(e,`command.group.automation`)},I=null;return(0,b.jsx)(`div`,{className:`command-palette-backdrop`,role:`presentation`,onMouseDown:e=>{e.target===e.currentTarget&&j()},children:(0,b.jsxs)(`div`,{ref:M,className:`command-palette`,role:`dialog`,"aria-modal":`true`,"aria-label":s(e,`command.title`),"data-testid":`command-palette`,children:[(0,b.jsxs)(`div`,{className:`command-palette-input`,children:[(0,b.jsx)(p,{className:`h-4 w-4`,"aria-hidden":`true`}),(0,b.jsx)(`input`,{ref:E,value:c,onChange:e=>C(e.target.value),onKeyDown:P,placeholder:s(e,`command.placeholder`),"aria-label":s(e,`command.title`),autoComplete:`off`,spellCheck:!1}),(0,b.jsxs)(`span`,{className:`command-palette-hint`,"aria-hidden":`true`,children:[(0,b.jsx)(g,{className:`h-3 w-3`}),s(e,`command.shortcutKey`)]})]}),(0,b.jsxs)(`div`,{className:`command-palette-results`,role:`listbox`,"aria-label":s(e,`command.results`),children:[O.isFetching?(0,b.jsx)(`p`,{className:`command-palette-note`,children:s(e,`command.searching`)}):null,A.length===0&&!O.isFetching?(0,b.jsx)(`p`,{className:`command-palette-note`,children:s(e,`command.empty`)}):null,A.map((e,t)=>{let n=e.group===I?null:(0,b.jsx)(`p`,{className:`command-palette-group`,children:F[e.group]},`h-${e.group}`);return I=e.group,(0,b.jsxs)(y.Fragment,{children:[n,(0,b.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t===w,className:`command-palette-item ${t===w?`is-active`:``}`,onMouseEnter:()=>T(t),onClick:()=>N(e),children:[e.icon,(0,b.jsx)(`span`,{className:`command-palette-item-title`,children:e.title}),e.detail?(0,b.jsx)(`span`,{className:`command-palette-item-detail`,children:e.detail}):null,t===w?(0,b.jsx)(_,{className:`h-3.5 w-3.5`,"aria-hidden":`true`}):null]})]},e.id)})]}),(0,b.jsx)(`p`,{className:`command-palette-footer`,children:s(e,`command.footer`)})]})})}export{C as CommandPalette};
|