v1.8.3: session pool + sidebar indicators
- SessionPool: LRU cache for SSH/SFTP sessions across server switches - Sidebar: green dot indicators for servers with active sessions - Sidebar: active sessions count label - Terminal: buffer preservation on server switch via get_current_buffer() - FilesTab/TerminalTab: pool integration for session reuse Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -361,6 +361,23 @@ class TerminalWidget(tk.Frame):
|
||||
def get_size(self) -> tuple[int, int]:
|
||||
return self._cols, self._rows
|
||||
|
||||
def get_current_buffer(self) -> bytes:
|
||||
"""Export current pyte screen content as ANSI bytes for session pool preservation."""
|
||||
screen = self._screen
|
||||
lines = []
|
||||
for row in range(screen.lines):
|
||||
line = screen.buffer[row]
|
||||
chars = []
|
||||
for col in range(screen.columns):
|
||||
chars.append(line[col].data)
|
||||
# Strip trailing spaces
|
||||
text = "".join(chars).rstrip()
|
||||
lines.append(text)
|
||||
# Remove trailing empty lines
|
||||
while lines and not lines[-1]:
|
||||
lines.pop()
|
||||
return "\n".join(lines).encode("utf-8")
|
||||
|
||||
# ── Rendering ──────────────────────────────────────────────────────────
|
||||
|
||||
def _render(self):
|
||||
|
||||
Reference in New Issue
Block a user