• wwwillchen-bot's avatar
    Move context limit banner from MessagesList to ChatInput (#2461) · 1fe9bc2a
    wwwillchen-bot 提交于
    ## Summary
    - Relocated the `ContextLimitBanner` from the bottom of `MessagesList`
    to above the chat input area in `ChatInput` for better visibility
    - Moved the `useCountTokens` hook from `MessagesList` to `ChatInput` and
    removed the now-unused `tokenCountResult` from the footer context
    - Updated e2e tests to look for the banner inside the
    `chat-input-container`
    
    ## Test plan
    - [ ] Verify the context limit banner appears above the chat input when
    token usage is high
    - [ ] Verify the context limit banner does not appear when token usage
    is within limits
    - [ ] Run existing e2e tests: `PLAYWRIGHT_HTML_OPEN=never npm run e2e --
    context_limit_banner`
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    <!-- devin-review-badge-begin -->
    
    ---
    
    <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2461">
      <picture>
    <source media="(prefers-color-scheme: dark)"
    srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
    <img
    src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
    alt="Open with Devin">
      </picture>
    </a>
    <!-- devin-review-badge-end -->
    
    <!-- This is an auto-generated description by cubic. -->
    ---
    ## Summary by cubic
    Moved the context limit banner to display above the chat input for
    better visibility when near the limit or when long contexts would cost
    extra. Addresses Linear issue 1770154755693.
    
    - **Refactors**
    - Moved useCountTokens to ChatInput and removed tokenCountResult from
    MessagesList footer context.
    - Updated e2e tests to assert the banner inside chat-input-container;
    added a model-picker test id and a custom test model to cover long
    context.
    
    <sup>Written for commit 04f5b40d66c9efb8d358ce75afa4d9a24258654e.
    Summary will update on new commits.</sup>
    
    <!-- End of auto-generated description by cubic. -->
    
    ---------
    Co-authored-by: 's avatarWill Chen <willchen90@gmail.com>
    Co-authored-by: 's avatarClaude Opus 4.5 <noreply@anthropic.com>
    1fe9bc2a
名称
最后提交
最后更新
..
__tests__ 正在载入提交数据...
app 正在载入提交数据...
atoms 正在载入提交数据...
client_logic 正在载入提交数据...
components 正在载入提交数据...
constants 正在载入提交数据...
contexts 正在载入提交数据...
db 正在载入提交数据...
hooks 正在载入提交数据...
ipc 正在载入提交数据...
lib 正在载入提交数据...
main 正在载入提交数据...
neon_admin 正在载入提交数据...
pages 正在载入提交数据...
paths 正在载入提交数据...
pro 正在载入提交数据...
prompts 正在载入提交数据...
routes 正在载入提交数据...
shared 正在载入提交数据...
store 正在载入提交数据...
styles 正在载入提交数据...
supabase_admin 正在载入提交数据...
utils 正在载入提交数据...
backup_manager.ts 正在载入提交数据...
main.ts 正在载入提交数据...
preload.ts 正在载入提交数据...
renderer.tsx 正在载入提交数据...
router.ts 正在载入提交数据...