WardrikWorkspace. File
(wardrik_workspace v0.1.0-rc.1)
Copy Markdown
A file in a workspace.
:content- the file's text.:by- the agent that last wrote it.:at- when it was last written.:labels- labels of what the writing runs had read, such as"outside".
Summary
Functions
Wraps a tool's answer with the labels of files.
Returns the file's labels. Returns [] for a file written before files kept labels.
Types
@type t() :: %WardrikWorkspace.File{ at: DateTime.t() | nil, by: String.t() | nil, content: String.t(), labels: [String.t()] }
Functions
@spec labelled(map(), [t()]) :: {:ok, map() | ReqLLM.ToolResult.t()}
Wraps a tool's answer with the labels of files.
Returns {:ok, answer} when the files have no labels, and {:ok, %ReqLLM.ToolResult{}} with
the labels in its metadata otherwise.
Returns the file's labels. Returns [] for a file written before files kept labels.