@sixb/cli 0.1.26 → 0.2.1
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/commands/agent.d.ts.map +1 -1
- package/dist/commands/api.d.ts.map +1 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/dev-runner.d.ts.map +1 -1
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/env.d.ts +31 -0
- package/dist/commands/env.d.ts.map +1 -0
- package/dist/lib/command-line.d.ts +26 -1
- package/dist/lib/command-line.d.ts.map +1 -1
- package/dist/lib/deploy-release.d.ts +2 -0
- package/dist/lib/deploy-release.d.ts.map +1 -1
- package/dist/lib/deploy-source.d.ts +2 -0
- package/dist/lib/deploy-source.d.ts.map +1 -1
- package/dist/lib/env-config.d.ts +17 -0
- package/dist/lib/env-config.d.ts.map +1 -0
- package/dist/lib/env-file.d.ts +16 -0
- package/dist/lib/env-file.d.ts.map +1 -0
- package/dist/lib/hidden-prompt.d.ts +19 -0
- package/dist/lib/hidden-prompt.d.ts.map +1 -0
- package/dist/tui/app.d.ts +8 -0
- package/dist/tui/app.d.ts.map +1 -1
- package/dist/tui/computer.d.ts +5 -0
- package/dist/tui/computer.d.ts.map +1 -1
- package/dist/tui/context.d.ts +13 -0
- package/dist/tui/context.d.ts.map +1 -0
- package/dist/tui/format.d.ts +85 -0
- package/dist/tui/format.d.ts.map +1 -1
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/markdown.d.ts +18 -0
- package/dist/tui/markdown.d.ts.map +1 -0
- package/dist/tui/parts.d.ts +8 -0
- package/dist/tui/parts.d.ts.map +1 -1
- package/dist/tui/runner.d.ts +37 -14
- package/dist/tui/runner.d.ts.map +1 -1
- package/dist/tui/settings.d.ts +13 -1
- package/dist/tui/settings.d.ts.map +1 -1
- package/dist/tui/transcript.d.ts +1 -1
- package/dist/tui/transcript.d.ts.map +1 -1
- package/dist/tui/ui.d.ts +7 -0
- package/dist/tui/ui.d.ts.map +1 -1
- package/dist/ui/deploy-screens.d.ts +3 -1
- package/dist/ui/deploy-screens.d.ts.map +1 -1
- package/dist/ui/env-screens.d.ts +37 -0
- package/dist/ui/env-screens.d.ts.map +1 -0
- package/package.json +19 -19
- package/src/commands/agent.ts +17 -10
- package/src/commands/api.ts +2 -1
- package/src/commands/check.ts +5 -1
- package/src/commands/deploy.ts +29 -3
- package/src/commands/dev-runner.ts +3 -1
- package/src/commands/dev.ts +3 -0
- package/src/commands/env.ts +422 -0
- package/src/index.tsx +39 -1
- package/src/lib/command-line.ts +59 -1
- package/src/lib/deploy-release.ts +3 -0
- package/src/lib/deploy-source.ts +10 -0
- package/src/lib/env-config.ts +96 -0
- package/src/lib/env-file.ts +104 -0
- package/src/lib/hidden-prompt.ts +97 -0
- package/src/tui/app.tsx +315 -179
- package/src/tui/computer.ts +37 -0
- package/src/tui/context.tsx +149 -0
- package/src/tui/format.ts +218 -1
- package/src/tui/index.tsx +13 -2
- package/src/tui/markdown.ts +91 -0
- package/src/tui/parts.ts +23 -3
- package/src/tui/runner.ts +113 -30
- package/src/tui/settings.ts +54 -5
- package/src/tui/transcript.tsx +90 -8
- package/src/tui/ui.tsx +40 -11
- package/src/ui/deploy-screens.ts +12 -1
- package/src/ui/env-screens.ts +81 -0
- package/dist/tui/folders.d.ts +0 -7
- package/dist/tui/folders.d.ts.map +0 -1
- package/src/tui/folders.ts +0 -41
package/dist/tui/folders.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/** The folder a conversation works in on this computer; undefined when it started elsewhere. */
|
|
2
|
-
export declare function folderOf(threadId: string): Promise<string | undefined>;
|
|
3
|
-
/** Keep `folder` as the one a conversation works in on this computer. */
|
|
4
|
-
export declare function rememberFolder(threadId: string, folder: string): Promise<void>;
|
|
5
|
-
/** The conversations that work in `folder` on this computer. */
|
|
6
|
-
export declare function conversationsIn(folder: string): Promise<readonly string[]>;
|
|
7
|
-
//# sourceMappingURL=folders.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"folders.d.ts","sourceRoot":"","sources":["../../src/tui/folders.ts"],"names":[],"mappings":"AAqBA,gGAAgG;AAChG,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAE5E;AAED,yEAAyE;AACzE,wBAAsB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMpF;AAED,gEAAgE;AAChE,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAIhF"}
|
package/src/tui/folders.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { readFile, writeFile } from "node:fs/promises"
|
|
2
|
-
import { dirname, join } from "node:path"
|
|
3
|
-
import { resolveConfigPath } from "../lib/profiles"
|
|
4
|
-
|
|
5
|
-
// Which folder each conversation that runs on this computer works in. A conversation's turns run
|
|
6
|
-
// only there: opened from another folder, it says where it lives instead of working on the wrong
|
|
7
|
-
// files. Kept on this computer, beside the CLI's profiles.
|
|
8
|
-
|
|
9
|
-
const FOLDERS_FILE = () => join(dirname(resolveConfigPath()), "conversations.json")
|
|
10
|
-
|
|
11
|
-
type Folders = Record<string, string>
|
|
12
|
-
|
|
13
|
-
async function load(): Promise<Folders> {
|
|
14
|
-
try {
|
|
15
|
-
const stored = JSON.parse(await readFile(FOLDERS_FILE(), "utf8")) as unknown
|
|
16
|
-
return stored && typeof stored === "object" && !Array.isArray(stored) ? (stored as Folders) : {}
|
|
17
|
-
} catch {
|
|
18
|
-
return {}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** The folder a conversation works in on this computer; undefined when it started elsewhere. */
|
|
23
|
-
export async function folderOf(threadId: string): Promise<string | undefined> {
|
|
24
|
-
return (await load())[threadId]
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/** Keep `folder` as the one a conversation works in on this computer. */
|
|
28
|
-
export async function rememberFolder(threadId: string, folder: string): Promise<void> {
|
|
29
|
-
const folders = await load()
|
|
30
|
-
folders[threadId] = folder
|
|
31
|
-
await writeFile(FOLDERS_FILE(), `${JSON.stringify(folders, null, 2)}\n`, { mode: 0o600 }).catch(
|
|
32
|
-
() => {}
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/** The conversations that work in `folder` on this computer. */
|
|
37
|
-
export async function conversationsIn(folder: string): Promise<readonly string[]> {
|
|
38
|
-
return Object.entries(await load()).flatMap(([threadId, path]) =>
|
|
39
|
-
path === folder ? [threadId] : []
|
|
40
|
-
)
|
|
41
|
-
}
|