perf: Use tail-only replay by default for faster terminal loading
- Change default to tailOnly=true (was false) - Reduce chunks from 500 to 200 - Applies to both FloatingTerminal and TerminalPage
This commit is contained in:
@@ -547,9 +547,9 @@ function scrollTerminal(direction: 'up' | 'down' | 'end') {
|
|||||||
else renderer.scrollToBottom()
|
else renderer.scrollToBottom()
|
||||||
}
|
}
|
||||||
|
|
||||||
function requestReplay(tailOnly = false) {
|
function requestReplay(tailOnly = true) {
|
||||||
if (socket?.readyState === WebSocket.OPEN) {
|
if (socket?.readyState === WebSocket.OPEN) {
|
||||||
socket.send(JSON.stringify({ type: 'request-replay', tailOnly, chunks: 500 }))
|
socket.send(JSON.stringify({ type: 'request-replay', tailOnly, chunks: 200 }))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ async function connect() {
|
|||||||
isResumedSession.value = !msg.isNew
|
isResumedSession.value = !msg.isNew
|
||||||
|
|
||||||
if (msg.hasHistory) {
|
if (msg.hasHistory) {
|
||||||
socket?.send(JSON.stringify({ type: 'request-replay', tailOnly: false }))
|
socket?.send(JSON.stringify({ type: 'request-replay', tailOnly: true, chunks: 200 }))
|
||||||
} else if (!msg.isNew) {
|
} else if (!msg.isNew) {
|
||||||
renderer.writeln('\x1b[36m[Reconnected to existing session]\x1b[0m')
|
renderer.writeln('\x1b[36m[Reconnected to existing session]\x1b[0m')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user