mirror of
https://github.com/binhong87/obsidian-note-agent.git
synced 2026-07-22 06:52:10 +00:00
fix: restore this-binding in openSettings, bump to v0.3.4
Detaching a method via `const fn = obj.method` loses its `this` context. Replaced with Reflect.apply(fn, s, args) so the Obsidian Settings object's internal `this.app` reference stays intact. Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
This commit is contained in:
parent
32b76c6d88
commit
ca0b078d0f
4 changed files with 6 additions and 6 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "smart-note-agent",
|
||||
"name": "Smart Note Agent",
|
||||
"version": "0.3.3",
|
||||
"version": "0.3.4",
|
||||
"minAppVersion": "1.7.2",
|
||||
"description": "Agentic AI assistant for reading and editing vault notes.",
|
||||
"author": "Bin Hong",
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "smart-note-agent",
|
||||
"version": "0.3.3",
|
||||
"version": "0.3.4",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "smart-note-agent",
|
||||
"version": "0.3.3",
|
||||
"version": "0.3.4",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.39.4",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "smart-note-agent",
|
||||
"version": "0.3.3",
|
||||
"version": "0.3.4",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"doc": "docs"
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@
|
|||
if (!s) return;
|
||||
const openFn = s["open"];
|
||||
const openByIdFn = s["openTabById"];
|
||||
if (typeof openFn === "function") openFn();
|
||||
if (typeof openByIdFn === "function") openByIdFn(plugin.manifest.id);
|
||||
if (typeof openFn === "function") Reflect.apply(openFn, s, []);
|
||||
if (typeof openByIdFn === "function") Reflect.apply(openByIdFn, s, [plugin.manifest.id]);
|
||||
}
|
||||
$: providerLabel = (settingsTick, `${plugin.i18n.t(`provider.${plugin.settings.providerId}`)}:${activeProfile(plugin.settings).model}`);
|
||||
$: charCount = input.length;
|
||||
|
|
|
|||
Loading…
Reference in a new issue