mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-05-06 11:12:39 +08:00
25 lines
783 B
Plaintext
25 lines
783 B
Plaintext
---
|
|
title: edit - ファイル編集
|
|
description: テキスト置換によるファイル編集
|
|
---
|
|
|
|
テキスト置換によるファイル編集を行います。`oldText` が空の場合、ファイル末尾に追記します。
|
|
|
|
## 依存関係
|
|
|
|
追加の依存関係は不要で、デフォルトで利用可能です。
|
|
|
|
## パラメータ
|
|
|
|
| パラメータ | 型 | 必須 | 説明 |
|
|
| --- | --- | --- | --- |
|
|
| `path` | string | はい | ファイルパス |
|
|
| `oldText` | string | はい | 置換対象の元テキスト(空の場合は追記) |
|
|
| `newText` | string | はい | 置換後のテキスト |
|
|
|
|
## ユースケース
|
|
|
|
- 設定ファイルの特定パラメータの変更
|
|
- コードのバグ修正
|
|
- ファイル内の特定位置へのコンテンツ挿入
|