bots-garden/mini-mepublic Fork 0
d72271127802973540c648bfb372176cdaaa8e4f
Commits
Clone
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

💾 Saved. d722711 · on d72271127802973540c648bfb372176cdaaa8e4f · k33g · 7h ago
attach-a-file.md · 44 lines · 2.0 KBmarkdown
Blame HistoryOpen raw

Point the model at a file with @path

Name a file or a directory in your question with @ followed by its path. mini-me checks that the path exists, tells the model where it is, and the model reads it with its tools. There is no picker or completion: you type the path.

Steps

  1. Start mm from the project directory. Relative paths are resolved from there.

  2. Write the path in the question, glued to @:

    > explain what @internal/acp/acp.go does with @internal/session
    📎 /work/mini-me/internal/acp/acp.go
    📎 /work/mini-me/internal/session
    

    One 📎 line per attached path confirms the notation was understood. The model receives your sentence as typed, followed by one line per path:

    [attached file: /work/mini-me/internal/acp/acp.go]
    [attached directory: /work/mini-me/internal/session]
    
  3. Ask away. The content is not copied into the prompt: the model runs cat, read_file or ls on the path when it needs to.

Rules

Case Result
@internal/acp/acp.go Relative to the directory mm was started in (the session's cwd in ACP mode).
@/abs/path, @~/file Absolute paths and ~ work.
@main.go, (@main.go) "@main.go" Sentence punctuation and brackets around the mention are ignored.
@bob, @does/not/exist Nothing on disk: left in the sentence as plain text, no attachment.
k33g@example.com A @ glued to a word is not a mention.
Same path twice Attached once.
Path with spaces Not supported: a mention ends at the first space.

In an editor (ACP)

The editor's own @ picker sends the file as a resource_link, which mini-me turns into the same [attached file: …] line. A path typed by hand, without the picker, is understood the same way, relative to the project the editor opened. Attached paths are logged on stderr as [acp] session <id>: attached <path>.

See also

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Point the model at a file with `@path`

Name a file or a directory in your question with `@` followed by its path. mini-me checks that the path exists, tells the model where it is, and the model reads it with its tools. There is no picker or completion: you type the path.

## Steps

1. Start `mm` from the project directory. Relative paths are resolved from there.
2. Write the path in the question, glued to `@`:

   ```
   > explain what @internal/acp/acp.go does with @internal/session
   📎 /work/mini-me/internal/acp/acp.go
   📎 /work/mini-me/internal/session
   ```

   One `📎` line per attached path confirms the notation was understood. The model receives your sentence as typed, followed by one line per path:

   ```
   [attached file: /work/mini-me/internal/acp/acp.go]
   [attached directory: /work/mini-me/internal/session]
   ```

3. Ask away. The content is not copied into the prompt: the model runs `cat`, `read_file` or `ls` on the path when it needs to.

## Rules

| Case | Result |
|------|--------|
| `@internal/acp/acp.go` | Relative to the directory `mm` was started in (the session's `cwd` in ACP mode). |
| `@/abs/path`, `@~/file` | Absolute paths and `~` work. |
| `@main.go,` `(@main.go)` `"@main.go"` | Sentence punctuation and brackets around the mention are ignored. |
| `@bob`, `@does/not/exist` | Nothing on disk: left in the sentence as plain text, no attachment. |
| `k33g@example.com` | A `@` glued to a word is not a mention. |
| Same path twice | Attached once. |
| Path with spaces | Not supported: a mention ends at the first space. |

## In an editor (ACP)

The editor's own `@` picker sends the file as a `resource_link`, which mini-me turns into the same `[attached file: …]` line. A path typed by hand, without the picker, is understood the same way, relative to the project the editor opened. Attached paths are logged on stderr as `[acp] session <id>: attached <path>`.

## See also

- [Built-in tools](../reference/tools.md) — what the model reads the file with
- [Use mini-me from an editor](use-from-an-editor.md)