@rehpic/vcli 0.1.0-beta.71.1 → 0.1.0-beta.73.1
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/index.js +12 -34
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1314,6 +1314,10 @@ var TerminalPeerManager = class {
|
|
|
1314
1314
|
return;
|
|
1315
1315
|
}
|
|
1316
1316
|
console.log(`[${ts()}] Client connected (${tmuxSessionName})`);
|
|
1317
|
+
try {
|
|
1318
|
+
execFileSync(TMUX, ["refresh-client", "-t", viewerSession]);
|
|
1319
|
+
} catch {
|
|
1320
|
+
}
|
|
1317
1321
|
const dataHandler = ptyProcess.onData((data) => {
|
|
1318
1322
|
if (ws.readyState === WebSocket.OPEN) {
|
|
1319
1323
|
ws.send(data);
|
|
@@ -1329,6 +1333,10 @@ var TerminalPeerManager = class {
|
|
|
1329
1333
|
Math.max(parsed.cols, 10),
|
|
1330
1334
|
Math.max(parsed.rows, 4)
|
|
1331
1335
|
);
|
|
1336
|
+
try {
|
|
1337
|
+
execFileSync(TMUX, ["refresh-client", "-t", viewerSession]);
|
|
1338
|
+
} catch {
|
|
1339
|
+
}
|
|
1332
1340
|
return;
|
|
1333
1341
|
}
|
|
1334
1342
|
} catch {
|
|
@@ -2431,7 +2439,6 @@ var BridgeService = class {
|
|
|
2431
2439
|
}
|
|
2432
2440
|
);
|
|
2433
2441
|
writeLiveActivitiesCache(activities);
|
|
2434
|
-
await this.syncWorkSessionTerminals(activities);
|
|
2435
2442
|
if (this.terminalPeer) {
|
|
2436
2443
|
for (const activity of activities) {
|
|
2437
2444
|
if (activity.workSessionId && activity.tmuxSessionName) {
|
|
@@ -2494,7 +2501,7 @@ var BridgeService = class {
|
|
|
2494
2501
|
`Verified ${providerLabel(attachedSession.process.provider)} in ${activity.tmuxPaneId}`
|
|
2495
2502
|
);
|
|
2496
2503
|
await this.updateLiveActivity(activity._id, {
|
|
2497
|
-
status: "
|
|
2504
|
+
status: "active",
|
|
2498
2505
|
latestSummary: `Verified ${providerLabel(attachedSession.process.provider)} in ${activity.tmuxPaneId}`,
|
|
2499
2506
|
processId: attachedSession.processId,
|
|
2500
2507
|
title: activity.title
|
|
@@ -2724,7 +2731,6 @@ var BridgeService = class {
|
|
|
2724
2731
|
const prompt2 = buildLaunchPrompt(issueKey, issueTitle, workspacePath);
|
|
2725
2732
|
const launchLabel = provider ? providerLabel(provider) : "shell session";
|
|
2726
2733
|
const workSessionTitle = `${issueKey}: ${issueTitle}`;
|
|
2727
|
-
const sessionsBeforeLaunch = provider ? listObservedSessionsForWorkspace(provider, workspacePath) : [];
|
|
2728
2734
|
await this.updateLiveActivity(cmd.liveActivityId, {
|
|
2729
2735
|
status: "active",
|
|
2730
2736
|
latestSummary: `Launching ${launchLabel} in ${workspacePath}`,
|
|
@@ -2732,11 +2738,6 @@ var BridgeService = class {
|
|
|
2732
2738
|
launchStatus: "launching",
|
|
2733
2739
|
title: workSessionTitle
|
|
2734
2740
|
});
|
|
2735
|
-
await this.postAgentMessage(
|
|
2736
|
-
cmd.liveActivityId,
|
|
2737
|
-
"status",
|
|
2738
|
-
`Launching ${launchLabel} in ${workspacePath}`
|
|
2739
|
-
);
|
|
2740
2741
|
const tmuxSession = createTmuxWorkSession({
|
|
2741
2742
|
workspacePath,
|
|
2742
2743
|
issueKey,
|
|
@@ -2744,12 +2745,6 @@ var BridgeService = class {
|
|
|
2744
2745
|
provider,
|
|
2745
2746
|
prompt: prompt2
|
|
2746
2747
|
});
|
|
2747
|
-
const attachedSession = provider ? await this.attachObservedAgentSession(
|
|
2748
|
-
provider,
|
|
2749
|
-
workspacePath,
|
|
2750
|
-
sessionsBeforeLaunch,
|
|
2751
|
-
tmuxSession.paneProcessId
|
|
2752
|
-
) : null;
|
|
2753
2748
|
await this.refreshWorkSessionTerminal(cmd.workSession?._id, {
|
|
2754
2749
|
tmuxSessionName: tmuxSession.sessionName,
|
|
2755
2750
|
tmuxWindowName: tmuxSession.windowName,
|
|
@@ -2757,30 +2752,13 @@ var BridgeService = class {
|
|
|
2757
2752
|
cwd: workspacePath,
|
|
2758
2753
|
repoRoot: workspacePath,
|
|
2759
2754
|
branch: currentGitBranch(workspacePath),
|
|
2760
|
-
agentProvider: provider
|
|
2761
|
-
agentSessionKey: attachedSession?.process.sessionKey
|
|
2755
|
+
agentProvider: provider
|
|
2762
2756
|
});
|
|
2763
|
-
if (provider && !attachedSession) {
|
|
2764
|
-
await this.postAgentMessage(
|
|
2765
|
-
cmd.liveActivityId,
|
|
2766
|
-
"status",
|
|
2767
|
-
`Started tmux session ${tmuxSession.sessionName}:${tmuxSession.windowName}. Waiting to verify ${providerLabel(provider)} in ${tmuxSession.paneId}.`
|
|
2768
|
-
);
|
|
2769
|
-
await this.updateLiveActivity(cmd.liveActivityId, {
|
|
2770
|
-
status: "waiting_for_input",
|
|
2771
|
-
latestSummary: `Running in ${tmuxSession.sessionName}:${tmuxSession.windowName}; waiting to verify ${providerLabel(provider)}`,
|
|
2772
|
-
delegatedRunId: payload?.delegatedRunId,
|
|
2773
|
-
launchStatus: "running",
|
|
2774
|
-
title: `${providerLabel(provider)} on ${this.config.displayName}`
|
|
2775
|
-
});
|
|
2776
|
-
return;
|
|
2777
|
-
}
|
|
2778
2757
|
await this.updateLiveActivity(cmd.liveActivityId, {
|
|
2779
|
-
status: "
|
|
2780
|
-
latestSummary: `Running in ${tmuxSession.sessionName}
|
|
2758
|
+
status: "active",
|
|
2759
|
+
latestSummary: `Running ${launchLabel} in ${tmuxSession.sessionName}`,
|
|
2781
2760
|
delegatedRunId: payload?.delegatedRunId,
|
|
2782
2761
|
launchStatus: "running",
|
|
2783
|
-
processId: attachedSession?.processId,
|
|
2784
2762
|
title: workSessionTitle
|
|
2785
2763
|
});
|
|
2786
2764
|
}
|