feat: open new thread when activating note-as-context command

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
svemagie
2026-03-27 17:46:20 +01:00
parent 073fd52d56
commit b88306f414
3 changed files with 3 additions and 1 deletions
+1
View File
@@ -33305,6 +33305,7 @@ var MemexChatPlugin = class extends import_obsidian5.Plugin {
const leaf = this.app.workspace.getLeavesOfType(VIEW_TYPE_MEMEX_CHAT)[0];
if (leaf) {
const view = leaf.view;
view.newThread();
view.setInputValue(`Erkl\xE4re und verkn\xFCpfe [[${file.basename}]] mit anderen Konzepten im Vault.`);
view.setExplicitContext([file]);
}
+1 -1
View File
@@ -215,7 +215,7 @@ export class ChatView extends ItemView {
// ─── Thread Management ────────────────────────────────────────────────────
private newThread(): void {
newThread(): void {
const thread: Thread = {
id: Date.now().toString(),
title: "Neuer Chat",
+1
View File
@@ -85,6 +85,7 @@ export default class MemexChatPlugin extends Plugin {
const leaf = this.app.workspace.getLeavesOfType(VIEW_TYPE_MEMEX_CHAT)[0];
if (leaf) {
const view = leaf.view as ChatView;
view.newThread();
view.setInputValue(`Erkläre und verknüpfe [[${file.basename}]] mit anderen Konzepten im Vault.`);
view.setExplicitContext([file]);
}