Skip to content

Commit

Permalink
Apply renaming suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
brichet committed Feb 17, 2025
1 parent 0ec3b75 commit bce2322
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/jupyter-chat/src/components/chat-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ export function ChatInput(props: ChatInput.IProps): JSX.Element {
const attachmentChanged = (_: IChatModel, attachments: IAttachment[]) => {
setAttachments([...attachments]);
};
model.inputAttachmentsChanges?.connect(attachmentChanged);
model.inputAttachmentsChanged?.connect(attachmentChanged);

return () => {
model.configChanged?.disconnect(configChanged);
model.focusInputSignal?.disconnect(focusInputElement);
model.inputAttachmentsChanges?.disconnect(attachmentChanged);
model.inputAttachmentsChanged?.disconnect(attachmentChanged);
};
}, [model]);

Expand Down
14 changes: 7 additions & 7 deletions packages/jupyter-chat/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export interface IChatModel extends IDisposable {
/**
* A signal emitting when the input attachments changed.
*/
readonly inputAttachmentsChanges?: ISignal<IChatModel, IAttachment[]>;
readonly inputAttachmentsChanged?: ISignal<IChatModel, IAttachment[]>;

/**
* Send a message, to be defined depending on the chosen technology.
Expand Down Expand Up @@ -417,8 +417,8 @@ export class ChatModel implements IChatModel {
/**
* A signal emitting when the input attachments changed.
*/
get inputAttachmentsChanges(): ISignal<IChatModel, IAttachment[]> {
return this._inputAttachmentsChanges;
get inputAttachmentsChanged(): ISignal<IChatModel, IAttachment[]> {
return this._inputAttachmentsChanged;
}

/**
Expand Down Expand Up @@ -560,7 +560,7 @@ export class ChatModel implements IChatModel {
}

this.inputAttachments.push(attachment);
this._inputAttachmentsChanges.emit([...this.inputAttachments]);
this._inputAttachmentsChanged.emit([...this.inputAttachments]);
};

/**
Expand All @@ -575,15 +575,15 @@ export class ChatModel implements IChatModel {
}

this.inputAttachments.splice(attachmentIndex, 1);
this._inputAttachmentsChanges.emit([...this.inputAttachments]);
this._inputAttachmentsChanged.emit([...this.inputAttachments]);
};

/**
* Update attachments.
*/
clearAttachments = (): void => {
this.inputAttachments = [];
this._inputAttachmentsChanges.emit([]);
this._inputAttachmentsChanged.emit([]);
};

/**
Expand Down Expand Up @@ -653,7 +653,7 @@ export class ChatModel implements IChatModel {
private _viewportChanged = new Signal<IChatModel, number[]>(this);
private _writersChanged = new Signal<IChatModel, IUser[]>(this);
private _focusInputSignal = new Signal<ChatModel, void>(this);
private _inputAttachmentsChanges = new Signal<ChatModel, IAttachment[]>(this);
private _inputAttachmentsChanged = new Signal<ChatModel, IAttachment[]>(this);
}

/**
Expand Down

0 comments on commit bce2322

Please sign in to comment.