Skip to content

Commit 2658548

Browse files
committed
Rename updateAttachments() to clearAttachments()
1 parent a96b7e5 commit 2658548

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/jupyter-chat/src/model.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ export interface IChatModel extends IDisposable {
183183
removeAttachment?(attachment: IAttachment): void;
184184

185185
/**
186-
* Update attachments.
186+
* Clear the attachment list.
187187
*/
188-
updateAttachments?(attachments: IAttachment[]): void;
188+
clearAttachments?(): void;
189189

190190
/**
191191
* Open attachments.
@@ -586,9 +586,9 @@ export class ChatModel implements IChatModel {
586586
/**
587587
* Update attachments.
588588
*/
589-
updateAttachments = (attachments: IAttachment[]): void => {
590-
this.inputAttachments = [...attachments];
591-
this._inputAttachmentsChanges.emit([...this.inputAttachments]);
589+
clearAttachments = (): void => {
590+
this.inputAttachments = [];
591+
this._inputAttachmentsChanges.emit([]);
592592
};
593593

594594
/**

packages/jupyterlab-chat/src/model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export class LabChatModel extends ChatModel implements DocumentRegistry.IModel {
164164
this.sharedModel.setAttachment(attachment)
165165
);
166166
msg.attachments = attachmentIds;
167-
this.updateAttachments([]);
167+
this.clearAttachments();
168168
}
169169

170170
this.sharedModel.addMessage(msg);

0 commit comments

Comments
 (0)