Version 1.0.9

This commit is contained in:
Mike Thicke 2025-08-31 11:18:49 -04:00
parent c7fa2e956d
commit 5a6b97eeeb
5 changed files with 10 additions and 16 deletions

View file

@ -1,7 +1,7 @@
{
"id": "co-intelligence",
"name": "Co-Intelligence AI",
"version": "1.0.8",
"version": "1.0.9",
"minAppVersion": "1.8.0",
"description": "Co-Intelligence AI gives you a full AI chat experience in Obsidian.",
"author": "Mike Thicke",

View file

@ -51,12 +51,9 @@ export class ChatView extends TextFileView {
this.handleChatChange = this.handleChatChange.bind(this);
this.icon = "bot-message-square";
this.registerEvent(
this.app.workspace.on(
"co-intelligence:settings-changed" as any,
async () => {
await this.refresh();
},
),
this.app.workspace.on("co-intelligence:settings-changed", async () => {
await this.refresh();
}),
);
}
@ -242,7 +239,7 @@ export class ChatView extends TextFileView {
.setTitle("View as markdown")
.setIcon("bot-message-square")
.onClick(() => {
(this.app as any).commands.executeCommandById(
this.app.commands.executeCommandById(
"co-intelligence:toggle-chat-view",
);
});

View file

@ -54,16 +54,13 @@ export class CoIntelligencePlugin extends Plugin {
createCOINote(this.app, this);
});
this.registerEvent(
this.app.workspace.on("file-open" as any, this.handleFileOpen.bind(this)),
this.app.workspace.on("file-open", this.handleFileOpen.bind(this)),
);
this.registerEvent(
this.app.vault.on("rename", this.handleFileRename.bind(this)),
);
this.registerEvent(
this.app.workspace.on(
"file-menu" as any,
this.onFileMenuHandler.bind(this) as any,
),
this.app.workspace.on("file-menu", this.onFileMenuHandler.bind(this)),
);
this.app.workspace.onLayoutReady(this.onloadOnLayoutReady.bind(this));
@ -114,7 +111,7 @@ export class CoIntelligencePlugin extends Plugin {
menu.addItem((item) => {
item.setTitle("View as chat");
item.onClick(async () => {
(this.app as any).commands.executeCommandById(
this.app.commands.executeCommandById(
"co-intelligence:toggle-chat-view",
);
});

View file

@ -287,7 +287,7 @@ export const ChatInterface = ({
}
triggerChange(true);
} catch (error) {
const message = (error as any).message || "Unknown error";
const message = (error as Error).message || "Unknown error";
new Notice("Error generating response: " + message);
console.error("Error generating response:", error);
setIsProcessing(false);

View file

@ -69,7 +69,7 @@ export const SystemPromptSelector: Component<SystemPromptSelectorProps> = ({
// Listen for settings changes
if (app) {
const eventRef = app.workspace.on(
"co-intelligence:settings-changed" as any,
"co-intelligence:settings-changed",
loadPrompts,
);