feat: refine codex live chat flow

This commit is contained in:
2026-04-24 21:02:01 +09:00
parent d53532508b
commit 63e5d263a7
18 changed files with 1747 additions and 297 deletions

View File

@@ -514,7 +514,11 @@ export function appendActivityEventToMessages(previous: ChatMessage[], event: Ch
}
export function createIntroMessage(chatTypeLabel?: string, chatTypeDescription?: string) {
const contextLabelLine = chatTypeLabel ? `선택 컨텍스트: ${chatTypeLabel}` : '';
const normalizedChatTypeLabel = chatTypeLabel?.trim() ?? '';
const contextLabelLine =
normalizedChatTypeLabel && normalizedChatTypeLabel !== '일반 요청'
? `선택 컨텍스트: ${normalizedChatTypeLabel}`
: '';
const contextDescriptionLine = chatTypeDescription ? `기본 문맥: ${chatTypeDescription}` : '';
return createChatMessage(
@@ -525,7 +529,11 @@ export function createIntroMessage(chatTypeLabel?: string, chatTypeDescription?:
export function buildOfflineReply(context: ChatViewContext, input: string) {
const normalized = input.toLowerCase();
const typeLine = context.chatTypeLabel ? `- 컨텍스트: ${context.chatTypeLabel}` : '';
const normalizedChatTypeLabel = context.chatTypeLabel?.trim() ?? '';
const typeLine =
normalizedChatTypeLabel && normalizedChatTypeLabel !== '일반 요청'
? `- 컨텍스트: ${normalizedChatTypeLabel}`
: '';
const descriptionLine = context.chatTypeDescription ? `- 기본 문맥: ${context.chatTypeDescription}` : '';
if (normalized.includes('preview') || normalized.includes('링크') || normalized.includes('url')) {