feat: refine codex live chat flow
This commit is contained in:
@@ -1469,7 +1469,9 @@ function buildAgenticCodexPrompt(
|
||||
'- 한국어로 간결하게 답하세요.',
|
||||
'',
|
||||
'채팅 유형 문맥(우선 적용):',
|
||||
`- chatTypeLabel: ${context?.chatTypeLabel ?? '없음'}`,
|
||||
context?.chatTypeLabel && context.chatTypeLabel.trim() !== '일반 요청'
|
||||
? `- chatTypeLabel: ${context.chatTypeLabel}`
|
||||
: '- chatTypeLabel: 없음',
|
||||
`- chatTypeDescription: ${context?.chatTypeDescription ?? '없음'}`,
|
||||
'- 답변 스타일과 기본 문맥은 반드시 채팅 유형 정보만 기준으로 적용하세요.',
|
||||
'- Plan 자동화용 자동화 유형 context가 있더라도 Codex Live에서는 별도 요청이 없는 한 참조하지 마세요.',
|
||||
@@ -1645,6 +1647,11 @@ async function runAgenticCodexReply(
|
||||
maxMessages: appConfig.chat?.maxContextMessages,
|
||||
maxChars: appConfig.chat?.maxContextChars,
|
||||
});
|
||||
const codexLiveMaxExecutionSeconds =
|
||||
typeof appConfig.chat?.codexLiveMaxExecutionSeconds === 'number' &&
|
||||
Number.isFinite(appConfig.chat.codexLiveMaxExecutionSeconds)
|
||||
? Math.min(7200, Math.max(60, Math.round(appConfig.chat.codexLiveMaxExecutionSeconds)))
|
||||
: null;
|
||||
const prompt = buildAgenticCodexPrompt(context, input, sessionId, {
|
||||
recentHistoryLines: recentHistory.items,
|
||||
omittedHistoryCount: recentHistory.omittedCount,
|
||||
@@ -1697,6 +1704,7 @@ async function runAgenticCodexReply(
|
||||
prompt,
|
||||
resourceDir: path.join(repoPath, 'public', '.codex_chat', sessionId, 'resource'),
|
||||
uploadDir: path.join(repoPath, 'public', '.codex_chat', sessionId, 'resource', 'uploads'),
|
||||
maxExecutionSeconds: codexLiveMaxExecutionSeconds,
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user