feat: better chat support for thinking
This commit is contained in:
43
PLAN.md
43
PLAN.md
@@ -13,11 +13,11 @@ sessions, tools, and turn orchestration.
|
||||
| Area | Status | Available now | Still open |
|
||||
| --- | --- | --- | --- |
|
||||
| App shell | Implemented | Native multi-window Iced app, Codex-inspired layout, native Application/Edit/Window menus, Preferences panel, Model Manager, and streaming composer | Native app release packaging |
|
||||
| Projects and sessions | Implemented for metadata | Native folder picker, project-name dialog, create/select/delete projects and sessions | Transcripts, KV payloads, rename/archive, and model binding |
|
||||
| Persistence | Implemented for metadata and preferences | SQLite in Application Support, Diesel ORM, embedded migrations, constrained defaults and CRUD tests | Messages, downloaded-artifact metadata, and session-runtime migrations |
|
||||
| Projects and sessions | Implemented with transcripts | Native folder picker, project-name dialog, create/select/delete projects and sessions, and durable structured chat history | KV payloads, rename/archive, and model binding |
|
||||
| Persistence | Implemented for metadata, preferences, and chat | SQLite in Application Support, Diesel ORM, embedded migrations, constrained defaults, streamed message updates, and reopen tests | Downloaded-artifact metadata and session-runtime migrations |
|
||||
| Model runtime | DeepSeek Flash vertical implemented | Rust-owned mmap/model/session graph, reused Metal kernels, 2K compressed-attention generation, DS4 sampling, lazy background loading, cancellation, and idle unloading | Ratio-4 sparse indexer beyond 2K, DSpark/SSD/steering, GLM/Pro, KV checkpoint persistence, and shared acquisition for HTTP |
|
||||
| Local endpoint | Not started | Nothing listening | OpenAI-compatible HTTP and streaming surfaces |
|
||||
| Agent | Basic local chat implemented | Multi-turn role rendering, streamed DeepSeek Flash text, composer send/stop, and in-memory transcript | Durable transcripts, reasoning presentation, tools, approvals, compaction, statistics, and KV-backed resume |
|
||||
| Agent | Basic local chat implemented | Multi-turn role rendering, structured reasoning disclosure, streamed DeepSeek Flash text, composer send/stop, and durable transcript rehydration | Tools, approvals, compaction, statistics, and KV-backed resume |
|
||||
| A2UI | Future extension | bDS2 provides the reference structured render-tool contract | Native inline surfaces for local chat after core chat and tools are stable |
|
||||
| Dev brain | Not started | No vault access | Obsidian vault selection, durable access, and agent knowledge/memory tools |
|
||||
| Release | Not started | Development binary builds and tests | `.app` packaging, signing, entitlements, and notarization |
|
||||
@@ -26,9 +26,10 @@ The application manages durable project/session metadata and model preferences.
|
||||
Its Model Manager downloads, validates, and deletes managed GGUF artifacts
|
||||
without blocking the UI. Local chat now lazily acquires the Rust DeepSeek Flash
|
||||
executor, streams generated text, supports cancellation and multi-turn role
|
||||
replay, and unloads model resources after the configured idle timeout. The
|
||||
replay, persists reasoning and answers while they stream, rehydrates selected
|
||||
sessions, and unloads model resources after the configured idle timeout. The
|
||||
current Rust graph supports DS4 compressed attention through 2K context; the sparse ratio-4 indexer,
|
||||
durable transcripts/KV checkpoints, HTTP service, and agent tools remain open.
|
||||
KV checkpoints, HTTP service, and agent tools remain open.
|
||||
|
||||
## Phase 0 — project and session shell
|
||||
|
||||
@@ -292,8 +293,8 @@ or KV frontier.
|
||||
|
||||
## Phase 3 — durable agent sessions
|
||||
|
||||
Status: **partially open**. Project/session metadata rows exist; transcripts,
|
||||
model binding, and KV payload persistence are not implemented.
|
||||
Status: **partially implemented**. Project/session metadata and structured
|
||||
transcripts are durable; model binding and KV payload persistence remain open.
|
||||
|
||||
Extend each metadata-only session with transcript and shared-checkpoint
|
||||
metadata:
|
||||
@@ -308,10 +309,11 @@ Application Support/DS4Server.rfc1437.de/
|
||||
<ds4-cache-key>.kv
|
||||
```
|
||||
|
||||
- Add migrated message/transcript tables and an optional current-checkpoint key
|
||||
to SQLite. Keep large engine-owned KV payloads only in the process-wide Phase
|
||||
1 store, written with atomic replacement; do not introduce separate
|
||||
agent-only or HTTP-only cache formats.
|
||||
- **Partially implemented:** migrated message tables persist user text,
|
||||
reasoning state, and assistant output while generation streams. Add the
|
||||
optional current-checkpoint key to SQLite. Keep large engine-owned KV
|
||||
payloads only in the process-wide Phase 1 store, written with atomic
|
||||
replacement; do not introduce separate agent-only or HTTP-only cache formats.
|
||||
- Record model identity, context size, rendered token history, title,
|
||||
timestamps, and working directory.
|
||||
- Restore compatible KV immediately. If KV is absent or incompatible, rebuild
|
||||
@@ -329,13 +331,20 @@ the same conversation without prefill when its KV payload is compatible.
|
||||
## Phase 4 — agent chat and tools
|
||||
|
||||
Status: **basic local chat implemented**. The conversation area streams
|
||||
multi-turn DeepSeek Flash output and supports Stop; durable messages, tool
|
||||
turns, and the coding-agent runtime remain open.
|
||||
multi-turn DeepSeek Flash output, persists and rehydrates structured reasoning
|
||||
and answers, and supports Stop; tool turns and the coding-agent runtime remain
|
||||
open.
|
||||
|
||||
1. **Partially implemented:** build the classic chat surface: transcript, reasoning disclosure, tool-call
|
||||
cards, composer, queued input, stop button, prefill progress, and generation
|
||||
statistics. Local turns must call the same session registry and KV path used
|
||||
by the HTTP endpoint.
|
||||
Every chat feature must persist its semantic state and rehydrate it when a
|
||||
session is reopened in the same implementation slice. In-memory-only chat
|
||||
features are incomplete by definition; disclosure state and other purely
|
||||
ephemeral presentation preferences are the only exception.
|
||||
|
||||
1. **Partially implemented:** build the classic chat surface. Transcript,
|
||||
structured reasoning disclosure, composer, streamed output, and Stop are
|
||||
complete; tool-call cards, queued input, prefill progress, and generation
|
||||
statistics remain. Local turns must call the same session registry and KV
|
||||
path used by the HTTP endpoint.
|
||||
2. Port the native agent turn loop from `ds4_agent.c`, including model-specific
|
||||
system prompts and DeepSeek DSML/GLM tool-call parsing.
|
||||
3. Implement the local tool set with the project directory as its boundary:
|
||||
|
||||
Reference in New Issue
Block a user