Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
ccran
/
lufa-contract
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
84525019
authored
Jun 18, 2026
by
ccran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add optimize prompt;
parent
96c9a464
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
data/optimize_review_prompt_flow.py
+6
-12
No files found.
data/optimize_review_prompt_flow.py
View file @
84525019
...
@@ -35,7 +35,7 @@ DEFAULT_RULES_FILE = REPO_ROOT / "data" / "rules.xlsx"
...
@@ -35,7 +35,7 @@ DEFAULT_RULES_FILE = REPO_ROOT / "data" / "rules.xlsx"
DEFAULT_REPORT_FILE
=
REPO_ROOT
/
"data"
/
"prompt_optimization_rounds.xlsx"
DEFAULT_REPORT_FILE
=
REPO_ROOT
/
"data"
/
"prompt_optimization_rounds.xlsx"
DEFAULT_MAX_WORKERS
=
10
DEFAULT_MAX_WORKERS
=
10
DEFAULT_APP_SESSION
=
"jp-contract-debug"
DEFAULT_APP_SESSION
=
"jp-contract-debug"
DEFAULT_APP_COMMAND
=
"python main.py"
DEFAULT_APP_COMMAND
=
"
source ~/.jp-contract/bin/activate &&
python main.py"
@dataclass
@dataclass
...
@@ -342,24 +342,18 @@ def run_batch() -> Path:
...
@@ -342,24 +342,18 @@ def run_batch() -> Path:
def
restart_app
(
session
:
str
,
command
:
str
)
->
None
:
def
restart_app
(
session
:
str
,
command
:
str
)
->
None
:
result
=
subprocess
.
run
(
subprocess
.
run
(
[
"tmux"
,
"
has
-session"
,
"-t"
,
session
],
[
"tmux"
,
"
kill
-session"
,
"-t"
,
session
],
cwd
=
REPO_ROOT
,
cwd
=
REPO_ROOT
,
text
=
True
,
capture_output
=
True
,
check
=
False
,
check
=
False
,
)
)
if
result
.
returncode
!=
0
:
tmux_command
=
f
"cd {shell_quote(str(REPO_ROOT))} && {command}"
raise
RuntimeError
(
f
"tmux session not found: {session}"
)
subprocess
.
run
([
"tmux"
,
"send-keys"
,
"-t"
,
session
,
"C-c"
],
cwd
=
REPO_ROOT
,
check
=
True
)
time
.
sleep
(
2
)
subprocess
.
run
(
subprocess
.
run
(
[
"tmux"
,
"
send-keys"
,
"-t"
,
session
,
f
"cd {shell_quote(str(REPO_ROOT))} && {command}"
,
"C-m"
],
[
"tmux"
,
"
new-session"
,
"-d"
,
"-s"
,
session
,
tmux_command
],
cwd
=
REPO_ROOT
,
cwd
=
REPO_ROOT
,
check
=
True
,
check
=
True
,
)
)
time
.
sleep
(
5
)
time
.
sleep
(
8
)
def
shell_quote
(
value
:
str
)
->
str
:
def
shell_quote
(
value
:
str
)
->
str
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment