mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-02 21:49:42 +02:00
fix: remove New Session panel entirely
- Remove New Session slide-up panel from HTML - Remove createNewSession, hideNewSessionPanel, createSessionFromPanel functions - Remove Ctrl+N keyboard shortcut - Remove "New Session" from help modal - Clean up loadQuickStartCases and closeAllPanels references Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -149,12 +149,6 @@ class ClaudemanApp {
|
||||
this.quickStart();
|
||||
}
|
||||
|
||||
// Ctrl/Cmd + N - new session
|
||||
if ((e.ctrlKey || e.metaKey) && e.key === 'n') {
|
||||
e.preventDefault();
|
||||
this.createNewSession();
|
||||
}
|
||||
|
||||
// Ctrl/Cmd + W - close active session
|
||||
if ((e.ctrlKey || e.metaKey) && e.key === 'w') {
|
||||
e.preventDefault();
|
||||
@@ -637,7 +631,6 @@ class ClaudemanApp {
|
||||
this.cases = cases;
|
||||
|
||||
const select = document.getElementById('quickStartCase');
|
||||
const newSessionSelect = document.getElementById('newSessionCase');
|
||||
|
||||
// Build options
|
||||
let options = '<option value="testcase">testcase</option>';
|
||||
@@ -648,7 +641,6 @@ class ClaudemanApp {
|
||||
});
|
||||
|
||||
select.innerHTML = options;
|
||||
newSessionSelect.innerHTML = options;
|
||||
|
||||
// Auto-select first case and update directory display
|
||||
if (cases.length > 0) {
|
||||
@@ -767,56 +759,6 @@ class ClaudemanApp {
|
||||
}
|
||||
}
|
||||
|
||||
// ========== New Session ==========
|
||||
|
||||
createNewSession() {
|
||||
document.getElementById('newSessionPanel').classList.add('open');
|
||||
}
|
||||
|
||||
hideNewSessionPanel() {
|
||||
document.getElementById('newSessionPanel').classList.remove('open');
|
||||
}
|
||||
|
||||
async createSessionFromPanel() {
|
||||
const caseName = document.getElementById('newSessionCase').value;
|
||||
const customDir = document.getElementById('newSessionDir').value.trim();
|
||||
|
||||
this.hideNewSessionPanel();
|
||||
|
||||
try {
|
||||
if (customDir) {
|
||||
// Create session with custom directory
|
||||
const createRes = await fetch('/api/sessions', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ workingDir: customDir })
|
||||
});
|
||||
const createData = await createRes.json();
|
||||
if (!createData.success) throw new Error(createData.error);
|
||||
|
||||
// Start interactive
|
||||
await fetch(`/api/sessions/${createData.session.id}/interactive`, {
|
||||
method: 'POST'
|
||||
});
|
||||
|
||||
this.selectSession(createData.session.id);
|
||||
} else {
|
||||
// Use quick-start with case
|
||||
const res = await fetch('/api/quick-start', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ caseName })
|
||||
});
|
||||
const data = await res.json();
|
||||
if (!data.success) throw new Error(data.error);
|
||||
|
||||
this.selectSession(data.sessionId);
|
||||
}
|
||||
} catch (err) {
|
||||
this.showToast('Failed to create session: ' + err.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
// ========== Directory Input ==========
|
||||
|
||||
toggleDirInput() {
|
||||
@@ -1432,7 +1374,6 @@ class ClaudemanApp {
|
||||
this.closeAppSettings();
|
||||
this.cancelCloseSession();
|
||||
document.getElementById('respawnPanel').classList.remove('open');
|
||||
document.getElementById('newSessionPanel').classList.remove('open');
|
||||
document.getElementById('taskPanel').classList.remove('open');
|
||||
document.getElementById('processPanel').classList.remove('open');
|
||||
}
|
||||
|
||||
@@ -175,30 +175,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- New Session Panel (slide-up) -->
|
||||
<div class="new-session-panel" id="newSessionPanel">
|
||||
<div class="respawn-panel-header">
|
||||
<span>New Session</span>
|
||||
<button class="btn-close" onclick="app.hideNewSessionPanel()">×</button>
|
||||
</div>
|
||||
<div class="respawn-panel-body">
|
||||
<div class="form-row">
|
||||
<label>Case / Project</label>
|
||||
<select id="newSessionCase" class="form-select">
|
||||
<option value="testcase">testcase (default)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>Or specify directory</label>
|
||||
<input type="text" id="newSessionDir" placeholder="~/projects/my-project">
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button class="btn-toolbar" onclick="app.hideNewSessionPanel()">Cancel</button>
|
||||
<button class="btn-toolbar btn-success" onclick="app.createSessionFromPanel()">Create Session</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Help Modal -->
|
||||
<div class="modal" id="helpModal">
|
||||
<div class="modal-backdrop" onclick="app.closeHelp()"></div>
|
||||
@@ -210,7 +186,6 @@
|
||||
<div class="modal-body">
|
||||
<div class="shortcuts-grid">
|
||||
<div><kbd>Ctrl</kbd>+<kbd>Enter</kbd></div><div>Run Claude</div>
|
||||
<div><kbd>Ctrl</kbd>+<kbd>N</kbd></div><div>New Session</div>
|
||||
<div><kbd>Ctrl</kbd>+<kbd>W</kbd></div><div>Close Session</div>
|
||||
<div><kbd>Ctrl</kbd>+<kbd>Tab</kbd></div><div>Next Session</div>
|
||||
<div><kbd>Ctrl</kbd>+<kbd>K</kbd></div><div>Kill All Sessions</div>
|
||||
|
||||
Reference in New Issue
Block a user