feat: add Ollama icon and modern chat UI styling

- src/chat-view.ts: Add getIcon() returning 'bot' for the view tab icon.
  Improve render() with role-specific CSS classes (user vs assistant) and
  message header structure for better styling hooks.

- src/main.ts: Add ribbon icon ('bot') in the left sidebar that opens the
  chat view with a single click.

- styles.css (new): Modern chat UI with message bubbles, distinct user and
  assistant themes using Obsidian CSS variables, sticky input bar, styled
  send button with accent color, and emoji role indicators.

- install.sh: Copy styles.css into the plugin directory and verify its
  presence during installation.

- README.md: Include styles.css in manual install instructions.

- __mocks__/obsidian.ts: Add addRibbonIcon() mock for test compatibility.

- tests/chat-view.test.ts: Add getIcon() assertion.
This commit is contained in:
2026-05-19 21:18:50 +02:00
parent 138890b9d2
commit 810676ff21
8 changed files with 212 additions and 18 deletions
+6
View File
@@ -100,6 +100,12 @@ describe('ChatView', () => {
});
});
describe('getIcon', () => {
it('should return the bot icon', () => {
expect(view.getIcon()).toBe('bot');
});
});
describe('onOpen', () => {
it('should call render and setup event listeners', async () => {
const renderSpy = jest.spyOn(view, 'render');