commit 2a83594b48565da3bf975555cf84fc0129d822cc
parent aa1a6ba2f50bef32c2febad4b22aecae61050f23
Author: Henry Unite <unitehenry@gmail.com>
Date: Sun, 25 Oct 2026 00:26:05 +0000
refactor(prompt): use target directly instead of podDir alias
- Remove podDir variable (was just an alias for target)
- Update createLimaInstance param and all uses to target
- Simplifies code; target is already the pod directory
Diffstat:
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/prompt/handle.ts b/prompt/handle.ts
@@ -59,14 +59,14 @@ export function handle(params: HandleParams): void {
}
}
- function createLimaInstance(limaName: string, podDir: string): void {
- logger.log(`creating lima instance ${limaName} (mount-only ${podDir}:w)`);
+ function createLimaInstance(limaName: string, target: string): void {
+ logger.log(`creating lima instance ${limaName} (mount-only ${target}:w)`);
const createResult = spawnSync(
"limactl",
[
"create",
`--name=${limaName}`,
- `--mount-only=${podDir}:w`,
+ `--mount-only=${target}:w`,
"template:default",
"--yes",
],
@@ -121,7 +121,6 @@ export function handle(params: HandleParams): void {
);
const limaName = sessionId;
- const podDir = target;
if (needsMove) {
if (fs.existsSync(target)) {
@@ -150,7 +149,7 @@ export function handle(params: HandleParams): void {
// 5. Create lima instance if necessary
if (!limaInstanceExists(limaName)) {
- createLimaInstance(limaName, podDir);
+ createLimaInstance(limaName, target);
}
// 6. Start lima instance