feat(slackbot): add subtle cost/latency footer to final message#100
Closed
arjunblj wants to merge 2 commits into
Closed
feat(slackbot): add subtle cost/latency footer to final message#100arjunblj wants to merge 2 commits into
arjunblj wants to merge 2 commits into
Conversation
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
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
duration_s/ttft_ms/total_tokens/cost_usdfromexecution_summaryintoslackbot_client.session_done.47s · 1.2s ttft · 19k tok · $0.34context 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.tsuv run --project services/api pytest tests/test_slackbot_client.py -q