File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
registry/harsh9485/modules/sourcegraph_amp/scripts Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 25
25
cd " $dir "
26
26
echo " Add AMP API key"
27
27
export AMP_API_KEY=$SOURCEGRAPH_AMP_API_KEY
28
- # Launch AgentAPI server with AMP
29
- agentapi server --term-width=67 --term-height=1190 -- amp
28
+
29
+ if [ -n " $SOURCEGRAPH_AMP_TASK_PROMPT " ]; then
30
+ printf " Running the task prompt: %s\n" " $SOURCEGRAPH_AMP_TASK_PROMPT "
31
+ PROMPT=" Every step of the way, report tasks to Coder with proper descriptions and statuses. Your task at hand: $SOURCEGRAPH_AMP_TASK_PROMPT "
32
+
33
+ # Pipe the prompt into amp, which will be run inside agentapi
34
+ agentapi server --term-width=67 --term-height=1190 -- bash -c " echo \" $PROMPT \" | amp"
35
+ else
36
+ printf " No task prompt given.\n"
37
+ agentapi server --term-width=67 --term-height=1190 -- amp
38
+ fi
You can’t perform that action at this time.
0 commit comments