Vibe.Prompt.Attachments (vibe v0.2.0)

Copy Markdown View Source

Parses lightweight prompt file attachments such as @image.png.

Summary

Types

processed()

@type processed() :: %{text: String.t(), images: [Vibe.Model.Content.Image.t()]}

Functions

attachments(prompt, root)

@spec attachments(String.t(), Path.t()) :: [Path.t()]

build_initial(prompt, file_args, opts \\ [])

@spec build_initial(String.t(), [String.t()], keyword()) ::
  {:ok, String.t() | [Vibe.Model.Content.t()]} | {:error, term()}

expand(prompt, opts \\ [])

@spec expand(
  String.t(),
  keyword()
) :: String.t() | [Vibe.Model.Content.t()]

process_file_args(file_args, opts \\ [])

@spec process_file_args(
  [String.t()],
  keyword()
) :: {:ok, processed()} | {:error, term()}