Merge pull request #5 from built-by-as/add-worktree-path-to-session-sidebar
Add worktree path display to session sidebar
This commit is contained in:
commit
d1df3ba093
10
renderer.ts
10
renderer.ts
|
|
@ -329,14 +329,20 @@ function addToSidebar(sessionId: string, name: string, hasActivePty: boolean) {
|
||||||
const list = document.getElementById("session-list");
|
const list = document.getElementById("session-list");
|
||||||
if (!list) return;
|
if (!list) return;
|
||||||
|
|
||||||
|
const session = sessions.get(sessionId);
|
||||||
|
const worktreePath = session?.worktreePath || '';
|
||||||
|
|
||||||
const item = document.createElement("div");
|
const item = document.createElement("div");
|
||||||
item.id = `sidebar-${sessionId}`;
|
item.id = `sidebar-${sessionId}`;
|
||||||
item.className = "session-list-item";
|
item.className = "session-list-item";
|
||||||
item.innerHTML = `
|
item.innerHTML = `
|
||||||
<div class="flex items-center space-x-2 flex-1 session-name-container">
|
<div class="flex items-center space-x-2 flex-1 session-name-container">
|
||||||
<span class="session-indicator ${hasActivePty ? 'active' : ''}"></span>
|
<span class="session-indicator ${hasActivePty ? 'active' : ''}"></span>
|
||||||
<span class="truncate session-name-text" data-id="${sessionId}">${name}</span>
|
<div class="flex-1 min-w-0">
|
||||||
<input type="text" class="session-name-input hidden" data-id="${sessionId}" value="${name}" />
|
<span class="truncate session-name-text block" data-id="${sessionId}">${name}</span>
|
||||||
|
<input type="text" class="session-name-input hidden" data-id="${sessionId}" value="${name}" />
|
||||||
|
<span class="session-worktree-path text-xs text-gray-500 truncate block">${worktreePath}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="session-delete-btn" data-id="${sessionId}" title="Delete session">×</button>
|
<button class="session-delete-btn" data-id="${sessionId}" title="Delete session">×</button>
|
||||||
`;
|
`;
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,10 @@
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.session-worktree-path {
|
||||||
|
@apply text-xs text-gray-500 truncate block mt-0.5;
|
||||||
|
}
|
||||||
|
|
||||||
/* Tabs */
|
/* Tabs */
|
||||||
.tabs-container {
|
.tabs-container {
|
||||||
@apply flex bg-gray-900 border-b border-gray-700 overflow-x-auto;
|
@apply flex bg-gray-900 border-b border-gray-700 overflow-x-auto;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue