Commit graph

8 commits

Author SHA1 Message Date
Bin-Home
32b76c6d88 chore: fix all ObsidianReviewBot lint errors, bump to v0.3.3
Resolves all Required issues flagged by the Obsidian community plugin
review bot:

- Replace explicit `any` types with typed interfaces and intersection
  types across providers, tools, UI components, and services
- Remove `async` from functions/methods with no `await`; return
  Promise.resolve() where the interface demands Promise<string>
- Replace `fetch` bare global with `window.fetch` and remove
  eslint-disable comments for no-restricted-globals
- Replace `globalThis.fetch` with `window.fetch` (prefer-active-doc)
- Replace string literal style assignments with template literals to
  satisfy no-static-styles-assignment; remove disable comments
- Fix sentence case: "Apply all" / "Reject all" in en.json
- Change default chats folder migration to use regex instead of
  hardcoded .obsidian/ path literal (hardcoded-config-path)
- Remove unnecessary type assertion in migrateSettings
- Remove await from non-Promise listFolder call (await-thenable)
- Add argsIgnorePattern to no-unused-vars in eslint.config.mjs

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
2026-04-30 10:29:12 +08:00
Bin-Home
33d20f6e28 chore: add eslint-plugin-obsidianmd, fix lint errors, bump to v0.3.2
Migrate to ESLint v9 flat config, integrate obsidianmd plugin, fix all
required errors (prefer-active-window-timers, no-tfile-tfolder-cast,
no-unsupported-api, floating promises, etc.), and bump minAppVersion to
1.7.2 to match revealLeaf API requirement.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
2026-04-29 22:07:41 +08:00
Bin-Home
ff6940cbba feat: rename to Obsidian Note Agent, fix default model display in status bar and indicator
- Plugin id/name updated to obsidian-note-agent (Bin-Home)
- Class renamed ObsidianAgentPlugin → ObsidianNoteAgentPlugin throughout
- VIEW_TYPE and default chatsFolder path updated to match new id
- Status bar and provider indicator button now use activeProfile() so
  the default model name shows instead of "-" when no override is set
- Indicator button separator changed from " / " to ":" to match status bar
- Add README.md and README-cn.md

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
2026-04-25 17:36:45 +08:00
Bin-Home
3c39fdadea feat: user profile, auto-approve with backup, dist build, UX fixes
- Add user-profile "About Me" setting injected into every system prompt
- Chat history moved to .obsidian/plugins/obsidian-agent/chats (hidden from vault); auto-purge after 30 days
- Fix ApprovalQueue stuck state: re-insert entry on commit failure, always emit
- Fix list_folder returning only .md files (getMarkdownFiles → getFiles)
- Add auto-approve toggle in Edit mode: auto-commits writes, backs up originals to __auto_backup__/{timestamp}/{path}, shows Notice per backup
- Update DeepSeek default model to deepseek-v4-pro
- Build outputs to dist/ (main.js, styles.css, manifest.json); remove root build artifacts

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
2026-04-25 16:44:17 +08:00
Bin-Home
f3c45e40fc feat: full i18n coverage (en + zh-CN) across chat, history, settings
Translates remaining hardcoded UI strings — chat shell, conversation
history drawer, diff review, mode toggle, settings tab — and adds a
parity test so en.json and zh-CN.json key sets stay in lockstep.

Conversation list now uses sentinel group keys for ordering and
Intl.DateTimeFormat for locale-aware date rows.
2026-04-24 13:32:49 +08:00
Bin-Home
f7eb170916 feat: rich chat UI with markdown rendering and visual polish
Markdown rendering:
- New markdown-action.ts wraps Obsidian's MarkdownRenderer.render() so
  completed assistant messages render code blocks (syntax-highlighted),
  tables, headings, blockquotes, inline code, links, and wikilinks
- Copy button auto-injected into every <pre>, visible on hover
- Streaming stays as plain text (no flicker during generation)

Visual polish:
- MessageList: right-aligned gradient user bubbles with shadow, card-style
  assistant bubbles with rounded corners, avatar glow, fade-in-slide animation,
  full markdown content CSS via :global() overrides
- ChatView: frosted-glass header (backdrop-filter), gradient send button with
  scale hover + shadow, elevated input card with focus pulse, char counter
  appears at 500+ chars
- DiffReviewBlock: file-path pill chip, dual line-number gutter (old/new),
  3px left accent stripe on add/del rows, filled approve button
- ModeToggle: gradient fill on active pill
- ConversationList: accent left-border on active item, shadow-lift on hover
- ChangeSummary: bordered badge chips with subtle shadow

All colors use color-mix() against Obsidian CSS variables for light/dark
theme compatibility. Animations respect prefers-reduced-motion.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
2026-04-22 22:38:22 +08:00
Bin-Home
7a1a45fa31 feat: redesign chat UI to match VSCode Copilot/Cursor style
- ChatView: header with history toggle, provider chip, segmented mode toggle,
  auto-resize textarea, send/stop buttons with proper ARIA labels
- MessageList: avatar rows (user/bot), styled bubbles, streaming cursor blink,
  empty state with hint text, user-scroll-up detection, pending diff group
- ModeToggle: segmented pill with SVG icons and aria-pressed
- DiffReviewBlock: VSCode-style line diff (add/del/ctx), tool-icon map,
  inline approve/reject buttons with color-coded borders
- ChangeSummary: badge chips (create/edit/delete), checkmark icon, aria-live
- ConversationList: clean item list with chat icon, active highlight, date hint

All components use Obsidian CSS variables for light/dark theme compatibility.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
2026-04-22 22:09:21 +08:00
Bin-Home
cce38a8e18 feat: diff review block and change summary 2026-04-22 20:49:01 +08:00