From 7db55dddde41b9c820ba9aa114737c2cab135d8f Mon Sep 17 00:00:00 2001 From: Junyi Hou Date: Tue, 27 Jan 2026 00:41:03 +0800 Subject: [PATCH] feat: initialize projectInstructions variable in conversation preparation --- internal/api/chat/create_conversation_message_stream_v2.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/api/chat/create_conversation_message_stream_v2.go b/internal/api/chat/create_conversation_message_stream_v2.go index 2e9f95ba..b82adf5d 100644 --- a/internal/api/chat/create_conversation_message_stream_v2.go +++ b/internal/api/chat/create_conversation_message_stream_v2.go @@ -195,6 +195,7 @@ func (s *ChatServerV2) prepare(ctx context.Context, projectId string, conversati } var latexFullSource string + var projectInstructions string = "" switch conversationType { case chatv2.ConversationType_CONVERSATION_TYPE_DEBUG: latexFullSource = "latex_full_source is not available in debug mode" @@ -207,6 +208,8 @@ func (s *ChatServerV2) prepare(ctx context.Context, projectId string, conversati if err != nil { return ctx, nil, nil, err } + + projectInstructions = project.Instructions } var conversation *models.Conversation @@ -217,7 +220,7 @@ func (s *ChatServerV2) prepare(ctx context.Context, projectId string, conversati actor.ID, projectId, latexFullSource, - project.Instructions, + projectInstructions, userInstructions, userMessage, userSelectedText,