mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
- Implement Copilot Plus mode - Use broca endpoint and add license key setting - Implement context menu for Plus mode - Implement url mention - Implement cmd shift enter for vault search - Handle embedding model change at note reindex - Implement image support in chat - Fix vault qa and remove relevance threshold score - Implement brevilabs client, reranker when max score from orama is low - Implement chat history to plus mode - Pass only original user message for intent analysis and processing - Implement pdf in chat context - Implement web search - Implement youtube tool - Enable index on mode switch for copilot plus mode
27 lines
841 B
TypeScript
27 lines
841 B
TypeScript
import { App } from "obsidian";
|
|
import { BaseNoteModal } from "./BaseNoteModal";
|
|
|
|
export class NoteTitleModal extends BaseNoteModal<string> {
|
|
private onChooseNoteTitle: (noteTitle: string) => void;
|
|
|
|
constructor(app: App, noteTitles: string[], onChooseNoteTitle: (noteTitle: string) => void) {
|
|
super(app);
|
|
this.onChooseNoteTitle = onChooseNoteTitle;
|
|
this.availableNotes = this.getOrderedNotes()
|
|
.filter((file) => file.extension === "md")
|
|
.map((file) => file.basename);
|
|
}
|
|
|
|
getItems(): string[] {
|
|
return this.availableNotes;
|
|
}
|
|
|
|
getItemText(noteTitle: string): string {
|
|
const isActive = noteTitle === this.activeNote?.basename;
|
|
return this.formatNoteTitle(noteTitle, isActive);
|
|
}
|
|
|
|
onChooseItem(noteTitle: string, evt: MouseEvent | KeyboardEvent) {
|
|
this.onChooseNoteTitle(noteTitle);
|
|
}
|
|
}
|