Refactor error handling, client, and tests for Ollama integration
This commit is contained in:
@@ -36,6 +36,19 @@ export class ChatView extends ItemView {
|
||||
private newChatButtonClickHandler: (() => void) | null = null;
|
||||
private listenersAttached = false;
|
||||
|
||||
// Getters for testing
|
||||
public getSendButtonClickHandler(): (() => Promise<void>) | null {
|
||||
return this.sendButtonClickHandler;
|
||||
}
|
||||
|
||||
public getInputKeyDownHandler(): ((e: KeyboardEvent) => Promise<void>) | null {
|
||||
return this.inputKeyDownHandler;
|
||||
}
|
||||
|
||||
public getNewChatButtonClickHandler(): (() => void) | null {
|
||||
return this.newChatButtonClickHandler;
|
||||
}
|
||||
|
||||
constructor(leaf: WorkspaceLeaf, settings: PluginSettings) {
|
||||
super(leaf);
|
||||
this.settings = settings;
|
||||
|
||||
Reference in New Issue
Block a user