@bramblex/codex-workbench 0.1.21 → 0.1.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bramblex/codex-workbench",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "Terminal workbench for browsing and managing local and SSH Codex sessions.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -142,7 +142,7 @@ function runSourceSessionCommand(session, command, args) {
142
142
  }
143
143
 
144
144
  function runSourceNewSession(source, cwd, args, backend) {
145
- if (!source || !source.remote) return runNewCodexSession(cwd, args, true, backend || defaultBackend());
145
+ if (!source || !source.remote) return runNewCodexSession(cwd, args, false, backend || defaultBackend());
146
146
  const backendArgs = backend ? ['--backend', backend] : [];
147
147
  const result = runRemoteCwb(source, ['new', '--cwd', cwd, ...backendArgs, ...args], { tty: true });
148
148
  if (result.error) throw result.error;
@@ -721,16 +721,16 @@ async function runWorkbench() {
721
721
  const currentProjectCwd = () => {
722
722
  const group = currentGroup();
723
723
  if (group.kind === 'project') return group.cwd;
724
+ if (group.kind === 'source' && group.source.remote) return '.';
725
+ if (group.kind === 'source') return process.cwd();
724
726
  const session = selectedSession();
725
727
  if (session && session.cwd && session.cwd !== '(unknown)') return session.cwd;
726
- if (group.kind === 'source' && group.source.remote) return '.';
727
728
  return process.cwd();
728
729
  };
729
730
 
730
731
  const currentSource = () => {
731
732
  const group = currentGroup();
732
733
  if (group.kind === 'source' || group.kind === 'project') return group.source;
733
- if (activePanel === 'projects') return LOCAL_SOURCE;
734
734
  const session = selectedSession();
735
735
  return session ? sourceById(sources, session.sourceId) : LOCAL_SOURCE;
736
736
  };