mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 16:30:27 +00:00
Implement clickable wiki-links in assistant responses with WorkSpaceService for note navigation. Add API key validation with visual feedback in ChatWindow, automatically opening settings when empty. Extract settings helper to reduce code duplication. Refactor Gemini class to resolve API key from plugin settings rather than constructor parameter. Update system prompt with wiki-link usage guidelines. Remove unused ODB cache implementation and loadExternalCSS helper. Improve UI with enhanced empty state styling and input textarea scrolling behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
17 lines
No EOL
593 B
TypeScript
17 lines
No EOL
593 B
TypeScript
import type AIAgentPlugin from "main";
|
|
import { Resolve } from "./DependencyService";
|
|
import { Services } from "./Services";
|
|
import type { TFile, WorkspaceLeaf } from "obsidian";
|
|
|
|
export class WorkSpaceService {
|
|
private readonly plugin: AIAgentPlugin = Resolve(Services.AIAgentPlugin);
|
|
|
|
public async openNote(noteName: string) {
|
|
const file: TFile | null = this.plugin.app.metadataCache.getFirstLinkpathDest(noteName, "");
|
|
const leaf: WorkspaceLeaf = this.plugin.app.workspace.getLeaf(false);
|
|
|
|
if (file) {
|
|
await leaf.openFile(file);
|
|
}
|
|
}
|
|
} |