feat: include ticket URL in task pickup announcements (#22)

- Add issue URL to announcement in dispatch.ts
- Add issueUrl field to workerStart notification event
- Update notification message to include URL
- Both automated notifications and manual announcements now show full ticket URL

Example output:
🔧 Spawning DEV (medior) for #7: Create TODO.md...
🔗 https://github.com/laurentenhoor/devclaw/issues/7
This commit is contained in:
Lauren ten Hoor
2026-02-10 01:11:56 +08:00
parent 6ec01537a6
commit 56143cb208
3 changed files with 4 additions and 2 deletions

View File

@@ -266,7 +266,7 @@ export async function dispatchTask(
? "🔍"
: "🔧";
const actionVerb = sessionAction === "spawn" ? "Spawning" : "Sending";
const announcement = `${emoji} ${actionVerb} ${role.toUpperCase()} (${modelAlias}) for #${issueId}: ${issueTitle}`;
const announcement = `${emoji} ${actionVerb} ${role.toUpperCase()} (${modelAlias}) for #${issueId}: ${issueTitle}\n🔗 ${issueUrl}`;
return {
sessionAction,

View File

@@ -31,6 +31,7 @@ export type NotifyEvent =
groupId: string;
issueId: number;
issueTitle: string;
issueUrl: string;
role: "dev" | "qa";
model: string;
sessionAction: "spawn" | "send";
@@ -66,7 +67,7 @@ function buildMessage(event: NotifyEvent): string {
switch (event.type) {
case "workerStart": {
const action = event.sessionAction === "spawn" ? "🚀 Started" : "▶️ Resumed";
return `${action} ${event.role.toUpperCase()} (${event.model}) on #${event.issueId}: ${event.issueTitle}`;
return `${action} ${event.role.toUpperCase()} (${event.model}) on #${event.issueId}: ${event.issueTitle}\n🔗 ${event.issueUrl}`;
}
case "workerComplete": {

View File

@@ -322,6 +322,7 @@ export function createTaskPickupTool(api: OpenClawPluginApi) {
groupId,
issueId: issue.iid,
issueTitle: issue.title,
issueUrl: issue.web_url,
role,
model: dispatchResult.modelAlias,
sessionAction: dispatchResult.sessionAction,