Skip to content

Commit b9073f1

Browse files
authored
Update packages/core/src/amazonq/session/sessionState.ts
1 parent 13aa64e commit b9073f1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/core/src/amazonq/session/sessionState.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,7 @@ export abstract class CodeGenBase {
111111
file.zipFilePath === RunCommandLogFileName
112112
)
113113
if (logFileInfo) {
114-
logFileInfo.fileContent = truncate(logFileInfo.fileContent, 10000000) // Limit to max 20MB
115-
if (logFileInfo.fileContent.length === 10000000) {
116-
logFileInfo.fileContent += '\n... [truncated]'
114+
logFileInfo.fileContent = truncate(logFileInfo.fileContent, 10000000, '\n... [truncated]') // Limit to max 20MB
117115
}
118116
getLogger().info(`sessionState: Run Command logs, ${logFileInfo.fileContent}`)
119117
newFileContents.splice(newFileContents.indexOf(logFileInfo), 1)

0 commit comments

Comments
 (0)