# `WardrikWorkspace.File`

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"`.

# `t`

```elixir
@type t() :: %WardrikWorkspace.File{
  at: DateTime.t() | nil,
  by: String.t() | nil,
  content: String.t(),
  labels: [String.t()]
}
```

# `labelled`

```elixir
@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.

# `labels`

```elixir
@spec labels(t()) :: [String.t()]
```

Returns the file's labels. Returns `[]` for a file written before files kept labels.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
