Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8ab67a0

Browse files
committed
scripts/triage.sh: post to agentapi
1 parent8819bad commit8ab67a0

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

‎scripts/traiage.sh‎

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,33 @@ create() {
2929

3030
prompt() {
3131
requiredenvs CODER_URL CODER_SESSION_TOKEN WORKSPACE_NAME PROMPT
32-
"${CODER_BIN}" \
33-
--url"${CODER_URL}" \
34-
--token"${CODER_SESSION_TOKEN}" \
35-
ssh"${WORKSPACE_NAME}" -- /bin/bash -lc"echo -n '${PROMPT}' | ~/.local/bin/claude --print --verbose --output-format=stream-json -"
36-
exit 0
32+
username=$(curl \
33+
--fail \
34+
--header"Coder-Session-Token:${CODER_SESSION_TOKEN}" \
35+
--location \
36+
--show-error \
37+
--silent \
38+
"${CODER_URL}/api/v2/users/me"| jq -r'.username')
39+
40+
payload="{
41+
\"content\":\"${PROMPT}\",
42+
\"type\":\"user\"
43+
}"
44+
45+
response=$(curl \
46+
--data-raw"${payload}" \
47+
--fail \
48+
--header"Content-Type: application/json" \
49+
--header"Coder-Session-Token:${CODER_SESSION_TOKEN}" \
50+
--location \
51+
--request POST \
52+
--show-error \
53+
--silent \
54+
"${CODER_URL}/@${username}/${WORKSPACE_NAME}/apps/agentapi/message"| jq -r'.ok')
55+
if [["${response}"!="true" ]];then
56+
echo"Failed to send prompt"
57+
exit 1
58+
fi
3759
}
3860

3961
archive() {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp