@tenux/cli 0.0.18 → 0.0.19

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.
@@ -4,6 +4,9 @@ import { homedir } from "os";
4
4
  import { join } from "path";
5
5
  var CONFIG_DIR = join(homedir(), ".tenux");
6
6
  var CONFIG_FILE = join(CONFIG_DIR, "config.json");
7
+ function getConfigDir() {
8
+ return CONFIG_DIR;
9
+ }
7
10
  function getConfigPath() {
8
11
  return CONFIG_FILE;
9
12
  }
@@ -234,16 +237,19 @@ async function handleClaudeQuery(command, supabase) {
234
237
  } = command.payload;
235
238
  if (!prompt) throw new Error("prompt is required");
236
239
  const config = loadConfig();
237
- let cwd = config.projectsDir;
240
+ const cwd = getConfigDir();
241
+ if (!existsSync2(config.projectsDir)) {
242
+ mkdirSync2(config.projectsDir, { recursive: true });
243
+ }
244
+ let contextHint = "";
238
245
  if (project_path) {
239
- const resolved = resolve(config.projectsDir, project_path);
240
- if (resolved.startsWith(resolve(config.projectsDir))) {
241
- cwd = resolved;
246
+ const projectDir = resolve(config.projectsDir, project_path);
247
+ const relPath = `./projects/${project_path}`;
248
+ if (existsSync2(projectDir)) {
249
+ contextHint = `The user currently has the project "${project_path}" selected (at ${relPath}). This is likely the project they are referring to unless they say otherwise. All projects are under ./projects/.`;
242
250
  }
243
251
  }
244
- if (!existsSync2(cwd)) {
245
- mkdirSync2(cwd, { recursive: true });
246
- }
252
+ const fullSystemPrompt = [contextHint, system_prompt].filter(Boolean).join("\n\n");
247
253
  const args = [
248
254
  "--print",
249
255
  // non-interactive
@@ -257,7 +263,7 @@ async function handleClaudeQuery(command, supabase) {
257
263
  if (effort) args.push("--effort", effort);
258
264
  if (permission_mode) args.push("--permission-mode", permission_mode);
259
265
  if (max_budget) args.push("--max-budget-usd", max_budget);
260
- if (system_prompt) args.push("--append-system-prompt", system_prompt);
266
+ if (fullSystemPrompt) args.push("--append-system-prompt", fullSystemPrompt);
261
267
  if (session_id) args.push("--resume", session_id);
262
268
  const isWindows = process.platform === "win32";
263
269
  const claudeBin = isWindows ? "claude.cmd" : "claude";
package/dist/cli.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  loadConfig,
10
10
  saveConfig,
11
11
  updateConfig
12
- } from "./chunk-QPS4CXAL.js";
12
+ } from "./chunk-BMALGL6Q.js";
13
13
 
14
14
  // src/cli.ts
15
15
  import { Command } from "commander";
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  resetSupabase,
8
8
  saveConfig,
9
9
  updateConfig
10
- } from "./chunk-QPS4CXAL.js";
10
+ } from "./chunk-BMALGL6Q.js";
11
11
  export {
12
12
  Relay,
13
13
  configExists,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenux/cli",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "description": "Tenux — mobile-first IDE for 10x engineering",
5
5
  "author": "Antelogic LLC",
6
6
  "license": "MIT",