Commit bcdae09
Add WebUI URL to Slack messages at the end of agent loop (#272)
## Description
This PR adds the WebUI URL link to Slack messages when the agent
finishes its turn. This makes it easier for users to access the WebUI
session from anywhere in a long Slack thread without having to scroll
back to the beginning.
## Implementation
- Added an optional `appendWebappUrl` parameter to `sendSystemMessage`
function with default value of `false`
- When `appendWebappUrl` is `true`, the function appends a markdown link
to the webapp session URL at the end of the Slack message:
`([webapp](URL))`
- Modified the agent loop to use this parameter only at the end of the
agent turn
## Changes
- Modified `packages/agent-core/src/lib/messages.ts` to add the optional
parameter and webapp URL handling
- Modified `packages/worker/src/agent/index.ts` to pass `true` for the
parameter at the end of the agent loop
## Related Issues
Fixes #270
<!-- DO NOT EDIT: System generated metadata -->
<!-- WORKER_ID:1751622968753739 -->
---
**Open in Web UI**:
https://d2c09i1k2ray87.cloudfront.net/sessions/1751622968753739
---------
Co-authored-by: remote-swe-app[bot] <123456+remote-swe-app[bot]@users.noreply.github.com>1 parent 62e533a commit bcdae09
File tree
2 files changed
+19
-6
lines changed- packages
- agent-core/src/lib
- worker/src/agent
2 files changed
+19
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
305 | 306 | | |
306 | 307 | | |
307 | 308 | | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
313 | 325 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
| 437 | + | |
| 438 | + | |
438 | 439 | | |
439 | 440 | | |
440 | 441 | | |
| |||
0 commit comments