claude-remote-cli 3.5.0 → 3.5.2
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/frontend/assets/{index-BtybMy6I.css → index-D8zGa-Fd.css} +1 -1
- package/dist/frontend/assets/index-DnrS1YFL.js +50 -0
- package/dist/frontend/index.html +2 -2
- package/dist/server/git.js +0 -4
- package/dist/server/index.js +8 -1
- package/dist/server/sessions.js +1 -1
- package/dist/server/ws.js +10 -1
- package/package.json +1 -1
- package/dist/frontend/assets/index-BSLqoOlv.js +0 -50
package/dist/frontend/index.html
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
12
12
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
13
13
|
<meta name="theme-color" content="#1a1a1a" />
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
15
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-DnrS1YFL.js"></script>
|
|
15
|
+
<link rel="stylesheet" crossorigin href="/assets/index-D8zGa-Fd.css">
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|
|
18
18
|
<div id="app"></div>
|
package/dist/server/git.js
CHANGED
|
@@ -178,10 +178,6 @@ async function getPrForBranch(repoPath, branch, options = {}) {
|
|
|
178
178
|
return null;
|
|
179
179
|
try {
|
|
180
180
|
const data = JSON.parse(stdout);
|
|
181
|
-
// Only return OPEN PRs — gh pr view returns merged/closed PRs too
|
|
182
|
-
if (data.state !== 'OPEN') {
|
|
183
|
-
return null;
|
|
184
|
-
}
|
|
185
181
|
return {
|
|
186
182
|
number: data.number,
|
|
187
183
|
title: data.title,
|
package/dist/server/index.js
CHANGED
|
@@ -741,7 +741,7 @@ async function main() {
|
|
|
741
741
|
res.status(201).json(session);
|
|
742
742
|
});
|
|
743
743
|
// POST /sessions/repo — start a session in the repo root (no worktree)
|
|
744
|
-
app.post('/sessions/repo', requireAuth, (req, res) => {
|
|
744
|
+
app.post('/sessions/repo', requireAuth, async (req, res) => {
|
|
745
745
|
const { repoPath, repoName, continue: continueSession, claudeArgs, yolo, agent, useTmux, cols, rows } = req.body;
|
|
746
746
|
if (!repoPath) {
|
|
747
747
|
res.status(400).json({ error: 'repoPath is required' });
|
|
@@ -761,6 +761,12 @@ async function main() {
|
|
|
761
761
|
const args = continueSession ? [...AGENT_CONTINUE_ARGS[resolvedAgent], ...baseArgs] : [...baseArgs];
|
|
762
762
|
const roots = config.rootDirs || [];
|
|
763
763
|
const root = roots.find(function (r) { return repoPath.startsWith(r); }) || '';
|
|
764
|
+
let branchName = '';
|
|
765
|
+
try {
|
|
766
|
+
const { stdout } = await execFileAsync('git', ['rev-parse', '--abbrev-ref', 'HEAD'], { cwd: repoPath });
|
|
767
|
+
branchName = stdout.trim();
|
|
768
|
+
}
|
|
769
|
+
catch { /* non-fatal */ }
|
|
764
770
|
const session = sessions.create({
|
|
765
771
|
type: 'repo',
|
|
766
772
|
agent: resolvedAgent,
|
|
@@ -770,6 +776,7 @@ async function main() {
|
|
|
770
776
|
root,
|
|
771
777
|
displayName: name,
|
|
772
778
|
args,
|
|
779
|
+
branchName,
|
|
773
780
|
useTmux: useTmux ?? config.launchInTmux,
|
|
774
781
|
...(safeCols != null && { cols: safeCols }),
|
|
775
782
|
...(safeRows != null && { rows: safeRows }),
|
package/dist/server/sessions.js
CHANGED
|
@@ -227,7 +227,7 @@ async function restoreFromDisk(configDir) {
|
|
|
227
227
|
if (tmuxAlive) {
|
|
228
228
|
// Attach to surviving tmux session
|
|
229
229
|
command = 'tmux';
|
|
230
|
-
args = ['attach-session', '-t', s.tmuxSessionName];
|
|
230
|
+
args = ['-u', 'attach-session', '-t', s.tmuxSessionName];
|
|
231
231
|
}
|
|
232
232
|
else {
|
|
233
233
|
// Tmux session died — fall back to agent with continue args
|
package/dist/server/ws.js
CHANGED
|
@@ -41,7 +41,12 @@ function startBranchWatcher(session, broadcastEvent, cfgPath) {
|
|
|
41
41
|
/** Sideband branch rename: uses headless claude to generate a branch name from the first message */
|
|
42
42
|
async function spawnBranchRename(session, firstMessage, cfgPath, broadcastEvent) {
|
|
43
43
|
try {
|
|
44
|
-
const
|
|
44
|
+
const cleanMessage = firstMessage.replace(/\x1b\[[0-9;]*[a-zA-Z]/g, '').replace(/[\x00-\x1f]/g, ' ').trim();
|
|
45
|
+
if (!cleanMessage)
|
|
46
|
+
return;
|
|
47
|
+
const basePrompt = session.branchRenamePrompt
|
|
48
|
+
?? `Output ONLY a short kebab-case git branch name (no explanation, no backticks, no prefix, just the name) that describes this task:`;
|
|
49
|
+
const prompt = `${basePrompt}\n\n${cleanMessage.slice(0, 500)}`;
|
|
45
50
|
const { stdout } = await execFileAsync('claude', ['-p', '--model', 'haiku', prompt], {
|
|
46
51
|
cwd: session.cwd,
|
|
47
52
|
timeout: 30000,
|
|
@@ -180,6 +185,10 @@ function setupWebSocket(server, authenticatedTokens, watcher, configPath) {
|
|
|
180
185
|
}
|
|
181
186
|
catch (_) { }
|
|
182
187
|
// Sideband branch rename: capture first message, pass through unmodified, rename out-of-band
|
|
188
|
+
if (ptySession.needsBranchRename && ptySession.agentState !== 'waiting-for-input') {
|
|
189
|
+
ptySession.pty.write(str);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
183
192
|
if (ptySession.needsBranchRename) {
|
|
184
193
|
if (!ptySession._renameBuffer)
|
|
185
194
|
ptySession._renameBuffer = '';
|