generated from nhcarrigan/template
feat: multiple UI improvements, font settings, and memory file display names (#175)
## 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>
This commit was merged in pull request #175.
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
import { describe, it, expect, beforeEach } from "vitest";
|
||||
import {
|
||||
setShouldRestoreHistory,
|
||||
setSavedHistory,
|
||||
getShouldRestoreHistory,
|
||||
getSavedHistory,
|
||||
clearHistoryRestore,
|
||||
} from "./historyRestore";
|
||||
|
||||
describe("historyRestore module", () => {
|
||||
beforeEach(() => {
|
||||
clearHistoryRestore();
|
||||
});
|
||||
|
||||
describe("initial state", () => {
|
||||
it("shouldRestoreHistory is false by default", () => {
|
||||
expect(getShouldRestoreHistory()).toBe(false);
|
||||
});
|
||||
|
||||
it("savedHistory is null by default", () => {
|
||||
expect(getSavedHistory()).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe("setShouldRestoreHistory", () => {
|
||||
it("sets shouldRestoreHistory to true", () => {
|
||||
setShouldRestoreHistory(true);
|
||||
expect(getShouldRestoreHistory()).toBe(true);
|
||||
});
|
||||
|
||||
it("sets shouldRestoreHistory to false", () => {
|
||||
setShouldRestoreHistory(true);
|
||||
setShouldRestoreHistory(false);
|
||||
expect(getShouldRestoreHistory()).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("setSavedHistory", () => {
|
||||
it("sets the saved history string", () => {
|
||||
setSavedHistory("some history content");
|
||||
expect(getSavedHistory()).toBe("some history content");
|
||||
});
|
||||
|
||||
it("sets the saved history to null", () => {
|
||||
setSavedHistory("some history content");
|
||||
setSavedHistory(null);
|
||||
expect(getSavedHistory()).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe("clearHistoryRestore", () => {
|
||||
it("resets shouldRestoreHistory to false", () => {
|
||||
setShouldRestoreHistory(true);
|
||||
clearHistoryRestore();
|
||||
expect(getShouldRestoreHistory()).toBe(false);
|
||||
});
|
||||
|
||||
it("resets savedHistory to null", () => {
|
||||
setSavedHistory("some content");
|
||||
clearHistoryRestore();
|
||||
expect(getSavedHistory()).toBeNull();
|
||||
});
|
||||
|
||||
it("clears both values at once", () => {
|
||||
setShouldRestoreHistory(true);
|
||||
setSavedHistory("history");
|
||||
clearHistoryRestore();
|
||||
expect(getShouldRestoreHistory()).toBe(false);
|
||||
expect(getSavedHistory()).toBeNull();
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user