Agent behavior improvements: - Add project context detection (tsconfig.json, pom.xml, etc.) - Enforce validation after changes (tsc --noEmit, mvn compile, etc.) - Run tests automatically - never ask "do you want me to run tests" - Complete full loop: create → type-check → test → confirm - Add command detection for direct execution (run tree, run ls) Diff view improvements: - Use darker backgrounds for added/removed lines - Add diffLineBgAdded, diffLineBgRemoved, diffLineText theme colors - Improve text visibility with white text on dark backgrounds - Update both React/Ink and SolidJS diff components Streaming fixes: - Fix tool call argument accumulation using OpenAI index field - Fix streaming content display after tool calls - Add consecutive error tracking to prevent token waste Other changes: - ESC to abort operations, Ctrl+C to exit - Fix model selection when provider changes in cascade mode - Add debug logging for troubleshooting - Move tests to root tests/ folder - Fix banner test GRADIENT_COLORS reference
47 lines
1.4 KiB
TypeScript
47 lines
1.4 KiB
TypeScript
/**
|
|
* Auto-Scroll Constants Tests
|
|
*
|
|
* Tests for auto-scroll constants
|
|
*/
|
|
|
|
import { describe, it, expect } from "bun:test";
|
|
import {
|
|
BOTTOM_THRESHOLD,
|
|
SETTLE_TIMEOUT_MS,
|
|
AUTO_SCROLL_MARK_TIMEOUT_MS,
|
|
KEYBOARD_SCROLL_LINES,
|
|
PAGE_SCROLL_LINES,
|
|
MOUSE_SCROLL_LINES,
|
|
} from "../src/constants/auto-scroll";
|
|
|
|
describe("Auto-Scroll Constants", () => {
|
|
it("should have reasonable bottom threshold", () => {
|
|
expect(BOTTOM_THRESHOLD).toBeGreaterThan(0);
|
|
expect(BOTTOM_THRESHOLD).toBeLessThan(20);
|
|
});
|
|
|
|
it("should have reasonable settle timeout", () => {
|
|
expect(SETTLE_TIMEOUT_MS).toBeGreaterThan(100);
|
|
expect(SETTLE_TIMEOUT_MS).toBeLessThan(1000);
|
|
});
|
|
|
|
it("should have reasonable auto-scroll mark timeout", () => {
|
|
expect(AUTO_SCROLL_MARK_TIMEOUT_MS).toBeGreaterThan(100);
|
|
expect(AUTO_SCROLL_MARK_TIMEOUT_MS).toBeLessThan(500);
|
|
});
|
|
|
|
it("should have reasonable keyboard scroll lines", () => {
|
|
expect(KEYBOARD_SCROLL_LINES).toBeGreaterThan(0);
|
|
expect(KEYBOARD_SCROLL_LINES).toBeLessThan(20);
|
|
});
|
|
|
|
it("should have reasonable page scroll lines", () => {
|
|
expect(PAGE_SCROLL_LINES).toBeGreaterThan(KEYBOARD_SCROLL_LINES);
|
|
expect(PAGE_SCROLL_LINES).toBeLessThan(50);
|
|
});
|
|
|
|
it("should have reasonable mouse scroll lines", () => {
|
|
expect(MOUSE_SCROLL_LINES).toBeGreaterThan(0);
|
|
expect(MOUSE_SCROLL_LINES).toBeLessThan(10);
|
|
});
|
|
}); |