Skip to content

Commit 78b4fd5

Browse files
committed
fix(amazonq): Remove irrelevant fields from chat history
1 parent a465656 commit 78b4fd5

File tree

2 files changed

+0
-12
lines changed
  • packages/core/src

2 files changed

+0
-12
lines changed

packages/core/src/codewhispererChat/controllers/chat/messenger/messenger.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,6 @@ export class Messenger {
553553
this.chatHistoryDb.addMessage(tabID, 'cwc', session.sessionIdentifier, {
554554
body: message,
555555
type: 'answer' as any,
556-
codeReference: codeReference as any,
557-
relatedContent: { title: 'Sources', content: relatedSuggestions as any },
558556
messageId: messageID,
559557
toolUses:
560558
toolUse && toolUse.input !== undefined && toolUse.input !== ''

packages/core/src/shared/db/chatDb/util.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ import {
1313
DetailedListItem,
1414
DetailedListItemGroup,
1515
MynahIconsType,
16-
ReferenceTrackerInformation,
17-
SourceLink,
1816
} from '@aws/mynah-ui'
1917
import { ChatMessage, Origin, ToolUse, UserInputMessageContext, UserIntent } from '@amzn/codewhisperer-streaming'
2018

@@ -46,11 +44,6 @@ export enum ClientType {
4644
export type Message = {
4745
body: string
4846
type: ChatItemType
49-
codeReference?: ReferenceTrackerInformation[]
50-
relatedContent?: {
51-
title?: string
52-
content: SourceLink[]
53-
}
5447
messageId?: string
5548
userIntent?: UserIntent
5649
origin?: Origin
@@ -68,7 +61,6 @@ export function messageToChatMessage(msg: Message): ChatMessage {
6861
assistantResponseMessage: {
6962
messageId: msg.messageId,
7063
content: msg.body,
71-
references: msg.codeReference || [],
7264
toolUses: msg.toolUses || [],
7365
},
7466
}
@@ -89,8 +81,6 @@ export function messageToChatItem(msg: Message): ChatItem {
8981
return {
9082
body: msg.body,
9183
type: msg.type as ChatItemType,
92-
codeReference: msg.codeReference,
93-
relatedContent: msg.relatedContent && msg.relatedContent?.content.length > 0 ? msg.relatedContent : undefined,
9484
}
9585
}
9686

0 commit comments

Comments
 (0)