Commit Graph

510 Commits

Author SHA1 Message Date
Haileyesus
0306f8d59b refactor(ToolConfigs): use optional chaining for content retrieval 2026-02-12 23:47:07 +03:00
Haileyesus
4c387808ed refactor(SidebarModals): move normalizeProjectForSettings into utils file 2026-02-12 23:47:07 +03:00
Haileyesus
c193137aa5 refactor(ChatMessagesPane): extract message key generation logic to a utility function 2026-02-12 23:47:07 +03:00
Haileyesus
450ce93ee4 refactor:: move AssistantThinkingIndicator component to its own file 2026-02-12 23:47:07 +03:00
Haileyesus
7c1d2899fa refactor(ChatMessagesPane): use stable message key 2026-02-12 23:47:07 +03:00
Haileyesus
58002df5d9 refactor(QuickSettingsPanel): simplify state management by removing localIsOpen and using isOpen directly 2026-02-12 23:47:07 +03:00
Haileyesus
a82a225d23 refactor(OneLineDisplay): improve clipboard functionality with fallback for unsupported environments 2026-02-12 23:47:07 +03:00
Haileyesus
be94e53a1a refactor(useChatRealtimeHandlers): normalize interactive prompt content to string for consistent ChatMessage shape 2026-02-12 23:47:07 +03:00
Haileyesus
c79c022ff8 refactor(useChatComposerState): improve input handling and command execution flow 2026-02-12 23:47:07 +03:00
Haileyesus
7cabb3da9b refactor(useProjectsState): normalize refreshed session metadata to maintain provider stability; use getProjectSessions helper for session retrieval. 2026-02-12 23:47:07 +03:00
Haileyesus
deec5f2f1b refactor(ToolRenderer): ensure stable hook order 2026-02-12 23:47:07 +03:00
Haileyesus
4f5212f93f refactor(dateUtils): update type annotation for formatTimeAgo function 2026-02-12 23:47:07 +03:00
Haileyesus
b76f53c4bf refactor(ChatInputControls): update import statement for ThinkingModeSelector 2026-02-12 23:47:07 +03:00
Haileyesus
474d324ea3 fix: type annotations 2026-02-12 23:47:07 +03:00
Haileyesus
d8fbea8681 refactor(ScrollArea): adjust ref placement and className order 2026-02-12 23:47:07 +03:00
Haileyesus
ae28b2d762 refactor(useSidebarController): manage project session overrides in local state 2026-02-12 23:47:07 +03:00
Haileyesus
b8f06c8aa4 refactor(createCachedDiffCalculator): use both newStr and oldStr as cache keys 2026-02-12 23:47:07 +03:00
Haileyesus
f6ed3cbd6d refactor(calculateDiff): optimize LCS algorithm for improved diff calculation 2026-02-12 23:47:07 +03:00
Haileyesus
60a9f3dc32 refactor(MessageComponent): add types 2026-02-12 23:47:07 +03:00
Haileyesus
d30d64ce93 refactor(useFileMentions): implement abort controller for fetch requests 2026-02-12 23:47:07 +03:00
Haileyesus
022ac21369 refactor(chat): exclude currentSessionId from dependency array to prevent unnecessary reloading of messages 2026-02-12 23:47:06 +03:00
Haileyesus
3c6f353716 refactor(chat): improve message handling by cloning state updates and improving structured message parsing 2026-02-12 23:47:06 +03:00
Haileyesus
4d41bfd366 fix(watcher): ensure provider folders exist before creating watchers to maintain active watching 2026-02-12 23:47:06 +03:00
Haileyesus
553c534f35 refactor(todo): update TodoListContentProps to include optional id and priority fields that are used in TodoList.jsx 2026-02-12 23:47:06 +03:00
Haileyesus
e435e70a6b fix(chat): handle potential null content in message before splitting lines 2026-02-12 23:47:06 +03:00
Haileyesus
0b6b33c3cc refactor(chat): replace localStorage provider retrieval with prop usage in MessageComponent 2026-02-12 23:47:06 +03:00
Haileyesus
844602a4fe fix(chat): handle JSON parsing errors for saved chat messages 2026-02-12 23:47:06 +03:00
Haileyesus
fc1ad17ba8 fix(chat): escape command name in regex to prevent unintended matches 2026-02-12 23:47:06 +03:00
Haileyesus
ed44d5e437 fix: show auth url panel in shell only on mobile
- use static url: https://auth.openai.com/codex/device, for codex login.
- add an option for hiding the panel
2026-02-12 23:47:06 +03:00
simosmik
d99c581179 refactor(tools): improve Task tool display formatting
Update Task tool config to show cleaner subagent information in the UI.
Simplifies the input display by showing only the prompt when no
optional fields are present, reducing visual clutter. Updates title
format to "Subagent / {type}" for better categorization. Enhances
result display to better handle complex agent response structures with
array content types, extracting text blocks for cleaner presentation.
2026-02-12 23:47:06 +03:00
simosmik
b8d80fdab7 refactor(tools): add agent category for Task tool
Add visual distinction for the Task tool (subagent invocation) by
introducing a new 'agent' category with purple border styling. This
separates subagent tasks from regular task management tools
(TaskCreate, TaskUpdate, etc.) for clearer user feedback.

Also refactor terminal command layout in OneLineDisplay to properly
nest flex containers, fixing copy button alignment issues.
2026-02-12 23:47:06 +03:00
Haileyesus
720a771b2a feat(chat): move thinking modes, token usage pie, and related logic into chat folder 2026-02-12 23:47:06 +03:00
Haileyesus
189b1533b2 refactor: reorganize chat view components and types 2026-02-12 23:47:06 +03:00
Haileyesus
7f45540dbe refactor: Restructure files and folders to better mimic feature-based architecture 2026-02-12 23:47:06 +03:00
Haileyesus
fadbcc8259 fix(chat): stabilize long-history scroll-up pagination behavior
- fix top-pagination lockups by only locking when older messages are actually fetched
- make fetched older messages visible immediately by increasing `visibleMessageCount` on prepend
- prevent unintended auto-scroll-to-bottom during older-message loading and scroll restore
- replace state-based pagination offset with a ref to avoid stale offset/reload side effects
- ensure initial auto-scroll runs only after initial session load completes
- reset top-load lock/restore state and visible window when switching sessions
- loosen top-lock release near the top to avoid requiring a full down/up cycle
2026-02-12 23:47:06 +03:00
Haileyesus
fd5cced67f fix(chat): clear stuck loading state across realtime lifecycle events
The chat UI could remain in a stale "Thinking/Processing" state when session IDs
did not line up exactly between view state (`currentSessionId`), selected route
session, pending session IDs, and provider lifecycle events. This was most visible
with Codex completion/abort flows, but the same mismatch risk existed in shared
handlers.

Unify lifecycle cleanup behavior in realtime handlers and make processing tracking
key off the active viewed session identity.

Changes:
- src/hooks/chat/useChatRealtimeHandlers.ts
- src/components/ChatInterface.tsx
- src/hooks/chat/useChatSessionState.ts

What changed:
- Added shared helpers in realtime handling:
  - `collectSessionIds(...)` to normalize and dedupe candidate session IDs.
  - `clearLoadingIndicators()` to consistently clear `isLoading`, abort UI, and status.
  - `markSessionsAsCompleted(...)` to consistently notify inactive/not-processing state.
- Updated lifecycle branches to use shared cleanup logic:
  - `cursor-result`
  - `claude-complete`
  - `codex-response` (`turn_complete` and `turn_failed`)
  - `codex-complete`
  - `session-aborted`
- Expanded completion/abort cleanup to include all relevant session IDs
  (`latestMessage.sessionId`, `currentSessionId`, `selectedSession?.id`,
  `pendingSessionId`, and Codex `actualSessionId` when present).
- Switched processing-session marking in `ChatInterface` to use
  `selectedSession?.id || currentSessionId` instead of `currentSessionId` alone.
- Switched processing-session rehydration in `useChatSessionState` to use
  the same active-view session identity fallback.

Result:
- Prevents stale loading indicators after completion/abort when IDs differ.
- Keeps processing session bookkeeping aligned with the currently viewed session.
- Reduces provider-specific drift by using one lifecycle cleanup pattern.
2026-02-12 23:47:06 +03:00
Haileyesus
9524313363 fix: chat session scroll to bottom error even when scrolled up 2026-02-12 23:47:05 +03:00
Haileyesus
8bc3c17793 refactor(project-watcher): add codex and cursor file watchers 2026-02-12 23:47:05 +03:00
Haileyesus
1d081ae349 refactor(sidebar): update sessionMeta handling for session loading logic
- This fixes an issue where the sidebar was showing 6+ even when there were only 5 sessions, due to the hasMore logic not accounting for the case where there are exactly 6 sessions.
It was also showing "Show more sessions" even where there were no more sessions to load.

- This was because `hasMore` was sometimes `undefined` and the logic checked for hasMore !== false, which treated undefined as true.
Now we explicitly check for hasMore === true to determine if there are more sessions to load.
2026-02-12 23:47:05 +03:00
Haileyesus
72e1f538f7 fix(command-menu): correct slash command selection with frequent commands
When the “Frequently Used” section is visible, command clicks/hover could use a
UI-local index instead of the canonical `filteredCommands` index, causing the
wrong command to execute (e.g. clicking `/help` running `/clear`).

- map rendered menu items back to canonical command indices using a stable key
  (`name + namespace/type + path`)
- use canonical index for hover/click selection callbacks
- deduplicate frequent commands from other grouped sections to avoid duplicate
  rows and selection ambiguity
- keep and restore original inline comments, with clarifications where needed
2026-02-12 23:47:05 +03:00
Haileyesus
fa09eba829 fix(commands): restore /cost slash command and improve command execution errors
The /cost command was listed as built-in but had no handler, causing execution to
fall through to custom command logic and return 400 ("command path is required").

- Add a built-in /cost handler in server/routes/commands.js
- Return the expected payload shape for the chat UI (`action: "cost"`, token usage,
  estimated cost, model)
- Normalize token usage inputs and compute usage percentage
- Add provider-based default pricing for cost estimation
- Fix model selection in command execution context so codex uses `codexModel`
  instead of `claudeModel`
- Improve frontend command error handling by parsing backend error responses and
  showing meaningful error messages instead of a generic failure
2026-02-12 23:47:05 +03:00
Haileyesus
79d7934a4b refactor: replace individual provider logos with a unified SessionProviderLogo component 2026-02-12 23:47:05 +03:00
Haileyesus
8e411187f3 refactor(sidebar): move VersionUpgradeModal into SidebarModals 2026-02-12 23:47:05 +03:00
Haileyesus
a0bc4a8c72 refactor(sidebar): remove duplicate loading message in SidebarProjectsState 2026-02-12 23:47:05 +03:00
simosmik
d8e7a9e944 refactor: update readme and remove unusedfiles. 2026-02-12 23:47:05 +03:00
simosmik
5f0676bdb3 refactor(improvement):add memo on diffviewer, cleanup messsagecomponent 2026-02-12 23:47:05 +03:00
simosmik
905ae38bf5 refactor(design): change the design of tools and introduce todo list and task list. 2026-02-12 23:47:05 +03:00
simosmik
56a132d34e refactor(design): fix bash design and config 2026-02-12 23:47:05 +03:00
simosmik
060405c8d6 refactor(design): change the design of bash 2026-02-12 23:47:05 +03:00
simosmik
cbe4bd9adf fix: remove one-line logic from messagecomponent 2026-02-12 23:47:05 +03:00