This commit is contained in:
2025-08-25 06:34:39 +02:00
parent 43e7c087db
commit 5f75c542df
4 changed files with 18 additions and 22 deletions

View File

@@ -35,7 +35,7 @@ if agent.keys.len > 0 {
console.print_header('Working with existing keys...')
for i, key in agent.keys {
console.print_debug('Key ${i+1}: ${key.name}')
console.print_debug('Key ${i + 1}: ${key.name}')
console.print_debug(' Type: ${key.cat}')
console.print_debug(' Loaded: ${key.loaded}')
console.print_debug(' Email: ${key.email}')

View File

@@ -6,12 +6,10 @@ import time
import os
// Configuration
const (
session_name = 'server_dashboard'
window_name = 'dashboard'
python_port = 8000
ttyd_port = 7890
)
const session_name = 'server_dashboard'
const window_name = 'dashboard'
const python_port = 8000
const ttyd_port = 7890
println('=== Server Dashboard with 3 Panes ===')
println('Setting up tmux session with:')
@@ -123,7 +121,7 @@ window = session.window_get(name: window_name)!
println('\n=== Current Dashboard State ===')
for i, mut pane in window.panes {
stats := pane.stats() or {
println(' Pane ${i+1}: ID=%${pane.id}, PID=${pane.pid} (stats unavailable)')
println(' Pane ${i + 1}: ID=%${pane.id}, PID=${pane.pid} (stats unavailable)')
continue
}
memory_mb := f64(stats.memory_bytes) / (1024.0 * 1024.0)
@@ -133,7 +131,7 @@ for i, mut pane in window.panes {
2 { 'CPU Monitor' }
else { 'Unknown' }
}
println(' Pane ${i+1} (${service_name}): ID=%${pane.id}, CPU=${stats.cpu_percent:.1f}%, Memory=${memory_mb:.1f}MB')
println(' Pane ${i + 1} (${service_name}): ID=%${pane.id}, CPU=${stats.cpu_percent:.1f}%, Memory=${memory_mb:.1f}MB')
}
println('\n=== Access Information ===')

View File

@@ -5,11 +5,9 @@ import freeflowuniverse.herolib.osal.core as osal
import time
// Constants for display formatting
const (
bytes_to_mb = 1024.0 * 1024.0
cpu_precision = 1
memory_precision = 3
)
const bytes_to_mb = 1024.0 * 1024.0
const cpu_precision = 1
const memory_precision = 3
println('=== Tmux Pane Example ===')

View File

@@ -68,9 +68,9 @@ println('\n=== Demonstrating Pane Resizing ===')
// Get references to panes for resizing
window.scan()!
if window.panes.len >= 4 {
mut top_left := window.panes[1] // bash
mut top_right := window.panes[0] // htop
mut bottom_left := window.panes[2] // top
mut top_left := window.panes[1] // bash
mut top_right := window.panes[0] // htop
mut bottom_left := window.panes[2] // top
mut bottom_right := window.panes[3] // tail
println('Resizing top-left pane (bash) to be wider...')
@@ -127,7 +127,7 @@ t.scan()!
println('Session: ${session.name}')
println('Window: ${window.name} (${window.panes.len} panes)')
for i, pane in window.panes {
println(' ${i+1}. Pane %${pane.id} - ${pane.cmd}')
println(' ${i + 1}. Pane %${pane.id} - ${pane.cmd}')
}
println('\n=== Pane Resize Operations Available ===')