feat: add configurable VDO.Ninja overview and floating window focus

This commit is contained in:
2026-09-22 17:34:35 +09:00
parent 33aac68f16
commit 36806e4dc1
14 changed files with 304 additions and 16 deletions
+13
View File
@@ -0,0 +1,13 @@
import { posix } from 'node:path'
export function resolveContainerTerminal(inspectJson: string, moduleRoot: string): { id: string; cwd: string } {
const [container] = JSON.parse(inspectJson)
if (!container?.State?.Running) throw new Error('Module container is not running')
const root = posix.resolve(moduleRoot)
const mounts = (container.Mounts ?? []) as { Source: string; Destination: string }[]
const mount = mounts
.filter((item) => root === item.Source || root.startsWith(`${item.Source.replace(/\/$/, '')}/`))
.sort((a, b) => b.Source.length - a.Source.length)[0]
if (!mount) throw new Error('Module workspace is not mounted in this container')
return { id: container.Id, cwd: posix.join(mount.Destination, posix.relative(mount.Source, root)) }
}