@jkwd/inbase 0.1.18 → 0.1.20
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 +3 -3
- package/apps/explorer/scripts/patch-lib.d.ts +2 -0
- package/apps/explorer/scripts/patch-lib.mjs +2 -0
- package/apps/explorer/scripts/session-store.d.ts +45 -0
- package/apps/explorer/scripts/session-store.mjs +281 -5
- package/apps/explorer/src/App.tsx +114 -4
- package/apps/explorer/src/agentIntent.ts +76 -1
- package/apps/explorer/src/index.css +65 -0
- package/apps/explorer/src/scene/FileBlock.tsx +27 -0
- package/apps/explorer/src/scene/FolderArea.tsx +21 -0
- package/apps/explorer/src/scene/MapView.tsx +1 -11
- package/apps/explorer/src/scene/SelectionThumbnail.tsx +16 -3
- package/apps/explorer/src/scene/World.tsx +22 -4
- package/apps/explorer/src/types.ts +16 -0
- package/apps/explorer/src/ui/EyeIcon.tsx +26 -0
- package/apps/explorer/src/ui/HUD.tsx +377 -26
- package/apps/explorer/src/ui/MapContextMenu.tsx +18 -1
- package/apps/explorer/src/userCreated.ts +97 -0
- package/apps/explorer/vite.config.ts +18 -1
- package/bin/session.mjs +41 -11
- package/package.json +1 -1
- package/skill/commands/inbase.md +1 -1
- package/skill/inbase/SKILL.md +24 -23
|
@@ -30,6 +30,8 @@ type SelectionThumbnailProps = {
|
|
|
30
30
|
plannedIds?: string[]
|
|
31
31
|
createdIds?: string[]
|
|
32
32
|
deletedIds?: string[]
|
|
33
|
+
pointedFileIds?: string[]
|
|
34
|
+
pointedFolderPaths?: string[]
|
|
33
35
|
onMinimize?: () => void
|
|
34
36
|
onMaximize?: () => void
|
|
35
37
|
onHide: () => void
|
|
@@ -464,6 +466,8 @@ function ThumbnailScene({
|
|
|
464
466
|
planned,
|
|
465
467
|
created,
|
|
466
468
|
deleted,
|
|
469
|
+
pointedFiles,
|
|
470
|
+
pointedFolders,
|
|
467
471
|
zoom,
|
|
468
472
|
zoomRef,
|
|
469
473
|
panRef,
|
|
@@ -481,6 +485,8 @@ function ThumbnailScene({
|
|
|
481
485
|
planned: Set<string>
|
|
482
486
|
created: Set<string>
|
|
483
487
|
deleted: Set<string>
|
|
488
|
+
pointedFiles: Set<string>
|
|
489
|
+
pointedFolders: Set<string>
|
|
484
490
|
zoom: number
|
|
485
491
|
zoomRef: { current: number }
|
|
486
492
|
panRef: { current: Vec3 }
|
|
@@ -496,15 +502,18 @@ function ThumbnailScene({
|
|
|
496
502
|
const selected = file.id === target.selectedFileId
|
|
497
503
|
const related = target.relatedIds.has(file.id)
|
|
498
504
|
const changeKind = fileChangeKind(file.id, planned, created, deleted)
|
|
505
|
+
const pointed = pointedFiles.has(file.id)
|
|
499
506
|
const dimmed =
|
|
500
507
|
Boolean(target.selectedFileId) &&
|
|
501
508
|
!selected &&
|
|
502
509
|
!related &&
|
|
503
|
-
!changeKind
|
|
510
|
+
!changeKind &&
|
|
511
|
+
!pointed
|
|
504
512
|
let priority = placed.size[1]
|
|
505
513
|
if (selected) priority += 1000
|
|
506
514
|
else if (related) priority += 400
|
|
507
515
|
else if (changeKind) priority += 300
|
|
516
|
+
else if (pointed) priority += 250
|
|
508
517
|
else if (file.userCreated) priority += 80
|
|
509
518
|
if (dimmed) priority -= 200
|
|
510
519
|
return {
|
|
@@ -517,7 +526,7 @@ function ThumbnailScene({
|
|
|
517
526
|
priority,
|
|
518
527
|
}
|
|
519
528
|
}),
|
|
520
|
-
|
|
529
|
+
[created, deleted, planned, pointedFiles, target],
|
|
521
530
|
)
|
|
522
531
|
|
|
523
532
|
return (
|
|
@@ -554,12 +563,14 @@ function ThumbnailScene({
|
|
|
554
563
|
<FolderArea
|
|
555
564
|
folder={target.folder}
|
|
556
565
|
highlightKind={highlightedFolders[target.folder.path] ?? null}
|
|
566
|
+
pointed={pointedFolders.has(target.folder.path)}
|
|
557
567
|
previewLabels={zoom < 1.45}
|
|
558
568
|
/>
|
|
559
569
|
{target.files.map(({ file, placed }) => {
|
|
560
570
|
const selected = file.id === target.selectedFileId
|
|
561
571
|
const related = target.relatedIds.has(file.id)
|
|
562
572
|
const changeKind = fileChangeKind(file.id, planned, created, deleted)
|
|
573
|
+
const pointed = pointedFiles.has(file.id)
|
|
563
574
|
return (
|
|
564
575
|
<FileBlock
|
|
565
576
|
key={file.id}
|
|
@@ -570,6 +581,7 @@ function ThumbnailScene({
|
|
|
570
581
|
planned={Boolean(changeKind)}
|
|
571
582
|
changeKind={changeKind}
|
|
572
583
|
added={created.has(file.id) || file.userCreated}
|
|
584
|
+
pointed={pointed}
|
|
573
585
|
highlightMapChange
|
|
574
586
|
previewLabels
|
|
575
587
|
labelVisible={visibleLabelIds.has(file.id)}
|
|
@@ -577,7 +589,8 @@ function ThumbnailScene({
|
|
|
577
589
|
Boolean(target.selectedFileId) &&
|
|
578
590
|
!selected &&
|
|
579
591
|
!related &&
|
|
580
|
-
!changeKind
|
|
592
|
+
!changeKind &&
|
|
593
|
+
!pointed
|
|
581
594
|
}
|
|
582
595
|
/>
|
|
583
596
|
)
|
|
@@ -73,6 +73,8 @@ type WorldProps = {
|
|
|
73
73
|
userCreatedBlocks?: UserCreatedBlock[]
|
|
74
74
|
userCreatedIslands?: UserCreatedIsland[]
|
|
75
75
|
overlayBlocks?: UserCreatedBlock[]
|
|
76
|
+
pointedFileIds?: string[]
|
|
77
|
+
pointedFolderPaths?: string[]
|
|
76
78
|
namingIslandId?: string | null
|
|
77
79
|
mapGraph?: CodebaseGraph | null
|
|
78
80
|
mapLayout?: WorldLayout | null
|
|
@@ -117,11 +119,15 @@ export function World({
|
|
|
117
119
|
userCreatedBlocks = [],
|
|
118
120
|
userCreatedIslands = [],
|
|
119
121
|
overlayBlocks = [],
|
|
122
|
+
pointedFileIds = [],
|
|
123
|
+
pointedFolderPaths = [],
|
|
120
124
|
mapGraph = null,
|
|
121
125
|
mapLayout = null,
|
|
122
126
|
}: WorldProps) {
|
|
123
127
|
const created = new Set(createdIds)
|
|
124
128
|
const deleted = new Set(deletedIds)
|
|
129
|
+
const pointedFiles = new Set(pointedFileIds)
|
|
130
|
+
const pointedFolders = new Set(pointedFolderPaths)
|
|
125
131
|
const mapping = mode === 'map'
|
|
126
132
|
const viewGraph = mapping && mapGraph ? mapGraph : graph
|
|
127
133
|
const viewLayout = mapping && mapLayout ? mapLayout : layout
|
|
@@ -169,17 +175,19 @@ export function World({
|
|
|
169
175
|
if (selectedId) ids.add(selectedId)
|
|
170
176
|
if (namingId) ids.add(namingId)
|
|
171
177
|
if (aimedRelation?.flyTo) ids.add(aimedRelation.flyTo)
|
|
178
|
+
for (const id of pointedFileIds) ids.add(id)
|
|
172
179
|
if (ghostKey) {
|
|
173
180
|
for (const id of ghostKey.split('|')) ids.add(id)
|
|
174
181
|
}
|
|
175
182
|
return ids
|
|
176
|
-
}, [aimedRelation?.flyTo, ghostKey, namingId, selectedId])
|
|
183
|
+
}, [aimedRelation?.flyTo, ghostKey, namingId, pointedFileIds, selectedId])
|
|
177
184
|
const keepFolderPaths = useMemo(() => {
|
|
178
185
|
const paths = new Set<string>()
|
|
179
186
|
if (selectedFolder) paths.add(selectedFolder)
|
|
180
187
|
if (namingIslandId) paths.add(namingIslandId)
|
|
188
|
+
for (const path of pointedFolderPaths) paths.add(path)
|
|
181
189
|
return paths
|
|
182
|
-
}, [namingIslandId, selectedFolder])
|
|
190
|
+
}, [namingIslandId, pointedFolderPaths, selectedFolder])
|
|
183
191
|
const originLod = useMemo(() => {
|
|
184
192
|
if (mapping) return null
|
|
185
193
|
return computeWalkLod({
|
|
@@ -237,7 +245,6 @@ export function World({
|
|
|
237
245
|
onLand={onLand}
|
|
238
246
|
onSelect={onSelect}
|
|
239
247
|
onSelectFolder={onSelectFolder}
|
|
240
|
-
onTravelTo={onTravelTo}
|
|
241
248
|
onBlueprintMenu={
|
|
242
249
|
mapping && !placing && onBlueprintMenu ? onBlueprintMenu : undefined
|
|
243
250
|
}
|
|
@@ -255,6 +262,7 @@ export function World({
|
|
|
255
262
|
highlightKind={
|
|
256
263
|
mapping ? highlightedFolders[folder.path] ?? null : null
|
|
257
264
|
}
|
|
265
|
+
pointed={pointedFolders.has(folder.path)}
|
|
258
266
|
labelVisible={!lod || lod.folderLabels.has(folder.path)}
|
|
259
267
|
onCommitName={
|
|
260
268
|
folder.path === namingIslandId && onCommitIslandName
|
|
@@ -286,14 +294,22 @@ export function World({
|
|
|
286
294
|
const changeKind = fileChangeKind(file.id, planned, created, deleted)
|
|
287
295
|
const naming = file.id === namingId
|
|
288
296
|
const aimed = file.id === aimedRelation?.flyTo
|
|
297
|
+
const pointed = pointedFiles.has(file.id)
|
|
289
298
|
const detailed =
|
|
290
|
-
selected ||
|
|
299
|
+
selected ||
|
|
300
|
+
isRelated ||
|
|
301
|
+
isPlanned ||
|
|
302
|
+
naming ||
|
|
303
|
+
aimed ||
|
|
304
|
+
pointed ||
|
|
305
|
+
Boolean(changeKind)
|
|
291
306
|
if (lod && !lod.files.has(file.id)) return null
|
|
292
307
|
const dimmed =
|
|
293
308
|
hasFocus &&
|
|
294
309
|
!selected &&
|
|
295
310
|
!isRelated &&
|
|
296
311
|
!changeKind &&
|
|
312
|
+
!pointed &&
|
|
297
313
|
!patchLinked.has(file.id) &&
|
|
298
314
|
!folderFileIds.has(file.id)
|
|
299
315
|
if (lod && !detailed && !lod.labels.has(file.id)) {
|
|
@@ -311,6 +327,7 @@ export function World({
|
|
|
311
327
|
changeKind={changeKind}
|
|
312
328
|
added={created.has(file.id) || file.userCreated}
|
|
313
329
|
aimed={aimed}
|
|
330
|
+
pointed={pointed}
|
|
314
331
|
dimmed={dimmed}
|
|
315
332
|
naming={naming}
|
|
316
333
|
mapMode={mapping}
|
|
@@ -348,6 +365,7 @@ export function World({
|
|
|
348
365
|
planned={false}
|
|
349
366
|
changeKind="add"
|
|
350
367
|
added
|
|
368
|
+
pointed={pointedFiles.has(file.id)}
|
|
351
369
|
dimmed={false}
|
|
352
370
|
mapMode={mapping}
|
|
353
371
|
labelVisible
|
|
@@ -225,6 +225,14 @@ export type BlueprintNote = {
|
|
|
225
225
|
note: string
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
+
export type BlueprintPointerKind = 'file' | 'folder' | 'function' | 'variable'
|
|
229
|
+
|
|
230
|
+
export type BlueprintPointer = {
|
|
231
|
+
kind: BlueprintPointerKind
|
|
232
|
+
path: string
|
|
233
|
+
name?: string
|
|
234
|
+
}
|
|
235
|
+
|
|
228
236
|
export type AimedRelation = {
|
|
229
237
|
from: string
|
|
230
238
|
to: string
|
|
@@ -275,6 +283,7 @@ export type SharedBlueprint = {
|
|
|
275
283
|
addedVariables: PatchSymbolAddition[]
|
|
276
284
|
addedImports: PatchImportAddition[]
|
|
277
285
|
notes: BlueprintNote[]
|
|
286
|
+
pointers: BlueprintPointer[]
|
|
278
287
|
}
|
|
279
288
|
|
|
280
289
|
export type AgentIntentBundle = {
|
|
@@ -324,6 +333,12 @@ export type AgentIntent = {
|
|
|
324
333
|
at: string | null
|
|
325
334
|
} | null
|
|
326
335
|
initialInstruction?: string | null
|
|
336
|
+
contextFiles?: Array<{
|
|
337
|
+
id: string
|
|
338
|
+
name: string
|
|
339
|
+
mimeType: string
|
|
340
|
+
size: number
|
|
341
|
+
}>
|
|
327
342
|
creationMode: boolean
|
|
328
343
|
canEnterBlueprint: boolean
|
|
329
344
|
blueprintHidden?: boolean
|
|
@@ -335,4 +350,5 @@ export type AgentIntent = {
|
|
|
335
350
|
blueprintVariables: PatchSymbolAddition[]
|
|
336
351
|
blueprintImports: PatchImportAddition[]
|
|
337
352
|
blueprintNotes: BlueprintNote[]
|
|
353
|
+
blueprintPointers: BlueprintPointer[]
|
|
338
354
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export function EyeIcon({
|
|
2
|
+
size = 18,
|
|
3
|
+
title,
|
|
4
|
+
}: {
|
|
5
|
+
size?: number
|
|
6
|
+
title?: string
|
|
7
|
+
}) {
|
|
8
|
+
return (
|
|
9
|
+
<svg
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
width={size}
|
|
12
|
+
height={size}
|
|
13
|
+
fill="none"
|
|
14
|
+
stroke="currentColor"
|
|
15
|
+
strokeWidth="2"
|
|
16
|
+
strokeLinecap="round"
|
|
17
|
+
strokeLinejoin="round"
|
|
18
|
+
aria-hidden={title ? undefined : true}
|
|
19
|
+
role={title ? 'img' : undefined}
|
|
20
|
+
>
|
|
21
|
+
{title ? <title>{title}</title> : null}
|
|
22
|
+
<path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z" />
|
|
23
|
+
<circle cx="12" cy="12" r="3" />
|
|
24
|
+
</svg>
|
|
25
|
+
)
|
|
26
|
+
}
|