Some checks failed
- Introduced `ai_endpoint_mgr` plugin to manage multiple AI provider endpoints. - Added configuration reference documentation for `config.toml`. - Implemented endpoint loading, active endpoint switching, and model mutation. - Included error handling for missing endpoints and configuration failures. - Developed unit tests covering various scenarios including error paths and concurrency.
3.3 KiB
3.3 KiB
dstalk 文档
文档采用 Diataxis 框架组织: 教程 / 操作指南 / 解释 / 参考 四类分离。
已有文档
教程 (Tutorials) — 从零开始的学习路径
| 文档 | 说明 |
|---|---|
| 快速入门 | 5 步上手: 安装工具链、编译、配置、运行、第一个对话 |
解释 (Explanation) — 背景与设计决策
| 文档 | 说明 |
|---|---|
| 架构哲学 | 为什么是插件架构, host/plugin/service 三层模型, service registry 和 event bus 的职责, C ABI 的选择理由 |
| 插件生命周期 | DLL 加载与拓扑排序, on_init/on_shutdown 契约, 跨 DLL 堆分配与 ABI 纪律 |
参考 (Reference) — 精确的技术描述
| 文档 | 说明 |
|---|---|
| CLI 命令速查 | 全部 CLI 命令的别名、作用与示例 |
| 配置参考 | config.toml 单 provider 与多 endpoint 全部字段说明、默认值与安全提示 |
| Plugin ABI 契约 | 跨 DLL 通信的 C ABI 规范:内存所有权、堆纪律、回调线程安全 |
未来计划
教程
- 插件开发入门 (
tutorial/plugin-dev.md) — TODO: 写一个 Hello World 插件, 注册服务并调用 - LSP 集成教程 (
tutorial/lsp-setup.md) — TODO: 配置 clangd 并在 dstalk 中使用诊断/补全
操作指南 (How-to Guides) — 解决具体问题
- 切换 AI 后端 (
how-to/switch-provider.md) — TODO: 在 DeepSeek / Anthropic / OpenAI 间切换 - 配置 API Key (
how-to/config-api-key.md) — TODO: config.toml 各项配置说明与安全建议 - 使用 File 命令管理项目文件 (
how-to/file-commands.md) — TODO: 列目录、查看、读写文件的工作流 - 自定义前端开发 (
how-to/custom-frontend.md) — TODO: 基于 C ABI 编写自己的前端程序 - 批处理模式 (
how-to/batch-mode.md) — TODO:--batch标志与非交互式使用
解释 (Explanation) — 背景与设计决策
- 架构哲学 (
explanation/architecture.md) — 插件架构、三层模型、service registry/event bus、C ABI 选择 - 插件生命周期 (
explanation/plugin-lifecycle.md) — DLL 加载、拓扑排序、on_init/on_shutdown 契约、ABI 纪律 - 为什么用 C/C++ (
explanation/why-cpp.md) — TODO: 启动速度、内存占用、运行时依赖、嵌入能力的对比分析 - Diataxis 文档框架 (
explanation/diataxis.md) — TODO: 本文档组织方式的设计思路
参考
- API 参考 (
reference/api.md) — TODO: dstalk_host.h 完整 API 说明与调用示例 - 配置参考 (
reference/config.md) — config.toml 所有字段的详细说明、默认值与安全提示 - 服务接口参考 (
reference/services.md) — TODO: dstalk_services.h 中所有 vtable 接口定义
文档约定
- 命令以
$前缀表示, 在终端中运行 - 代码块标注语言 (
c,toml, ```bash 等) - 表示计划中未完成的文档
- 配置文件模板见项目根目录
config.example.toml
贡献文档
文档使用 Markdown 编写, 存放在 docs/ 目录下。
欢迎通过 PR 补充或修正文档内容。