pai
    Preparing search index...

    Function tomlSet

    • Sets key in table ([] is the top of the file) to value, written as TOML, and marks the line with # pai setup. A line it replaces stays as a comment, so --provider off can put it back. A missing table is added at the end of the file. The result must parse to the old file with this one key changed.

      Parameters

      • file: string
      • text: string
      • table: string[]
      • key: string
      • value: string

      Returns string

      CliError setup_unreadable when the file is not valid TOML, or sets the key in a way a line edit can't change, such as an inline table or a dotted key.

      Compatibility export. Use planSetup, applySetup, and restoreSetup for agent setup.