Commit dab65c0
authored
Remove the "Answered in" duration footer from Slack assistant replies (#25237)
Removes the "Answered in {x}s" footer the Slack assistant appended to
every answer.
## What changed
- `build-slack-assistant-answer-blocks.ts`: dropped the "Answered in
{x}s" context block, so rich replies are now the markdown body plus the
feedback buttons.
- Plain-text replies (the fallback for answers too long for a markdown
block): the worker posts `responseText` directly.
`build-slack-assistant-answer-text.ts`, which only existed to append the
footer, is deleted along with its test.
- `format-slack-assistant-duration.ts` deleted (no remaining users); the
worker no longer tracks `startedAt`/`durationMilliseconds`.
- Tests updated to the new block layout.
`strip-slack-assistant-answer-footer.ts` is deliberately kept: it strips
the footer from the bot's own earlier messages when replaying thread
history into the agent context, and still-live threads contain footered
messages posted by previous versions. Its comment now explains that.
## Validation
- `yarn typecheck` clean
- `yarn lint` 0 warnings / 0 errors
- `yarn test:unit` 193 tests pass (2 fewer than before: the deleted
footer tests)
---
_Generated by [Claude
Code](https://claude.ai/code/session_01UYyiPFprpyCDwhb1J3mCkU)_
<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/25237?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->1 parent 9ab6988 commit dab65c0
8 files changed
Lines changed: 4 additions & 94 deletions
File tree
- packages/twenty-apps/public/slack/src
- __tests__
- logic-functions
- utils
- __tests__
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | 221 | | |
228 | 222 | | |
229 | 223 | | |
| |||
Lines changed: 1 addition & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | | - | |
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
| |||
152 | 150 | | |
153 | 151 | | |
154 | 152 | | |
155 | | - | |
156 | | - | |
157 | 153 | | |
158 | 154 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 155 | + | |
163 | 156 | | |
164 | 157 | | |
165 | 158 | | |
| |||
169 | 162 | | |
170 | 163 | | |
171 | 164 | | |
172 | | - | |
173 | 165 | | |
174 | 166 | | |
175 | 167 | | |
| |||
Lines changed: 1 addition & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 16 | | |
22 | 17 | | |
23 | 18 | | |
| |||
49 | 44 | | |
50 | 45 | | |
51 | 46 | | |
52 | | - | |
53 | 47 | | |
54 | 48 | | |
55 | 49 | | |
| |||
Lines changed: 0 additions & 25 deletions
This file was deleted.
packages/twenty-apps/public/slack/src/logic-functions/utils/build-slack-assistant-answer-blocks.ts
Lines changed: 0 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | | - | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 14 | | |
27 | 15 | | |
28 | 16 | | |
| |||
Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 0 additions & 24 deletions
This file was deleted.
packages/twenty-apps/public/slack/src/logic-functions/utils/strip-slack-assistant-answer-footer.ts
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
0 commit comments