Skip to content

Remove remaining chunk terminology from built-in-ai metrics and streaming UI#1

Merged
sohchatt merged 3 commits into
mainfrom
copilot/replace-chunk-with-tokens
May 19, 2026
Merged

Remove remaining chunk terminology from built-in-ai metrics and streaming UI#1
sohchatt merged 3 commits into
mainfrom
copilot/replace-chunk-with-tokens

Conversation

Copy link
Copy Markdown

Copilot AI commented May 19, 2026

The built-in AI demo still exposed chunk terminology in metric labels, DOM IDs, CSS selectors, and streaming code paths after the initial text replacement. This change normalizes the terminology to token across source, templates, and generated playground output so chunk no longer appears anywhere in built-in-ai.

  • Metrics + UI terminology

    • Renames user-facing labels such as First chunk latency and chunk/sec to First token latency and token/sec.
    • Updates tracked generated playground pages to keep checked-in output aligned with the source templates.
  • DOM + styling consistency

    • Renames metric element IDs from first-chunk-latency-metric, chunks-metric, and chunk-rate-metric to first-token-latency-metric, tokens-metric, and token-rate-metric.
    • Updates CSS selectors that depend on those IDs.
  • Streaming code cleanup

    • Renames local streaming variables, counters, and metric helpers from chunk-based naming to token-based naming.
    • Applies the same cleanup in sample scripts so the term is removed from logs and stream handling code as well.
<!-- before -->
<span class="metric">First chunk latency: <span class="value" id="first-chunk-latency-metric"></span> ms</span>
<span class="metric">Rate: <span class="value" id="chunk-rate-metric"></span> chunk/sec</span>

<!-- after -->
<span class="metric">First token latency: <span class="value" id="first-token-latency-metric"></span> ms</span>
<span class="metric">Rate: <span class="value" id="token-rate-metric"></span> token/sec</span>

Copilot AI and others added 3 commits May 19, 2026 19:09
Agent-Logs-Url: https://github.com/sohchatt/Demos/sessions/922c7dd3-a210-468b-bb02-843df313d586

Co-authored-by: sohchatt <16312588+sohchatt@users.noreply.github.com>
Agent-Logs-Url: https://github.com/sohchatt/Demos/sessions/922c7dd3-a210-468b-bb02-843df313d586

Co-authored-by: sohchatt <16312588+sohchatt@users.noreply.github.com>
Agent-Logs-Url: https://github.com/sohchatt/Demos/sessions/47f401ad-17ea-45dc-85b9-73af900bfcc7

Co-authored-by: sohchatt <16312588+sohchatt@users.noreply.github.com>
Copilot AI requested a review from sohchatt May 19, 2026 19:24
@sohchatt sohchatt closed this May 19, 2026
@sohchatt sohchatt reopened this May 19, 2026
@sohchatt sohchatt marked this pull request as ready for review May 19, 2026 19:27
@sohchatt sohchatt merged commit 38df6ea into main May 19, 2026
1 check passed
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.

2 participants