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>
73 lines
2.0 KiB
TypeScript
73 lines
2.0 KiB
TypeScript
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();
|
|
});
|
|
});
|
|
});
|