Liking cljdoc? Tell your friends :D

im.ttalk.agent.tools.notes

笔记三件(T-06;出处 Keelson NotesTools.cs,借鉴 coxswain memory.ss):notes_list / notes_read / notes_write。

机制(存哪、按什么分)归宿主的 INotesStore 实现;这一层只把它包成模型能调的三件事,并把「什么时候该记」 写进说明——只说「写一篇笔记」的说明会得到两种极端:一条都不记,或把每轮对话都记成日志。

自带两个实现:dir-store(一个目录下一篇一个文件)、memory-store(进程内,测试 / 临时用)。 名字校验在工具层统一做(⛔ 拿名字拼路径逃出去),存储实现可以信任它。

笔记三件(T-06;出处 Keelson `NotesTools.cs`,借鉴 coxswain `memory.ss`):notes_list / notes_read / notes_write。

机制(存哪、按什么分)归宿主的 `INotesStore` 实现;这一层只把它包成模型能调的三件事,并把「什么时候该记」
写进说明——只说「写一篇笔记」的说明会得到两种极端:一条都不记,或把每轮对话都记成日志。

自带两个实现:`dir-store`(一个目录下一篇一个文件)、`memory-store`(进程内,测试 / 临时用)。
名字校验在工具层统一做(⛔ 拿名字拼路径逃出去),存储实现可以信任它。
raw docstring

dir-storeclj

(dir-store dir)

一个目录下一篇一个文件(UTF-8,原子写)。

一个目录下一篇一个文件(UTF-8,原子写)。
sourceraw docstring

INotesStorecljprotocol

list-notesclj

(list-notes store)

全部笔记名。

全部笔记名。

read-noteclj

(read-note store name)

正文;没有 ⇒ nil。

正文;没有 ⇒ nil。

write-note!clj

(write-note! store name content)

整篇写入(覆盖同名)。

整篇写入(覆盖同名)。
source

memory-storeclj

(memory-store)
(memory-store init)

进程内笔记(atom)。

进程内笔记(atom)。
sourceraw docstring

notes-list*clj

(notes-list* w _)
source

notes-read*clj

(notes-read* w {:keys [name]})
source

notes-write*clj

(notes-write* w {:keys [name content]})
source

notes_listclj

(notes_list args3309)

列出你记过的笔记(名字)。开始干活之前先看一眼:以前记下的结论能省掉一整轮摸索。

列出你记过的笔记(名字)。开始干活之前先看一眼:以前记下的结论能省掉一整轮摸索。
sourceraw docstring

notes_readclj

(notes_read {:as args3313 :or {} :keys [name]})

读一篇笔记。名字来自 notes_list。

读一篇笔记。名字来自 notes_list。
sourceraw docstring

notes_writeclj

(notes_write {:as args3319 :or {} :keys [name content]})

记一篇笔记(整篇覆盖同名)。只记跨会话还成立的结论:怎么构建 / 跑测试、代码约定、踩过的坑、用户明确说过的偏好。不要记这一轮的过程、临时状态或读一遍文件就知道的东西。更新一篇就先 notes_read 再整篇写回。

记一篇笔记(整篇覆盖同名)。只记跨会话还成立的结论:怎么构建 / 跑测试、代码约定、踩过的坑、用户明确说过的偏好。不要记这一轮的过程、临时状态或读一遍文件就知道的东西。更新一篇就先 notes_read 再整篇写回。
sourceraw docstring

read-max-charsclj

source

valid-name?clj

(valid-name? s)

非空、≤ 128 字符、两头无空白、不含路径分隔符与控制字符、不是 . / ..。

非空、≤ 128 字符、两头无空白、不含路径分隔符与控制字符、不是 . / ..。
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close