You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename the action to plural `coder-agents-chat-action` (the product is
"Coder Agents", a chat in it is a "Coder Agents Chat") across
`action.yaml`, label keys, comment marker, source, tests, `package.json`,
`AGENTS.md`, README, and `dist/`. Branding `play` / `gray-dark`.
Switch chat-reuse on by default, scoped to `gh-target` + Coder user +
`GITHUB_WORKFLOW`. New `force-new-chat: true` opts out; mutually
exclusive with `existing-chat-id`. `idempotency-key` becomes an optional
sharding override. `ACTION_LABEL_KEYS` is the shared source of truth for
the reuse filter and the labels written on creation, with a derivation
invariant on `RESERVED_LABEL_KEYS`.
Honor `wait: complete` on the reuse follow-up path via a single
`runFollowUp` helper used by both the existing-chat-id path and the
reuse path, so the two cannot drift.
Rewrite the README for the Marketplace audience: Requirements,
Quickstart, Inputs/Outputs tables, How it works (identity, org, chat
reuse, wait mode, comment lifecycle), Recipes (issue triage, doc-check
service account, follow-up, force new, gate on `pull-request-url`),
Troubleshooting, Security model, Limitations, Versioning.
Followups:
- Repo rename `coder/create-agent-chat-action` -> `coder/agents-chat-action`.
- Marketplace metadata (repo description, homepage, topics).
- CODAGT-404: defensive sanitization of `GITHUB_WORKFLOW` against the
256-byte chat-label value cap.
Generated by Coder Agents.
Copy file name to clipboardExpand all lines: AGENTS.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
# AGENTS.md - AI Agent Guide for create-agent-chat-action
1
+
# AGENTS.md - AI Agent Guide for agents-chat-action
2
2
3
3
## Repository Overview
4
4
5
-
**Purpose**: GitHub Action that creates and manages Coder Agent Chats for GitHub users with automated issue commenting support.
5
+
**Purpose**: GitHub Action that creates and manages Coder Agents chats for GitHub users with automated issue commenting support.
6
6
7
7
**Key Difference from create-task-action**: This action targets the Coder Agents Chat API (`/api/experimental/chats`) instead of the Tasks API. Agents purposefully does NOT expose template selection — it either auto-provisions a workspace or uses an existing one.
Copy file name to clipboardExpand all lines: action.yaml
+12-7Lines changed: 12 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
-
name: "Coder Create Agent Chat"
2
-
description: "Create a Coder Agent Chat for a GitHub user, with support for issue commenting"
1
+
name: "Coder Agents Chat"
2
+
description: "Run Coder agents from any GitHub workflow. Triage issues, review PRs, or follow up on an existing chat."
3
3
author: "Coder Technologies Inc. <https://coder.com>"
4
4
5
5
branding:
6
-
icon: message-circle
7
-
color: purple
6
+
icon: play
7
+
color: gray-dark
8
8
9
9
inputs:
10
10
chat-prompt:
11
-
description: "Prompt to send to the agent chat. Templated by the workflow before being passed in."
11
+
description: "Prompt to send to the agents chat. Templated by the workflow before being passed in."
12
12
required: true
13
13
14
14
coder-token:
@@ -48,7 +48,7 @@ inputs:
48
48
required: false
49
49
50
50
existing-chat-id:
51
-
description: "Existing chat ID to send a follow-up message to instead of creating a new chat."
51
+
description: "Existing chat ID to send a follow-up message to instead of creating a new chat. Mutually exclusive with force-new-chat."
52
52
required: false
53
53
54
54
comment-on-issue:
@@ -67,9 +67,14 @@ inputs:
67
67
default: "600"
68
68
69
69
idempotency-key:
70
-
description: "Optional key used to deduplicate chats. When set and existing-chat-id is unset, the action looks up the most recent non-archived chat scoped to this `gh-target` and resolved Coder user carrying this label and sends a follow-up message instead of creating a duplicate."
70
+
description: "Optional sharding key to narrow the default per-workflow scope. By default the action reuses the most recent non-archived chat scoped to `gh-target`, the resolved Coder user, and the workflow name. Set this to maintain multiple parallel chats on the same target/user/workflow (for example, one per matrix dimension)."
71
71
required: false
72
72
73
+
force-new-chat:
74
+
description: "Always create a new chat instead of reusing the most recent matching chat. Mutually exclusive with existing-chat-id."
75
+
required: false
76
+
default: "false"
77
+
73
78
outputs:
74
79
coder-username:
75
80
description: "The Coder username resolved from the GitHub user."
if (sanitizedKey && RESERVED_LABEL_KEYS.has(sanitizedKey)) {
27660
27631
throw new Error(`idempotency-key sanitizes to a reserved chat-label key ("${sanitizedKey}"). ` + `Reserved keys: ${[...RESERVED_LABEL_KEYS].join(", ")}. ` + "Choose a different idempotency-key value.");
core2.warning(preMessageChat ? `Failed to fetch chat after sending message; outputs reflect pre-message state: ${error3}` : `Failed to fetch chat after sending message; outputs will be minimal: ${error3}`);
27716
+
}
27717
+
}
27718
+
if (this.inputs.commentOnIssue) {
27719
+
core2.info(`Commenting on issue ${githubOrg}/${githubRepo}#${githubIssueNumber}`);
core2.warning(`Multiple non-archived chats matched idempotency-key=${this.inputs.idempotencyKey} for ${ghTarget}. ` + `Reusing the most recent (${live[0].id}) and ignoring: ${ignored}. ` + "Concurrent triggers can race; subsequent runs converge on the " + "most recent match.");
27774
+
core2.warning(`Multiple non-archived chats matched reuse scope for ${ghTarget}. ` + `Reusing the most recent (${live[0].id}) and ignoring: ${ignored}. ` + "Concurrent triggers can race; subsequent runs converge on the " + "most recent match.");
if (sanitizedKey && RESERVED_LABEL_KEYS.has(sanitizedKey)) {
27768
27780
throw new Error(`idempotency-key sanitizes to a reserved chat-label key ("${sanitizedKey}"). ` + `Reserved keys: ${[...RESERVED_LABEL_KEYS].join(", ")}. ` + "Choose a different idempotency-key value.");
27769
27781
}
27770
27782
const labels = {
27771
-
"coder-agent-chat-action": "true",
27772
-
"gh-target": ghTarget,
27773
-
"coder-agent-chat-action-user": coderUserId
27783
+
[ACTION_LABEL_KEYS.marker]: "true",
27784
+
[ACTION_LABEL_KEYS.target]: ghTarget,
27785
+
[ACTION_LABEL_KEYS.user]: coderUserId
27774
27786
};
27775
-
labels[sanitizedKey] = "true";
27787
+
if (workflow) {
27788
+
labels[ACTION_LABEL_KEYS.workflow] = workflow;
27789
+
}
27790
+
if (sanitizedKey) {
27791
+
labels[sanitizedKey] = "true";
27792
+
}
27776
27793
return labels;
27777
27794
}
27778
27795
}
@@ -27843,11 +27860,15 @@ var ActionInputsObjectSchema = exports_external.object({
0 commit comments