summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-09-17 15:59:13 -0700
committerNate Sesti <sestinj@gmail.com>2023-09-17 15:59:13 -0700
commit0b2a23a1d003c88a9f2f6c4b03117d815b1c456d (patch)
tree2989c85ed8f3f726cd241997c406a5b9b1cd59da /docs
parentc350c72b1d2f8e518296b4baf76d4318e7ceee2e (diff)
downloadsncontinue-0b2a23a1d003c88a9f2f6c4b03117d815b1c456d.tar.gz
sncontinue-0b2a23a1d003c88a9f2f6c4b03117d815b1c456d.tar.bz2
sncontinue-0b2a23a1d003c88a9f2f6c4b03117d815b1c456d.zip
refactor: :recycle: from continuedev import run
Diffstat (limited to 'docs')
-rw-r--r--docs/docs/walkthroughs/headless-mode.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/docs/walkthroughs/headless-mode.md b/docs/docs/walkthroughs/headless-mode.md
index 16252f1f..913bff78 100644
--- a/docs/docs/walkthroughs/headless-mode.md
+++ b/docs/docs/walkthroughs/headless-mode.md
@@ -5,7 +5,7 @@
To use headless mode:
1. `pip install continuedev` (using a virtual environment is recommended)
-2. Import `continuedev` and call `run_step_headless` with the `Step` you would like to run
+2. Import `continuedev` and call `run` with the `Step` you would like to run
Example:
@@ -19,7 +19,7 @@ def say_hello(name: str):
and this function is imported and used in multiple places throughout your codebase. But the name parameter is new, and you need to change the function call everywhere it is used. You can use the script below to edit all usages of the function in your codebase:
```python
-from continuedev.headless import run_step_headless
+from continuedev import run
from continuedev.models.main import Position, PositionInFile
from continuedev.plugins.steps.refactor import RefactorReferencesStep
@@ -30,7 +30,7 @@ step = RefactorReferencesStep(
position=Position(line=0, character=5),
),
)
-run_step_headless(step=step)
+run(step)
```
Here we use Continue's built-in `RefactorReferencesStep`. By passing it the location (filepath and position) of the symbol (function, variable, etc.) that we want to update, Continue will automatically find all references to that symbol and prompt an LLM to make the edit requested in the `user_input` field.