@ekkos/cli 1.2.4 → 1.2.6
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/run.js +47 -15
- package/package.json +1 -1
package/dist/commands/run.js
CHANGED
|
@@ -877,12 +877,13 @@ function launchWithDashboard(options) {
|
|
|
877
877
|
}
|
|
878
878
|
}
|
|
879
879
|
/**
|
|
880
|
-
* Launch
|
|
881
|
-
*
|
|
882
|
-
*
|
|
880
|
+
* Launch a NEW Windows Terminal window with Claude (left 60%) + dashboard (right 40%).
|
|
881
|
+
*
|
|
882
|
+
* wt.exe cannot split the CURRENT window from a script (microsoft/terminal#4656).
|
|
883
|
+
* Instead, we launch a new WT window with both panes pre-defined using a temp .cmd
|
|
884
|
+
* file to avoid Windows quoting hell with nested paths containing spaces.
|
|
883
885
|
*/
|
|
884
|
-
function launchWithWindowsTerminal() {
|
|
885
|
-
const ekkosCmd = process.argv[1];
|
|
886
|
+
function launchWithWindowsTerminal(options) {
|
|
886
887
|
const cwd = process.cwd();
|
|
887
888
|
const launchTime = Date.now();
|
|
888
889
|
// Write marker file so dashboard knows to wait for a NEW session
|
|
@@ -891,19 +892,49 @@ function launchWithWindowsTerminal() {
|
|
|
891
892
|
fs.writeFileSync(markerPath, `${launchTime}\n${cwd}`);
|
|
892
893
|
}
|
|
893
894
|
catch { }
|
|
895
|
+
// Build ekkos run args WITHOUT --dashboard (prevent recursion)
|
|
896
|
+
// Uses `ekkos` directly — it's in PATH since user ran `ekkos --dashboard`
|
|
897
|
+
const runArgs = ['run'];
|
|
898
|
+
if (options.session)
|
|
899
|
+
runArgs.push('-s', options.session);
|
|
900
|
+
if (options.bypass)
|
|
901
|
+
runArgs.push('-b');
|
|
902
|
+
if (options.verbose)
|
|
903
|
+
runArgs.push('-v');
|
|
904
|
+
if (options.doctor)
|
|
905
|
+
runArgs.push('-d');
|
|
906
|
+
if (options.research)
|
|
907
|
+
runArgs.push('-r');
|
|
908
|
+
if (options.noInject)
|
|
909
|
+
runArgs.push('--skip-inject');
|
|
910
|
+
if (options.noDna)
|
|
911
|
+
runArgs.push('--skip-dna');
|
|
912
|
+
if (options.noProxy)
|
|
913
|
+
runArgs.push('--skip-proxy');
|
|
914
|
+
// Write a temp batch file to avoid all quoting issues
|
|
915
|
+
const batPath = path.join(os.tmpdir(), `ekkos-wt-${launchTime}.cmd`);
|
|
916
|
+
const batContent = [
|
|
917
|
+
'@echo off',
|
|
918
|
+
`wt --title "Claude Code" -d "${cwd}" ekkos ${runArgs.join(' ')} ; split-pane -V -s 0.4 --title "ekkOS Dashboard" -d "${cwd}" ekkos dashboard --wait-for-new --refresh 2000`,
|
|
919
|
+
].join('\r\n');
|
|
894
920
|
try {
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
console.log(chalk_1.default.cyan('\n Dashboard launched in right pane (40%)'));
|
|
921
|
+
fs.writeFileSync(batPath, batContent);
|
|
922
|
+
(0, child_process_1.execSync)(`"${batPath}"`, { stdio: 'pipe' });
|
|
923
|
+
console.log(chalk_1.default.cyan('\n Launched Claude Code + Dashboard in Windows Terminal'));
|
|
924
|
+
console.log(chalk_1.default.gray(' Claude (left 60%) | Dashboard (right 40%)'));
|
|
900
925
|
console.log(chalk_1.default.gray(' Switch panes: Alt+Arrow keys\n'));
|
|
901
926
|
}
|
|
902
927
|
catch (err) {
|
|
903
|
-
console.log(chalk_1.default.yellow(` Windows Terminal
|
|
928
|
+
console.log(chalk_1.default.yellow(` Windows Terminal launch failed: ${err.message}`));
|
|
904
929
|
console.log(chalk_1.default.gray(' Run "ekkos dashboard --latest" in a separate terminal'));
|
|
905
930
|
}
|
|
906
|
-
|
|
931
|
+
finally {
|
|
932
|
+
// Cleanup temp batch file
|
|
933
|
+
try {
|
|
934
|
+
fs.unlinkSync(batPath);
|
|
935
|
+
}
|
|
936
|
+
catch { }
|
|
937
|
+
}
|
|
907
938
|
}
|
|
908
939
|
async function run(options) {
|
|
909
940
|
// ══════════════════════════════════════════════════════════════════════════
|
|
@@ -939,11 +970,12 @@ async function run(options) {
|
|
|
939
970
|
// ══════════════════════════════════════════════════════════════════════════
|
|
940
971
|
if (options.dashboard) {
|
|
941
972
|
if (isWindows) {
|
|
942
|
-
// Windows:
|
|
973
|
+
// Windows: launch NEW WT window with Claude (left) + dashboard (right)
|
|
974
|
+
// wt.exe cannot split the current window from a script (microsoft/terminal#4656)
|
|
943
975
|
try {
|
|
944
976
|
(0, child_process_1.execSync)('where wt.exe', { encoding: 'utf-8', stdio: 'pipe' });
|
|
945
|
-
launchWithWindowsTerminal();
|
|
946
|
-
//
|
|
977
|
+
launchWithWindowsTerminal(options);
|
|
978
|
+
return; // Both panes launched in new window — exit this terminal
|
|
947
979
|
}
|
|
948
980
|
catch {
|
|
949
981
|
console.log(chalk_1.default.yellow(' Windows Terminal (wt.exe) not found.'));
|