| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .gitignore | ||
| .prettierrc.mjs | ||
| README.md | ||
| bun.lockb | ||
| index.html | ||
| package.json | ||
| pnpm-lock.yaml | ||
| postcss.config.js | ||
| tailwind.config.js | ||
| vercel.json | ||
| vite.config.js |
- Extract common `applyAutoCollapseLogic` function for reasoning panel collapse behavior - Consolidate duplicated auto-collapse logic across multiple functions - Simplify conditional expressions using logical OR operator - Replace repetitive property assignments with object spread syntax - Update dependency arrays to include new shared function - Ensure consistent behavior across stream/non-stream/error scenarios This refactoring improves code maintainability by following DRY principles and centralizing the auto-collapse logic in a single reusable function. All message handling functions now use consistent logic for determining when to auto-collapse the reasoning panel. Benefits: - Reduced code duplication from ~20 lines to 6 lines per function - Single source of truth for auto-collapse behavior - Improved readability and maintainability - Easier to modify collapse logic in the future Files changed: - web/src/hooks/useApiRequest.js: Refactored message handling functions
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| public | Loading commit data... | |
| src | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .prettierrc.mjs | Loading commit data... | |
| README.md | Loading commit data... | |
| bun.lockb | Loading commit data... | |
| index.html | Loading commit data... | |
| package.json | Loading commit data... | |
| pnpm-lock.yaml | Loading commit data... | |
| postcss.config.js | Loading commit data... | |
| tailwind.config.js | Loading commit data... | |
| vercel.json | Loading commit data... | |
| vite.config.js | Loading commit data... |