generated from nhcarrigan/template
fa906684c2
## Summary - **fix**: `show_thinking_blocks` setting now persists across sessions — it was defined on the TypeScript side but missing from the Rust `HikariConfig` struct, so serde silently dropped it on every save/load - **feat**: Tool calls are now rendered as collapsible blocks matching the Extended Thinking block aesthetic, replacing the old inline dropdown approach - **feat**: Add configurable max output tokens setting - **feat**: Use random creative names for conversation tabs - **test**: Significantly expanded frontend unit test coverage - **docs**: Require tests for all changes in CLAUDE.md - **feat**: Allow users to specify a custom terminal font (Closes #176) - **feat**: Display friendly names for memory files derived from the first heading (Closes #177) - **feat**: Add custom UI font support for the app chrome (buttons, labels, tabs) - **fix**: Apply custom UI font to the full app interface — `.app-container` was hardcoded, blocking inheritance from `body`; also renamed "Custom Font" to "Custom Terminal Font" for clarity ✨ This PR was created with help from Hikari~ 🌸 Reviewed-on: #175 Co-authored-by: Hikari <hikari@nhcarrigan.com> Co-committed-by: Hikari <hikari@nhcarrigan.com>
57 lines
1.3 KiB
TypeScript
57 lines
1.3 KiB
TypeScript
import { describe, it, expect, beforeEach } from "vitest";
|
|
import { get } from "svelte/store";
|
|
import { messageMode, getCurrentMode } from "./messageMode";
|
|
|
|
describe("messageMode store", () => {
|
|
beforeEach(() => {
|
|
messageMode.reset();
|
|
});
|
|
|
|
describe("initial state", () => {
|
|
it("defaults to chat mode", () => {
|
|
expect(get(messageMode)).toBe("chat");
|
|
});
|
|
});
|
|
|
|
describe("set", () => {
|
|
it("sets the mode to the given value", () => {
|
|
messageMode.set("plan");
|
|
expect(get(messageMode)).toBe("plan");
|
|
});
|
|
|
|
it("can set any arbitrary mode string", () => {
|
|
messageMode.set("auto");
|
|
expect(get(messageMode)).toBe("auto");
|
|
});
|
|
});
|
|
|
|
describe("reset", () => {
|
|
it("resets mode back to chat", () => {
|
|
messageMode.set("plan");
|
|
messageMode.reset();
|
|
expect(get(messageMode)).toBe("chat");
|
|
});
|
|
});
|
|
});
|
|
|
|
describe("getCurrentMode", () => {
|
|
beforeEach(() => {
|
|
messageMode.reset();
|
|
});
|
|
|
|
it("returns chat when in default state", () => {
|
|
expect(getCurrentMode()).toBe("chat");
|
|
});
|
|
|
|
it("returns the currently set mode", () => {
|
|
messageMode.set("plan");
|
|
expect(getCurrentMode()).toBe("plan");
|
|
});
|
|
|
|
it("returns chat after a reset", () => {
|
|
messageMode.set("auto");
|
|
messageMode.reset();
|
|
expect(getCurrentMode()).toBe("chat");
|
|
});
|
|
});
|