opencode-navigator 0.19.2 → 0.20.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/CHANGELOG.md +13 -0
- package/README.md +107 -3
- package/dist/{chunk-r37n7w97.js → chunk-c1kw6ktv.js} +3 -4
- package/dist/chunk-cmmnfes2.js +7 -0
- package/dist/layout-preset-actions.js +438 -0
- package/dist/mcp-groups.js +4 -4
- package/dist/project-profile.js +280 -0
- package/dist/provider-limits.js +739 -0
- package/dist/quick-actions-settings.js +2 -5
- package/dist/settings-import.js +40 -0
- package/dist/skill-groups.js +4 -4
- package/dist/trusted-skills.js +22 -0
- package/dist/tui.js +389 -395
- package/package.json +4 -2
- package/scripts/save-project-profile.mjs +41 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "opencode-navigator",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.20.0",
|
|
5
5
|
"description": "Search, navigate, and manage OpenCode sessions from the TUI",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"packageManager": "bun@1.4.2",
|
|
@@ -32,12 +32,14 @@
|
|
|
32
32
|
"assets",
|
|
33
33
|
"scripts/install-font.mjs",
|
|
34
34
|
"scripts/update-local-snapshot.mjs",
|
|
35
|
+
"scripts/save-project-profile.mjs",
|
|
35
36
|
"README.md",
|
|
36
37
|
"CHANGELOG.md",
|
|
37
38
|
"LICENSE"
|
|
38
39
|
],
|
|
39
40
|
"bin": {
|
|
40
|
-
"opencode-navigator-font": "scripts/install-font.mjs"
|
|
41
|
+
"opencode-navigator-font": "scripts/install-font.mjs",
|
|
42
|
+
"opencode-navigator-profile": "scripts/save-project-profile.mjs"
|
|
41
43
|
},
|
|
42
44
|
"exports": {
|
|
43
45
|
"./tui": {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// This entrypoint is built before packaging; resolve it at runtime from the published dist directory.
|
|
3
|
+
const modulePath = '../dist/project-profile.js'
|
|
4
|
+
const { previewProjectProfile, saveProjectProfile } = await import(modulePath)
|
|
5
|
+
|
|
6
|
+
const [command, name, ...flags] = process.argv.slice(2)
|
|
7
|
+
|
|
8
|
+
if (command !== 'save' || !name || flags.some((flag) => flag !== '--apply' && flag !== '--replace')) {
|
|
9
|
+
console.error('Usage: opencode-navigator-profile save <name> [--apply] [--replace] < portable-settings.json')
|
|
10
|
+
process.exitCode = 1
|
|
11
|
+
} else if (process.stdin.isTTY) {
|
|
12
|
+
console.error('Paste the JSON exported by Navigator through standard input.')
|
|
13
|
+
process.exitCode = 1
|
|
14
|
+
} else {
|
|
15
|
+
try {
|
|
16
|
+
let source = ''
|
|
17
|
+
|
|
18
|
+
for await (const chunk of process.stdin) {
|
|
19
|
+
source += chunk.toString()
|
|
20
|
+
|
|
21
|
+
if (source.length > 1_000_000) throw new Error('Portable settings exceed 1 MB')
|
|
22
|
+
}
|
|
23
|
+
const preview = await previewProjectProfile(process.cwd(), name, source, flags.includes('--replace'))
|
|
24
|
+
|
|
25
|
+
console.log(`Project profile: ${preview.name}`)
|
|
26
|
+
console.log(`Target: ${preview.file}`)
|
|
27
|
+
console.log(
|
|
28
|
+
`Layout: ${Object.keys(preview.layout.sections).length} sections, ${Object.keys(preview.layout.expanded).length} expansions`,
|
|
29
|
+
)
|
|
30
|
+
console.log(`MCP: ${Object.keys(preview.mcp ?? {}).length} server states`)
|
|
31
|
+
for (const path of preview.skipped) console.log(`Skipped unsupported field: ${path}`)
|
|
32
|
+
|
|
33
|
+
if (flags.includes('--apply')) {
|
|
34
|
+
await saveProjectProfile(preview, process.cwd())
|
|
35
|
+
console.log('Saved. Restart OpenCode to load the project profile, then preview it from Settings → Presets.')
|
|
36
|
+
} else console.log('Preview only. Repeat with --apply to save this profile.')
|
|
37
|
+
} catch (error) {
|
|
38
|
+
console.error(error instanceof Error ? error.message : String(error))
|
|
39
|
+
process.exitCode = 1
|
|
40
|
+
}
|
|
41
|
+
}
|