AI.Tools.File.Edit (fnord v0.9.15)

View Source

Summary

Types

change()

@type change() :: natural_language() | exact() | hash_anchored()

edit_result()

@type edit_result() :: %{file: binary(), backup_file: binary(), diff: binary()}

exact()

@type exact() :: %{
  type: :exact,
  old_string: String.t(),
  new_string: String.t(),
  replace_all: boolean()
}

hash_anchored()

@type hash_anchored() :: %{
  type: :hash_anchored,
  hashes: [String.t()],
  old_string: String.t(),
  new_string: String.t()
}

natural_language()

@type natural_language() :: %{
  type: :natural_language,
  instruction: String.t(),
  context: String.t() | nil
}