Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

Docs: Add footer with links to report bugs (#404)

Kilian Lieret6dcf2288709d
diff --git a/docs/_footer.md b/docs/_footer.md
new file mode 100644
index 00000000..5ba70f9d
--- /dev/null
+++ b/docs/_footer.md
@@ -0,0 +1,9 @@
+<div class="grid cards" markdown>
+
+- :material-bug:{ .lg .middle } __Something broken?__
+ [:octicons-arrow-right-24: Report bug](https://github.com/princeton-nlp/SWE-agent/issues/new?template=bug_report.yml)
+
+- :material-help:{ .lg .middle } __Something unclear?__
+ [:octicons-arrow-right-24: Ask question](https://github.com/princeton-nlp/SWE-agent/issues/new?template=question.yml)
+
+</div>
diff --git a/docs/dev/commands.md b/docs/dev/commands.md
index 6155f946..bba7a0a7 100644
--- a/docs/dev/commands.md
+++ b/docs/dev/commands.md
@@ -54,3 +54,5 @@ Next, run your configuration and see how your agent uses the commands!
```bash
python run.py --config_file config/[your config].yaml ...
```
+
+{% include-markdown "../_footer.md" %}
\ No newline at end of file
diff --git a/docs/dev/config.md b/docs/dev/config.md
index 74666fee..f921d9e8 100644
--- a/docs/dev/config.md
+++ b/docs/dev/config.md
@@ -97,3 +97,5 @@ One of three templates can be shown per turn:
* "Format Error" (`format_error_template`): Displayed if the model's response is malformed. Over the next two turns...
* If one of the model's next response is correct, the message history is updated such that the "Format Error" turn is not kept. The episode continues.
* If the model's next two responses are both malformed, the episode terminates.
+
+{% include-markdown "../_footer.md" %}
\ No newline at end of file
diff --git a/docs/dev/demonstrations.md b/docs/dev/demonstrations.md
index c44f6dfb..021f52b9 100644
--- a/docs/dev/demonstrations.md
+++ b/docs/dev/demonstrations.md
@@ -8,3 +8,5 @@ To edit text in ```human``` mode:
1. Run the command ```edit edit_start_line:edit_end_line```
2. Write the text you want to insert. Feel free to write the text across multiple lines.
3. Press ```return``` then write ```end_of_edit``` and then press ```return``` again to submit the edit.
+
+{% include-markdown "../_footer.md" %}
\ No newline at end of file
diff --git a/docs/dev/modify.md b/docs/dev/modify.md
index 255aaae4..5b8a67d7 100644
--- a/docs/dev/modify.md
+++ b/docs/dev/modify.md
@@ -16,4 +16,4 @@ Any [trajectory](../usage/trajectories.md) can be turned into a new demonstratio
* See the [`sweagent/agent/`](https://github.com/princeton-nlp/SWE-agent/tree/main/sweagent/agent/) folder for details about the logic behind configuration based workflows.
* See the [`sweagent/environment/`](https://github.com/princeton-nlp/SWE-agent/tree/main/sweagent/environment/) folder for details about the `SWEEnv` environment (interface + implementation).
* See the [`trajectories/`](https://github.com/princeton-nlp/SWE-agent/tree/main/trajectories) folder for details about the output of `run.py`.
-* See the [`evaluation/`](https://github.com/princeton-nlp/SWE-agent/tree/main/evaluation/) folder for details about how evaluation works.
+* See the [`evaluation/`](https://github.com/princeton-nlp/SWE-agent/tree/main/evaluation/) folder for details about how evaluation works.
\ No newline at end of file
diff --git a/docs/installation/codespaces.md b/docs/installation/codespaces.md
index a45975c4..210de68a 100644
--- a/docs/installation/codespaces.md
+++ b/docs/installation/codespaces.md
@@ -27,4 +27,6 @@ If you instead only see the offer to forward port `8000`, do not click it (this
Instead, click on the `Ports` tab, and click on the globe next to port `3000`:
-![port 3000 forwarding manual](../assets/open_port_in_browser.png)
\ No newline at end of file
+![port 3000 forwarding manual](../assets/open_port_in_browser.png)
+
+{% include-markdown "../_footer.md" %}
\ No newline at end of file
diff --git a/docs/installation/docker.md b/docs/installation/docker.md
index b1a14f0f..9bd1ce25 100644
--- a/docs/installation/docker.md
+++ b/docs/installation/docker.md
@@ -29,4 +29,6 @@ docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock \
* If you're using docker on Windows, use `-v //var/run/docker.sock:/var/run/docker.sock`
(double slash) to escape it ([more information](https://stackoverflow.com/a/47229180/)).
* See the [installation issues section](tips.md) for more help if you run into
- trouble.
\ No newline at end of file
+ trouble.
+
+{% include-markdown "../_footer.md" %}
\ No newline at end of file
diff --git a/docs/installation/source.md b/docs/installation/source.md
index 3135a671..0ca5a4ec 100644
--- a/docs/installation/source.md
+++ b/docs/installation/source.md
@@ -21,4 +21,6 @@ Installation from source is the preferred way to set up SWE-agent on your machin
[conda]: https://docs.conda.io/en/latest/
[virtual environments]: https://realpython.com/python-virtual-environments-a-primer/
-[^1]: You can update `pip` with `pip install --upgrade pip`.
\ No newline at end of file
+[^1]: You can update `pip` with `pip install --upgrade pip`.
+
+{% include-markdown "../_footer.md" %}
\ No newline at end of file
diff --git a/docs/usage/benchmarking.md b/docs/usage/benchmarking.md
index 76674f74..97e05247 100644
--- a/docs/usage/benchmarking.md
+++ b/docs/usage/benchmarking.md
@@ -29,4 +29,6 @@ cd evaluation/
./run_eval.sh <predictions_path>
```
Replace `<predictions_path>` with the path to the model's predictions, which should be generated from the *Inference* step. The `<predictions_path>` arguments should look like `../trajectories/<username>/<model>-<dataset>-<hyperparams>/all_preds.jsonl`
-* See the [`evaluation/`](https://github.com/princeton-nlp/SWE-agent/tree/main/evaluation/) folder for details about how evaluation works.
\ No newline at end of file
+* See the [`evaluation/`](https://github.com/princeton-nlp/SWE-agent/tree/main/evaluation/) folder for details about how evaluation works.
+
+{% include-markdown "../_footer.md" %}
\ No newline at end of file
diff --git a/docs/usage/cl_tutorial.md b/docs/usage/cl_tutorial.md
index c0ac839a..6b2e2f71 100644
--- a/docs/usage/cl_tutorial.md
+++ b/docs/usage/cl_tutorial.md
@@ -137,4 +137,6 @@ And follow the instructions below it:
# Apply it to a local repository:
cd <your local repo root>
git apply "${PATCH_FILE_PATH}"
-```
\ No newline at end of file
+```
+
+{% include-markdown "../_footer.md" %}
\ No newline at end of file
diff --git a/docs/usage/faq.md b/docs/usage/faq.md
index 81220dc0..f316d859 100644
--- a/docs/usage/faq.md
+++ b/docs/usage/faq.md
@@ -33,4 +33,6 @@ We also provide models for testing SWE-agent without spending any credits
* `HumanModel` and `HumandThoughtModel` will prompt for input from the user that stands in for the output of the LM
* `ReplayModel` takes a trajectory as input and "replays it"
-* `InstantEmptySubmitTestModel` will create an empty `reproduce.py` and then submit
\ No newline at end of file
+* `InstantEmptySubmitTestModel` will create an empty `reproduce.py` and then submit
+
+{% include-markdown "../_footer.md" %}
\ No newline at end of file
diff --git a/docs/usage/inspector.md b/docs/usage/inspector.md
index 713a2b65..28071030 100644
--- a/docs/usage/inspector.md
+++ b/docs/usage/inspector.md
@@ -23,4 +23,6 @@ python server.py --directory /Users/ofirp/swe-agent/trajectories
```
The inspector will then be launched in the browser:
-![trajectory inspector](../assets/inspector.png)
\ No newline at end of file
+![trajectory inspector](../assets/inspector.png)
+
+{% include-markdown "../_footer.md" %}
\ No newline at end of file
diff --git a/docs/usage/trajectories.md b/docs/usage/trajectories.md
index 8171b3a6..ab90c426 100644
--- a/docs/usage/trajectories.md
+++ b/docs/usage/trajectories.md
@@ -47,4 +47,6 @@ Each call to `run.py` produces a single `trajectories/<user name>/<experiment na
!!! tip
* Evaluation is not completed by `run.py`, it is a separate step (see [benchmarking](benchmarking.md))
* `all_preds.jsonl` can be referenced directly into `evaluation/run_eval.sh` to run evaluation (see [benchmarking](benchmarking.md))
- * Trajectories can be turned into custom demonstrations for SWE-agent ([more information](../dev/demonstrations.md)).
\ No newline at end of file
+ * Trajectories can be turned into custom demonstrations for SWE-agent ([more information](../dev/demonstrations.md)).
+
+{% include-markdown "../_footer.md" %}
\ No newline at end of file
diff --git a/docs/usage/web_ui.md b/docs/usage/web_ui.md
index e29b7828..afd5e95e 100644
--- a/docs/usage/web_ui.md
+++ b/docs/usage/web_ui.md
@@ -82,4 +82,6 @@ The default port that is being served is port 3000.
See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).
```
- something went wrong with the backend part.
\ No newline at end of file
+ something went wrong with the backend part.
+
+{% include-markdown "../_footer.md" %}
\ No newline at end of file
diff --git a/mkdocs.yml b/mkdocs.yml
index a1a14c1b..a932f2f1 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -67,6 +67,7 @@ nav:
plugins:
- glightbox
- search
+ - include-markdown
repo_url: https://github.com/princeton-nlp/SWE-agent
repo_name: princeton-nlp/SWE-agent
edit_uri: edit/main/docs/
\ No newline at end of file