From 037f658a157ea43f9b3df09f560b4ddc3eefccf6 Mon Sep 17 00:00:00 2001 From: Kunal Keshari Pattanaik Date: Fri, 5 Jun 2026 14:16:26 +0530 Subject: [PATCH 1/2] Add terminal session splitter marker --- ui/app.js | 29 +++++++++++++++++++++++++++++ ui/index.html | 10 ++++++++++ ui/style.css | 20 ++++++++++++++++++++ 3 files changed, 59 insertions(+) diff --git a/ui/app.js b/ui/app.js index bf7725b..bce6e4f 100644 --- a/ui/app.js +++ b/ui/app.js @@ -2468,6 +2468,30 @@ function downloadTerminalLog() { notify(`Log downloaded as "${filename}".`, 'success'); } +function insertTerminalSessionSplitter() { + const termId = state.activeTerminalId; + const termBody = getTerminalBody(termId); + if (!termBody) { + notify('Active terminal not found.', 'error'); + return; + } + + const timestamp = new Date().toLocaleTimeString([], { + hour: '2-digit', + minute: '2-digit', + second: '2-digit', + hour12: false + }); + const splitter = document.createElement('div'); + splitter.className = 'terminal-session-splitter'; + splitter.textContent = `Session Marker [${timestamp}]`; + termBody.appendChild(splitter); + splitter.scrollIntoView({ behavior: 'smooth', block: 'end' }); + notify(`Session marker added to Terminal ${termId}.`, 'info'); + persistWorkspace(); + saveSessionDebounced(); +} + /** * Toggles auto-scroll on/off for the active terminal. * Updates the button appearance to reflect current state. @@ -3465,6 +3489,11 @@ function bindEvents() { btnDownloadLog.addEventListener('click', downloadTerminalLog); } + const btnInsertSplitter = document.getElementById('btn-insert-splitter'); + if (btnInsertSplitter) { + btnInsertSplitter.addEventListener('click', insertTerminalSessionSplitter); + } + const btnAutoscroll = document.getElementById('btn-autoscroll'); if (btnAutoscroll) { btnAutoscroll.addEventListener('click', toggleAutoScroll); diff --git a/ui/index.html b/ui/index.html index 58399eb..56de51b 100644 --- a/ui/index.html +++ b/ui/index.html @@ -330,6 +330,16 @@

Scripts

+