mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-01 15:32:11 +08:00
Merge pull request #10302 from IamCoder18/fix/tui-export-all-messages
fix(cli): export all messages from TUI instead of truncated store
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@kilocode/cli": patch
|
||||
---
|
||||
|
||||
Export all messages from TUI instead of truncated store
|
||||
@@ -1017,10 +1017,16 @@ export function Session() {
|
||||
try {
|
||||
const sessionData = session()
|
||||
if (!sessionData) return
|
||||
const sessionMessages = messages()
|
||||
// kilocode_change start - fetch all messages from server instead of truncated sync store
|
||||
const allMessages = await sdk.client.session.messages({ sessionID: sessionData.id }, { throwOnError: true })
|
||||
const sessionMessages = allMessages.data.map((msg) => ({
|
||||
info: msg.info,
|
||||
parts: msg.parts,
|
||||
}))
|
||||
// kilocode_change end
|
||||
const transcript = formatTranscript(
|
||||
sessionData,
|
||||
sessionMessages.map((msg) => ({ info: msg, parts: sync.data.part[msg.id] ?? [] })),
|
||||
sessionMessages, // kilocode_change
|
||||
{
|
||||
thinking: showThinking(),
|
||||
toolDetails: showDetails(),
|
||||
@@ -1048,7 +1054,6 @@ export function Session() {
|
||||
try {
|
||||
const sessionData = session()
|
||||
if (!sessionData) return
|
||||
const sessionMessages = messages()
|
||||
|
||||
const defaultFilename = `session-${sessionData.id.slice(0, 8)}.md`
|
||||
|
||||
@@ -1063,9 +1068,17 @@ export function Session() {
|
||||
|
||||
if (options === null) return
|
||||
|
||||
// kilocode_change start - fetch all messages from server instead of truncated sync store
|
||||
const allMessages = await sdk.client.session.messages({ sessionID: sessionData.id }, { throwOnError: true })
|
||||
const sessionMessages = allMessages.data.map((msg) => ({
|
||||
info: msg.info,
|
||||
parts: msg.parts,
|
||||
}))
|
||||
// kilocode_change end
|
||||
|
||||
const transcript = formatTranscript(
|
||||
sessionData,
|
||||
sessionMessages.map((msg) => ({ info: msg, parts: sync.data.part[msg.id] ?? [] })),
|
||||
sessionMessages, // kilocode_change
|
||||
{
|
||||
thinking: options.thinking,
|
||||
toolDetails: options.toolDetails,
|
||||
|
||||
Reference in New Issue
Block a user