mirror of
https://github.com/blamouche/obsidian-any-ai-code.git
synced 2026-07-22 06:53:38 +00:00
Align plugin with Obsidian community submission guidelines
Audit-driven fixes for community-store submission:
- Add a top-level MIT LICENSE so the license is discoverable next to
the manifest and README.
- Remove leaf.detach() from onunload — the plugin guidelines
explicitly require not detaching custom-view leaves on unload so
Obsidian preserves leaf placement across reloads.
- Settings tab UI text guidelines:
- Drop the top-level plugin-name <h2> heading.
- Drop the redundant heading on the first general section
(general settings now sit at the top with no heading, per the
"Only use headings under settings if you have more than one
section" rule).
- Replace remaining <h3> elements with
new Setting(containerEl).setName(...).setHeading() so headings
inherit Obsidian's setting-heading styling.
- Release workflow now creates drafts (draft: true), matching the
official "Release your plugin with GitHub Actions" guide so the
author reviews release notes before publishing.
- Tighten manifest description to a clearer action statement that
avoids the "OpenAI" parsing ambiguity.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d6a3c1c5b9
commit
8100cecd42
8 changed files with 41 additions and 22 deletions
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
|
|
@ -58,6 +58,9 @@ jobs:
|
|||
tag_name: ${{ github.ref_name }}
|
||||
generate_release_notes: true
|
||||
fail_on_unmatched_files: true
|
||||
# Per Obsidian release guide, releases are created as drafts so the
|
||||
# author can review release notes before publishing.
|
||||
draft: true
|
||||
body: |
|
||||
## Install
|
||||
|
||||
|
|
|
|||
|
|
@ -50,3 +50,4 @@
|
|||
| 2026-04-26 07:48:00 CEST | agent | Fixed three sidebar styling issues: solid-red Stop hover (was red-on-translucent-red, unreadable), neutralized native chrome on runtime select with `appearance:none` + custom Lucide chevron, switched Start accent from theme accent to green (`var(--color-green)`). Validated build/tests. | `main.ts`, `styles.css`, `npm run build`, `npm test`, `.prompt-hub/version.md`, `.prompt-hub/releases.md` | success | Commit and push to main. |
|
||||
| 2026-04-26 07:50:00 CEST | agent | Added `@Active folder` sidebar button that inserts the parent folder of the active file (vault-relative path) into the running CLI; falls back to `@./ ` for vault-root files. Added vitest coverage (27 tests). | `runtime-utils.ts`, `tests/runtime-utils.test.ts`, `main.ts`, `README.md`, `npm run build`, `npm test`, `.prompt-hub/version.md`, `.prompt-hub/releases.md` | success | Commit and push to main. |
|
||||
| 2026-04-26 07:51:00 CEST | agent | Added blue `claude-cli-btn-info` highlight modifier and applied it to `@Active file` / `@Active folder` so the editor-context buttons read as a paired group alongside green Start / red Stop. Validated build/tests. | `main.ts`, `styles.css`, `npm run build`, `npm test`, `.prompt-hub/version.md`, `.prompt-hub/releases.md` | success | Commit and push to main. |
|
||||
| 2026-04-26 08:24:00 CEST | agent | Audited plugin against the four official Obsidian guideline pages (build, submission requirements, plugin guidelines, release workflow) and applied compliance fixes: added LICENSE (MIT), removed `leaf.detach()` from `onunload`, replaced `<h2>`/`<h3>` settings headings with `Setting().setHeading()` and dropped the top-level plugin-name heading + first-section heading, switched release workflow to draft mode, tightened manifest description. Validated build/tests. | `LICENSE`, `main.ts`, `manifest.json`, `.github/workflows/release.yml`, `npm run build`, `npm test`, `.prompt-hub/version.md`, `.prompt-hub/releases.md`, `.prompt-hub/memory.md` | success | Commit and push to main; user can tag when ready for submission. |
|
||||
|
|
|
|||
|
|
@ -1,5 +1,13 @@
|
|||
# Releases
|
||||
|
||||
## 0.1.34 - 2026-04-26
|
||||
- Aligned the plugin with the Obsidian community plugin submission guidelines:
|
||||
- Added a top-level `LICENSE` file (MIT) so the license is discoverable independently of `package.json`.
|
||||
- Removed the `leaf.detach()` calls from `onunload` (Obsidian preserves leaf state across reloads/updates per the plugin guidelines).
|
||||
- Reworked the settings tab to use `new Setting(...).setHeading()` instead of raw `<h2>`/`<h3>` elements; dropped the redundant top-level plugin-name heading and the heading on the first general-settings section per the UI text guidelines.
|
||||
- Switched the release workflow to publish drafts (`draft: true`), matching the official Obsidian release guide so the author reviews release notes before going live.
|
||||
- Tightened the `manifest.json` description to a more action-oriented, unambiguous statement: `Run AI coding CLIs like Claude Code or Codex from a right sidebar terminal panel.`
|
||||
|
||||
## 0.1.33 - 2026-04-26
|
||||
- Added a blue highlight accent to `@Active file` and `@Active folder` buttons (resting border tint + icon color, solid blue fill with white text/icon on hover) so the file-context actions read as a paired group distinct from the green Start and red Stop.
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
0.1.33
|
||||
0.1.34
|
||||
|
|
|
|||
21
LICENSE
Normal file
21
LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2026 Benoit Lamouche
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
11
main.js
11
main.js
|
|
@ -9853,7 +9853,6 @@ var ClaudeCliPlugin = class extends import_obsidian.Plugin {
|
|||
this.addSettingTab(new ClaudeCliSettingTab(this.app, this));
|
||||
}
|
||||
async onunload() {
|
||||
this.app.workspace.getLeavesOfType(VIEW_TYPE_CLAUDE).forEach((leaf) => leaf.detach());
|
||||
}
|
||||
async activateView() {
|
||||
const { workspace } = this.app;
|
||||
|
|
@ -9899,12 +9898,6 @@ var ClaudeCliSettingTab = class extends import_obsidian.PluginSettingTab {
|
|||
display() {
|
||||
const { containerEl } = this;
|
||||
containerEl.empty();
|
||||
containerEl.createEl("h2", { text: "CLI AI Assistant" });
|
||||
containerEl.createEl("p", {
|
||||
text: "Configure runtime behavior, launch commands, and advanced execution options.",
|
||||
cls: "setting-item-description"
|
||||
});
|
||||
containerEl.createEl("h3", { text: "Runtime behavior" });
|
||||
new import_obsidian.Setting(containerEl).setName("Default runtime").setDesc("Runtime selected by default when opening the panel (and used by auto-start).").addDropdown((dropdown) => {
|
||||
const runtimes = this.plugin.settings.runtimes;
|
||||
if (runtimes.length === 0) {
|
||||
|
|
@ -9940,7 +9933,7 @@ var ClaudeCliSettingTab = class extends import_obsidian.PluginSettingTab {
|
|||
await this.plugin.saveSettings();
|
||||
})
|
||||
);
|
||||
containerEl.createEl("h3", { text: "Runtimes" });
|
||||
new import_obsidian.Setting(containerEl).setName("Runtimes").setHeading();
|
||||
containerEl.createEl("p", {
|
||||
text: "Configure the CLIs that show up in the sidebar dropdown. Each entry needs a display name and a launch command. Add as many as you want.",
|
||||
cls: "setting-item-description"
|
||||
|
|
@ -9995,7 +9988,7 @@ var ClaudeCliSettingTab = class extends import_obsidian.PluginSettingTab {
|
|||
this.display();
|
||||
})
|
||||
);
|
||||
containerEl.createEl("h3", { text: "Advanced" });
|
||||
new import_obsidian.Setting(containerEl).setName("Advanced").setHeading();
|
||||
new import_obsidian.Setting(containerEl).setName("Node executable").setDesc("Optional override for PTY proxy Node runtime. Leave as 'auto' for automatic detection.").addText(
|
||||
(text) => text.setPlaceholder("auto").setValue(this.plugin.settings.nodeExecutable).onChange(async (value) => {
|
||||
this.plugin.settings.nodeExecutable = value.trim() || "auto";
|
||||
|
|
|
|||
15
main.ts
15
main.ts
|
|
@ -511,7 +511,8 @@ export default class ClaudeCliPlugin extends Plugin {
|
|||
}
|
||||
|
||||
async onunload(): Promise<void> {
|
||||
this.app.workspace.getLeavesOfType(VIEW_TYPE_CLAUDE).forEach((leaf) => leaf.detach());
|
||||
// Per Obsidian plugin guidelines, do not detach leaves on unload —
|
||||
// Obsidian preserves leaf state across reloads/updates.
|
||||
}
|
||||
|
||||
async activateView(): Promise<void> {
|
||||
|
|
@ -574,14 +575,6 @@ class ClaudeCliSettingTab extends PluginSettingTab {
|
|||
const { containerEl } = this;
|
||||
containerEl.empty();
|
||||
|
||||
containerEl.createEl("h2", { text: "CLI AI Assistant" });
|
||||
containerEl.createEl("p", {
|
||||
text: "Configure runtime behavior, launch commands, and advanced execution options.",
|
||||
cls: "setting-item-description"
|
||||
});
|
||||
|
||||
containerEl.createEl("h3", { text: "Runtime behavior" });
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName("Default runtime")
|
||||
.setDesc("Runtime selected by default when opening the panel (and used by auto-start).")
|
||||
|
|
@ -633,7 +626,7 @@ class ClaudeCliSettingTab extends PluginSettingTab {
|
|||
})
|
||||
);
|
||||
|
||||
containerEl.createEl("h3", { text: "Runtimes" });
|
||||
new Setting(containerEl).setName("Runtimes").setHeading();
|
||||
containerEl.createEl("p", {
|
||||
text: "Configure the CLIs that show up in the sidebar dropdown. Each entry needs a display name and a launch command. Add as many as you want.",
|
||||
cls: "setting-item-description"
|
||||
|
|
@ -708,7 +701,7 @@ class ClaudeCliSettingTab extends PluginSettingTab {
|
|||
})
|
||||
);
|
||||
|
||||
containerEl.createEl("h3", { text: "Advanced" });
|
||||
new Setting(containerEl).setName("Advanced").setHeading();
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName("Node executable")
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"name": "Any AI CLI",
|
||||
"version": "0.1.33",
|
||||
"minAppVersion": "1.5.0",
|
||||
"description": "Open AI CLI in a right sidebar view.",
|
||||
"description": "Run AI coding CLIs like Claude Code or Codex from a right sidebar terminal panel.",
|
||||
"author": "Benoit Lamouche",
|
||||
"authorUrl": "https://lamouche.fr",
|
||||
"isDesktopOnly": true
|
||||
|
|
|
|||
Loading…
Reference in a new issue