|
7 | 7 | import pandas as pd |
8 | 8 | import streamlit as st |
9 | 9 |
|
10 | | -from app.utils.agent_wiki import fetch_wiki_issue_repros, get_synced_wiki_repo_path |
| 10 | +from app.utils.agent_wiki import build_wiki_explorer_url, fetch_wiki_issue_repros, get_synced_wiki_repo_path |
11 | 11 | from app.utils.github_utils import fetch_issue_reactions, fetch_issue_view_counts, get_all_github_issues |
12 | 12 | from app.utils.issue_formatting import labels_to_type_emoji, reactions_to_str |
13 | 13 |
|
@@ -171,18 +171,22 @@ def initial_query_params(key: str) -> list[str]: |
171 | 171 | wiki_repros, wiki_repros_error = fetch_wiki_issue_repros() |
172 | 172 | if wiki_repros_error: |
173 | 173 | print("Failed to load agent wiki reproductions:", wiki_repros_error, flush=True) |
174 | | -wiki_repro_issue_numbers = set(wiki_repros) |
175 | 174 |
|
176 | 175 |
|
177 | 176 | def get_reproducible_example(issue_number: int) -> str | None: |
178 | | - """Return a link to the issue explorer if a reproduction is available. |
| 177 | + """Return a link to the available reproduction for an issue, if any. |
179 | 178 |
|
180 | | - Local reproductions take priority, but issues that only have a reproduction |
181 | | - in the agent wiki are linked as well (the issue explorer resolves both). |
| 179 | + Local reproductions take priority and link to the issue explorer, where they |
| 180 | + can be run. Issues that only have a reproduction in the agent wiki link to |
| 181 | + the agent wiki explorer so the repro document can be viewed. |
182 | 182 | """ |
183 | 183 | issue_folder_name = f"gh-{issue_number}" |
184 | | - if PATH_TO_ISSUES.joinpath(issue_folder_name).is_dir() or issue_number in wiki_repro_issue_numbers: |
| 184 | + if PATH_TO_ISSUES.joinpath(issue_folder_name).is_dir(): |
185 | 185 | return "/?issue=" + issue_folder_name |
| 186 | + |
| 187 | + wiki_repro = wiki_repros.get(issue_number) |
| 188 | + if wiki_repro is not None: |
| 189 | + return build_wiki_explorer_url(wiki_repro["repro_app_path"]) |
186 | 190 | return None |
187 | 191 |
|
188 | 192 |
|
|
0 commit comments