Skip to content

feat(slackbot): add subtle cost/latency footer to final message#100

Closed
arjunblj wants to merge 2 commits into
mainfrom
feat/slackbot-cost-latency-footer
Closed

feat(slackbot): add subtle cost/latency footer to final message#100
arjunblj wants to merge 2 commits into
mainfrom
feat/slackbot-cost-latency-footer

Conversation

@arjunblj

Copy link
Copy Markdown
Collaborator

Summary

  • Forward duration_s / ttft_ms / total_tokens / cost_usd from execution_summary into slackbot_client.session_done.
  • Render a 47s · 1.2s ttft · 19k tok · $0.34 context block under the final answer; omit any zero/missing field; skip the whole block when no metrics are available.

Test plan

  • bun --cwd services/slackbot test src/slack/agent-session.test.ts
  • uv run --project services/api pytest tests/test_slackbot_client.py -q

arjunblj and others added 2 commits May 20, 2026 08:53
Forward duration_s / total_tokens / cost_usd / ttft_ms from the API
execution_summary into slackbot_client.session_done. The renderer composes
them into a final context block (e.g. "47s · 19k tok · $0.34") rendered just
under the answer. Tokens use k/M abbreviations, duration switches to m+s past
60s, and sub-cent costs render as "<$0.01".

The block is omitted entirely when no usable metrics are available, so dev /
local deliveries (which don't compute these) stay unchanged.
# Conflicts:
#	services/api/tests/test_slackbot_client.py
#	services/slackbot/src/slack/agent-session.test.ts
#	services/slackbot/src/slack/agent-session.ts
#	services/slackbot/src/slack/codex-session.ts
@Zygimantass

Copy link
Copy Markdown
Member

We've merged the Rust rewrite in #344, meaning the old API and Slackbot services are deprecated. As such we're closing this PR - if you think this is a mistake, please reopen the PR and ping me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants