fix(core): remove candidate doc chip suggestions (#10327)

Fix issue [AF-2247](https://linear.app/affine-design/issue/AF-2247).
This commit is contained in:
akumatus
2025-02-20 14:01:00 +00:00
parent 126677d7ad
commit efe36161e8
2 changed files with 16 additions and 19 deletions

View File

@@ -167,17 +167,8 @@ export class ChatPanel extends WithDisposable(ShadowlessElement) {
};
private readonly _updateChips = async () => {
const candidateChip: DocChip = {
docId: this.doc.id,
state: 'candidate',
};
// context not initialized, show candidate chip
if (!this._chatSessionId || !this._chatContextId) {
this.chatContextValue = {
...this.chatContextValue,
chips: [candidateChip],
};
return;
}
@@ -212,7 +203,7 @@ export class ChatPanel extends WithDisposable(ShadowlessElement) {
});
this.chatContextValue = {
...this.chatContextValue,
chips: chips.length === 0 ? [candidateChip] : chips,
chips,
};
};