diff options
| author | Adam Malczewski <[email protected]> | 2026-06-22 15:14:31 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-22 15:14:31 +0900 |
| commit | 0c7e7ceae36930e87fc30993f18e30cf54888295 (patch) | |
| tree | deae0cde3105e6cd22c1cd13f59b5524edad611c /src/features/chat/index.ts | |
| parent | b7ea4b7325c02bf29046ab232411c053b36a99bd (diff) | |
| download | dispatch-web-0c7e7ceae36930e87fc30993f18e30cf54888295.tar.gz dispatch-web-0c7e7ceae36930e87fc30993f18e30cf54888295.zip | |
feat: consume context window + percentage-based compact handoff
1. Real context window: GET /models now returns modelInfo[model].contextWindow.
The Composer uses this instead of the hardcoded MAX_CONTEXT = 1,000,000.
Falls back to 1M when modelInfo is absent or the model has no contextWindow.
2. Percentage-based auto-compact: the compact-threshold endpoint is renamed
to compact-percent. The CompactionView now shows a percent input (0-100,
default 85, 0 = manual) instead of a token count input. Types renamed:
CompactThresholdResponse → CompactPercentResponse,
SetCompactThresholdRequest → SetCompactPercentRequest.
Note: the field name in the backend types is still 'threshold' (not
'percent') — the FE maps between them.
Re-mirrored .dispatch/transport-contract.reference.md.
686 tests green. 0 svelte-check errors + warnings.
Diffstat (limited to 'src/features/chat/index.ts')
| -rw-r--r-- | src/features/chat/index.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/features/chat/index.ts b/src/features/chat/index.ts index 9c65cd4..1596c53 100644 --- a/src/features/chat/index.ts +++ b/src/features/chat/index.ts @@ -17,7 +17,7 @@ export { export type { ChatStore, ChatStoreDependencies } from "./store.svelte"; export { createChatStore } from "./store.svelte"; export { default as ChatView } from "./ui/ChatView.svelte"; -export type { CompactNowResult, SaveCompactThresholdResult } from "./ui/CompactionView.svelte"; +export type { CompactNowResult, SaveCompactPercentResult } from "./ui/CompactionView.svelte"; export { default as CompactionView } from "./ui/CompactionView.svelte"; export { default as Composer } from "./ui/Composer.svelte"; export { default as ModelSelector } from "./ui/ModelSelector.svelte"; |
