@rse/claudex 1.1.3 → 1.1.5

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/claudex.js CHANGED
@@ -261,6 +261,24 @@ const self = async (...args) => {
261
261
  process.exit(r.exitCode ?? 1);
262
262
  return r.exitCode ?? 0;
263
263
  };
264
+ /* derive the session/project name from a directory: usually its basename,
265
+ but for a multi-worktree setup "<basedir>/<branch>/" with an "active"
266
+ symlink in "<basedir>/" (pointing to one of the worktrees) the name is
267
+ "<basedir>-<branch>", as the bare branch name (e.g. "master") is not unique */
268
+ const deriveSessionName = (dir) => {
269
+ const name = path.basename(dir);
270
+ const parent = path.dirname(dir);
271
+ if (name !== "" && parent !== dir) {
272
+ try {
273
+ if (fs.lstatSync(path.join(parent, "active")).isSymbolicLink())
274
+ return `${path.basename(parent)}-${name}`;
275
+ }
276
+ catch (_e) {
277
+ /* no "active" symlink, so no multi-worktree setup */
278
+ }
279
+ }
280
+ return name;
281
+ };
264
282
  /* detect the session/project name by walking up from the current working
265
283
  directory looking for an AGENTS.md / CLAUDE.md marker; fall back to the
266
284
  basename of the current working directory */
@@ -268,13 +286,13 @@ const detectSessionName = () => {
268
286
  let dir = process.cwd();
269
287
  while (true) {
270
288
  if (fs.existsSync(path.join(dir, "AGENTS.md")) || fs.existsSync(path.join(dir, "CLAUDE.md")))
271
- return path.basename(dir);
289
+ return deriveSessionName(dir);
272
290
  const parent = path.dirname(dir);
273
291
  if (parent === dir)
274
292
  break;
275
293
  dir = parent;
276
294
  }
277
- const session = path.basename(process.cwd()) || "default";
295
+ const session = deriveSessionName(process.cwd()) || "default";
278
296
  info(`no AGENTS.md/CLAUDE.md marker found; using cwd basename "${session}" as session name`);
279
297
  return session;
280
298
  };
package/claudex.ts CHANGED
@@ -292,6 +292,25 @@ const self = async (...args: string[]): Promise<number> => {
292
292
  return r.exitCode ?? 0
293
293
  }
294
294
 
295
+ /* derive the session/project name from a directory: usually its basename,
296
+ but for a multi-worktree setup "<basedir>/<branch>/" with an "active"
297
+ symlink in "<basedir>/" (pointing to one of the worktrees) the name is
298
+ "<basedir>-<branch>", as the bare branch name (e.g. "master") is not unique */
299
+ const deriveSessionName = (dir: string): string => {
300
+ const name = path.basename(dir)
301
+ const parent = path.dirname(dir)
302
+ if (name !== "" && parent !== dir) {
303
+ try {
304
+ if (fs.lstatSync(path.join(parent, "active")).isSymbolicLink())
305
+ return `${path.basename(parent)}-${name}`
306
+ }
307
+ catch (_e) {
308
+ /* no "active" symlink, so no multi-worktree setup */
309
+ }
310
+ }
311
+ return name
312
+ }
313
+
295
314
  /* detect the session/project name by walking up from the current working
296
315
  directory looking for an AGENTS.md / CLAUDE.md marker; fall back to the
297
316
  basename of the current working directory */
@@ -299,13 +318,13 @@ const detectSessionName = (): string => {
299
318
  let dir = process.cwd()
300
319
  while (true) {
301
320
  if (fs.existsSync(path.join(dir, "AGENTS.md")) || fs.existsSync(path.join(dir, "CLAUDE.md")))
302
- return path.basename(dir)
321
+ return deriveSessionName(dir)
303
322
  const parent = path.dirname(dir)
304
323
  if (parent === dir)
305
324
  break
306
325
  dir = parent
307
326
  }
308
- const session = path.basename(process.cwd()) || "default"
327
+ const session = deriveSessionName(process.cwd()) || "default"
309
328
  info(`no AGENTS.md/CLAUDE.md marker found; using cwd basename "${session}" as session name`)
310
329
  return session
311
330
  }
package/eslint.mjs CHANGED
@@ -17,6 +17,7 @@ export default [
17
17
  ...pluginTS.configs.strict,
18
18
  ...pluginTS.configs.stylistic,
19
19
  ...pluginStd({
20
+ ts: true,
20
21
  ignores: pluginStd.resolveIgnoresFromGitignore()
21
22
  }),
22
23
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rse/claudex",
3
3
  "publishConfig": { "access": "public" },
4
- "version": "1.1.3",
4
+ "version": "1.1.5",
5
5
  "description": "Claude Code eXtended",
6
6
  "type": "module",
7
7
  "keywords": [ "claude", "code", "extension", "wrapper" ],
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "typescript": "6.0.3",
29
- "@types/node": "26.6.4",
29
+ "@types/node": "26.6.5",
30
30
  "@types/which": "3.0.4",
31
31
  "@types/shell-quote": "1.7.5",
32
32
 
@@ -37,7 +37,7 @@
37
37
  "@typescript-eslint/parser": "8.71.1",
38
38
  "eslint-plugin-promise": "7.3.0",
39
39
  "eslint-plugin-import": "2.32.0",
40
- "neostandard": "0.13.0",
40
+ "neostandard": "0.14.0",
41
41
  "globals": "17.13.0",
42
42
  "shx": "0.4.0"
43
43
  },
package/tmux.conf CHANGED
@@ -101,6 +101,7 @@ set-hook -g pane-exited 'if -F "#{!=:#{window_panes},1}" "set-opt
101
101
  set-hook -g after-split-window 'if -F "#{!=:#{window_panes},1}" "set-option -g pane-border-status top" "set-option -g pane-border-status off"'
102
102
 
103
103
  # configure popup style
104
+ set-option -g popup-style "bg=default,fg=default"
104
105
  set-option -g popup-border-style "fg=blue"
105
106
  set-option -g popup-border-lines rounded
106
107