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:
@@ -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
@@ -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",
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user