@@ -137,7 +154,7 @@
grid-column: 2;
display: grid;
grid-template-rows: auto;
- grid-template-columns: var(--size-4-2) auto auto auto auto auto auto 1fr 0.1fr auto var(--size-4-2);
+ grid-template-columns: var(--size-4-2) auto auto auto auto auto auto auto 1fr 0.1fr auto var(--size-4-2);
background-color: var(--background-modifier-hover);
border-radius: var(--radius-m);
}
@@ -182,14 +199,19 @@
grid-column: 6;
}
- #conversation-divider-2 {
+ #help-menu-button {
grid-row: 1;
grid-column: 7;
}
- #conversation-title {
+ #conversation-divider-2 {
grid-row: 1;
grid-column: 8;
+ }
+
+ #conversation-title {
+ grid-row: 1;
+ grid-column: 9;
display: inline-block;
align-self: center;
white-space: nowrap;
@@ -201,6 +223,6 @@
#close-button {
grid-row: 1;
- grid-column: 10;
+ grid-column: 11;
}
diff --git a/LICENSE b/LICENSE
index 287f37a..837061e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,5 +1,21 @@
-Copyright (C) 2020-2025 by Dynalist Inc.
+MIT License
-Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
+Copyright (c) 2025 Andy-Stack
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
\ No newline at end of file
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/Modals/ConversationHistoryModal.ts b/Modals/ConversationHistoryModal.ts
index 81e8477..2e035e4 100644
--- a/Modals/ConversationHistoryModal.ts
+++ b/Modals/ConversationHistoryModal.ts
@@ -10,6 +10,7 @@ import { dateToString } from 'Helpers/Helpers';
import { conversationStore } from 'Stores/ConversationStore';
import { Selector } from 'Enums/Selector';
import type { ChatService } from 'Services/ChatService';
+import type AIAgentPlugin from 'main';
interface IListItem {
id: string;
@@ -31,8 +32,9 @@ export class ConversationHistoryModal extends Modal {
private conversations: Conversation[];
public onModalClose?: () => void;
- constructor(app: App) {
- super(app);
+ constructor() {
+ const plugin = Resolve(Services.AIAgentPlugin);
+ super(plugin.app);
}
override async open() {
diff --git a/Modals/ConversationHistoryModalSvelte.svelte b/Modals/ConversationHistoryModalSvelte.svelte
index c2f8b3d..af1129c 100644
--- a/Modals/ConversationHistoryModalSvelte.svelte
+++ b/Modals/ConversationHistoryModalSvelte.svelte
@@ -2,260 +2,260 @@
import { setIcon } from "obsidian";
import { fade } from "svelte/transition";
- export let items: Array<{id: string, date: string, updated: Date, title: string, selected: boolean}>;
- export let onClose: () => void;
- export let onDelete: (itemIds: string[]) => void;
- export let onSelect: (itemId: string) => void;
-
- let deleteButton: HTMLButtonElement;
- let closeButton: HTMLButtonElement;
+ export let items: Array<{id: string, date: string, updated: Date, title: string, selected: boolean}>;
+ export let onClose: () => void;
+ export let onDelete: (itemIds: string[]) => void;
+ export let onSelect: (itemId: string) => void;
- $: if (deleteButton) {
- setIcon(deleteButton, 'trash-2');
+ let deleteButton: HTMLButtonElement;
+ let closeButton: HTMLButtonElement;
+
+ $: if (deleteButton) {
+ setIcon(deleteButton, 'trash-2');
+ }
+ $: if (closeButton) {
+ setIcon(closeButton, 'circle-x');
+ }
+
+ let selectedItems = new Set();
+ let searchQuery = "";
+
+ $: filteredItems = items.filter(item =>
+ item.title.toLowerCase().includes(searchQuery.toLowerCase())
+ ).sort((a, b) => b.updated.getTime() - a.updated.getTime());
+
+ function toggleSelection(itemId: string) {
+ if (selectedItems.has(itemId)) {
+ selectedItems.delete(itemId);
+ } else {
+ selectedItems.add(itemId);
}
- $: if (closeButton) {
- setIcon(closeButton, 'circle-x');
+ selectedItems = selectedItems;
+ }
+
+ function handleDelete() {
+ if (selectedItems.size === 0) {
+ return;
}
+ onDelete(Array.from(selectedItems));
+ items = items.filter((item) => !selectedItems.has(item.id))
+ selectedItems.clear();
+ selectedItems = selectedItems;
+ }
- let selectedItems = new Set();
- let searchQuery = "";
+ function handleConversationClick(itemId: string, event: UIEvent) {
+ onSelect(itemId);
+ }
+
- $: filteredItems = items.filter(item =>
- item.title.toLowerCase().includes(searchQuery.toLowerCase())
- ).sort((a, b) => b.updated.getTime() - a.updated.getTime());
-
- function toggleSelection(itemId: string) {
- if (selectedItems.has(itemId)) {
- selectedItems.delete(itemId);
- } else {
- selectedItems.add(itemId);
- }
- selectedItems = selectedItems;
- }
-
- function handleDelete() {
- if (selectedItems.size === 0) {
- return;
- }
- onDelete(Array.from(selectedItems));
- items = items.filter((item) => !selectedItems.has(item.id))
- selectedItems.clear();
- selectedItems = selectedItems;
- }
-
- function handleConversationClick(itemId: string, event: UIEvent) {
- onSelect(itemId);
- }
-
-
-
-
-
-
-
-
-
-
-
- {#if filteredItems.length === 0}
-
- No conversations match your search.
-
- {:else}
- {#each filteredItems as item (item.id)}
-