better-codex 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/apps/backend/README.md +46 -0
- package/apps/backend/bun.lock +64 -0
- package/apps/backend/package.json +18 -0
- package/apps/backend/scripts/generate-protocol.ts +32 -0
- package/apps/backend/src/analytics/service.ts +219 -0
- package/apps/backend/src/analytics/store.ts +284 -0
- package/apps/backend/src/config.ts +98 -0
- package/apps/backend/src/core/app-server.ts +131 -0
- package/apps/backend/src/core/jsonrpc.ts +166 -0
- package/apps/backend/src/protocol/AbsolutePathBuf.ts +14 -0
- package/apps/backend/src/protocol/AddConversationListenerParams.ts +6 -0
- package/apps/backend/src/protocol/AddConversationSubscriptionResponse.ts +5 -0
- package/apps/backend/src/protocol/AgentMessageContent.ts +5 -0
- package/apps/backend/src/protocol/AgentMessageContentDeltaEvent.ts +5 -0
- package/apps/backend/src/protocol/AgentMessageDeltaEvent.ts +5 -0
- package/apps/backend/src/protocol/AgentMessageEvent.ts +5 -0
- package/apps/backend/src/protocol/AgentMessageItem.ts +6 -0
- package/apps/backend/src/protocol/AgentReasoningDeltaEvent.ts +5 -0
- package/apps/backend/src/protocol/AgentReasoningEvent.ts +5 -0
- package/apps/backend/src/protocol/AgentReasoningRawContentDeltaEvent.ts +5 -0
- package/apps/backend/src/protocol/AgentReasoningRawContentEvent.ts +5 -0
- package/apps/backend/src/protocol/AgentReasoningSectionBreakEvent.ts +5 -0
- package/apps/backend/src/protocol/Annotations.ts +9 -0
- package/apps/backend/src/protocol/ApplyPatchApprovalParams.ts +21 -0
- package/apps/backend/src/protocol/ApplyPatchApprovalRequestEvent.ts +23 -0
- package/apps/backend/src/protocol/ApplyPatchApprovalResponse.ts +6 -0
- package/apps/backend/src/protocol/ArchiveConversationParams.ts +6 -0
- package/apps/backend/src/protocol/ArchiveConversationResponse.ts +5 -0
- package/apps/backend/src/protocol/AskForApproval.ts +9 -0
- package/apps/backend/src/protocol/AudioContent.ts +9 -0
- package/apps/backend/src/protocol/AuthMode.ts +5 -0
- package/apps/backend/src/protocol/AuthStatusChangeNotification.ts +9 -0
- package/apps/backend/src/protocol/BackgroundEventEvent.ts +5 -0
- package/apps/backend/src/protocol/BlobResourceContents.ts +5 -0
- package/apps/backend/src/protocol/CallToolResult.ts +10 -0
- package/apps/backend/src/protocol/CancelLoginChatGptParams.ts +5 -0
- package/apps/backend/src/protocol/CancelLoginChatGptResponse.ts +5 -0
- package/apps/backend/src/protocol/ClientInfo.ts +5 -0
- package/apps/backend/src/protocol/ClientNotification.ts +5 -0
- package/apps/backend/src/protocol/ClientRequest.ts +46 -0
- package/apps/backend/src/protocol/CodexErrorInfo.ts +8 -0
- package/apps/backend/src/protocol/ContentBlock.ts +10 -0
- package/apps/backend/src/protocol/ContentItem.ts +5 -0
- package/apps/backend/src/protocol/ContextCompactedEvent.ts +5 -0
- package/apps/backend/src/protocol/ConversationGitInfo.ts +5 -0
- package/apps/backend/src/protocol/ConversationId.ts +5 -0
- package/apps/backend/src/protocol/ConversationSummary.ts +8 -0
- package/apps/backend/src/protocol/CreditsSnapshot.ts +5 -0
- package/apps/backend/src/protocol/CustomPrompt.ts +5 -0
- package/apps/backend/src/protocol/DeprecationNoticeEvent.ts +13 -0
- package/apps/backend/src/protocol/ElicitationRequestEvent.ts +6 -0
- package/apps/backend/src/protocol/EmbeddedResource.ts +13 -0
- package/apps/backend/src/protocol/EmbeddedResourceResource.ts +7 -0
- package/apps/backend/src/protocol/ErrorEvent.ts +6 -0
- package/apps/backend/src/protocol/EventMsg.ts +60 -0
- package/apps/backend/src/protocol/ExecApprovalRequestEvent.ts +32 -0
- package/apps/backend/src/protocol/ExecCommandApprovalParams.ts +12 -0
- package/apps/backend/src/protocol/ExecCommandApprovalResponse.ts +6 -0
- package/apps/backend/src/protocol/ExecCommandBeginEvent.ts +35 -0
- package/apps/backend/src/protocol/ExecCommandEndEvent.ts +59 -0
- package/apps/backend/src/protocol/ExecCommandOutputDeltaEvent.ts +18 -0
- package/apps/backend/src/protocol/ExecCommandSource.ts +5 -0
- package/apps/backend/src/protocol/ExecOneOffCommandParams.ts +6 -0
- package/apps/backend/src/protocol/ExecOneOffCommandResponse.ts +5 -0
- package/apps/backend/src/protocol/ExecOutputStream.ts +5 -0
- package/apps/backend/src/protocol/ExecPolicyAmendment.ts +12 -0
- package/apps/backend/src/protocol/ExitedReviewModeEvent.ts +6 -0
- package/apps/backend/src/protocol/FileChange.ts +5 -0
- package/apps/backend/src/protocol/ForcedLoginMethod.ts +5 -0
- package/apps/backend/src/protocol/FunctionCallOutputContentItem.ts +9 -0
- package/apps/backend/src/protocol/FunctionCallOutputPayload.ts +15 -0
- package/apps/backend/src/protocol/FuzzyFileSearchParams.ts +5 -0
- package/apps/backend/src/protocol/FuzzyFileSearchResponse.ts +6 -0
- package/apps/backend/src/protocol/FuzzyFileSearchResult.ts +8 -0
- package/apps/backend/src/protocol/GetAuthStatusParams.ts +5 -0
- package/apps/backend/src/protocol/GetAuthStatusResponse.ts +6 -0
- package/apps/backend/src/protocol/GetConversationSummaryParams.ts +6 -0
- package/apps/backend/src/protocol/GetConversationSummaryResponse.ts +6 -0
- package/apps/backend/src/protocol/GetHistoryEntryResponseEvent.ts +10 -0
- package/apps/backend/src/protocol/GetUserAgentResponse.ts +5 -0
- package/apps/backend/src/protocol/GetUserSavedConfigResponse.ts +6 -0
- package/apps/backend/src/protocol/GhostCommit.ts +8 -0
- package/apps/backend/src/protocol/GitDiffToRemoteParams.ts +5 -0
- package/apps/backend/src/protocol/GitDiffToRemoteResponse.ts +6 -0
- package/apps/backend/src/protocol/GitSha.ts +5 -0
- package/apps/backend/src/protocol/HistoryEntry.ts +5 -0
- package/apps/backend/src/protocol/ImageContent.ts +9 -0
- package/apps/backend/src/protocol/InitializeParams.ts +6 -0
- package/apps/backend/src/protocol/InitializeResponse.ts +5 -0
- package/apps/backend/src/protocol/InputItem.ts +5 -0
- package/apps/backend/src/protocol/InterruptConversationParams.ts +6 -0
- package/apps/backend/src/protocol/InterruptConversationResponse.ts +6 -0
- package/apps/backend/src/protocol/ItemCompletedEvent.ts +7 -0
- package/apps/backend/src/protocol/ItemStartedEvent.ts +7 -0
- package/apps/backend/src/protocol/ListConversationsParams.ts +5 -0
- package/apps/backend/src/protocol/ListConversationsResponse.ts +6 -0
- package/apps/backend/src/protocol/ListCustomPromptsResponseEvent.ts +9 -0
- package/apps/backend/src/protocol/ListSkillsResponseEvent.ts +9 -0
- package/apps/backend/src/protocol/LocalShellAction.ts +6 -0
- package/apps/backend/src/protocol/LocalShellExecAction.ts +5 -0
- package/apps/backend/src/protocol/LocalShellStatus.ts +5 -0
- package/apps/backend/src/protocol/LoginApiKeyParams.ts +5 -0
- package/apps/backend/src/protocol/LoginApiKeyResponse.ts +5 -0
- package/apps/backend/src/protocol/LoginChatGptCompleteNotification.ts +8 -0
- package/apps/backend/src/protocol/LoginChatGptResponse.ts +5 -0
- package/apps/backend/src/protocol/LogoutChatGptResponse.ts +5 -0
- package/apps/backend/src/protocol/McpAuthStatus.ts +5 -0
- package/apps/backend/src/protocol/McpInvocation.ts +18 -0
- package/apps/backend/src/protocol/McpListToolsResponseEvent.ts +25 -0
- package/apps/backend/src/protocol/McpStartupCompleteEvent.ts +6 -0
- package/apps/backend/src/protocol/McpStartupFailure.ts +5 -0
- package/apps/backend/src/protocol/McpStartupStatus.ts +5 -0
- package/apps/backend/src/protocol/McpStartupUpdateEvent.ts +14 -0
- package/apps/backend/src/protocol/McpToolCallBeginEvent.ts +10 -0
- package/apps/backend/src/protocol/McpToolCallEndEvent.ts +15 -0
- package/apps/backend/src/protocol/NetworkAccess.ts +8 -0
- package/apps/backend/src/protocol/NewConversationParams.ts +8 -0
- package/apps/backend/src/protocol/NewConversationResponse.ts +7 -0
- package/apps/backend/src/protocol/ParsedCommand.ts +12 -0
- package/apps/backend/src/protocol/PatchApplyBeginEvent.ts +23 -0
- package/apps/backend/src/protocol/PatchApplyEndEvent.ts +31 -0
- package/apps/backend/src/protocol/PlanItemArg.ts +6 -0
- package/apps/backend/src/protocol/PlanType.ts +5 -0
- package/apps/backend/src/protocol/Profile.ts +9 -0
- package/apps/backend/src/protocol/README.md +11 -0
- package/apps/backend/src/protocol/RateLimitSnapshot.ts +8 -0
- package/apps/backend/src/protocol/RateLimitWindow.ts +17 -0
- package/apps/backend/src/protocol/RawResponseItemEvent.ts +6 -0
- package/apps/backend/src/protocol/ReasoningContentDeltaEvent.ts +5 -0
- package/apps/backend/src/protocol/ReasoningEffort.ts +8 -0
- package/apps/backend/src/protocol/ReasoningItem.ts +5 -0
- package/apps/backend/src/protocol/ReasoningItemContent.ts +5 -0
- package/apps/backend/src/protocol/ReasoningItemReasoningSummary.ts +5 -0
- package/apps/backend/src/protocol/ReasoningRawContentDeltaEvent.ts +5 -0
- package/apps/backend/src/protocol/ReasoningSummary.ts +10 -0
- package/apps/backend/src/protocol/RemoveConversationListenerParams.ts +5 -0
- package/apps/backend/src/protocol/RemoveConversationSubscriptionResponse.ts +5 -0
- package/apps/backend/src/protocol/RequestId.ts +5 -0
- package/apps/backend/src/protocol/Resource.ts +9 -0
- package/apps/backend/src/protocol/ResourceLink.ts +11 -0
- package/apps/backend/src/protocol/ResourceTemplate.ts +9 -0
- package/apps/backend/src/protocol/ResponseItem.ts +17 -0
- package/apps/backend/src/protocol/ResumeConversationParams.ts +8 -0
- package/apps/backend/src/protocol/ResumeConversationResponse.ts +7 -0
- package/apps/backend/src/protocol/ReviewCodeLocation.ts +9 -0
- package/apps/backend/src/protocol/ReviewDecision.ts +9 -0
- package/apps/backend/src/protocol/ReviewFinding.ts +9 -0
- package/apps/backend/src/protocol/ReviewLineRange.ts +8 -0
- package/apps/backend/src/protocol/ReviewOutputEvent.ts +9 -0
- package/apps/backend/src/protocol/ReviewRequest.ts +9 -0
- package/apps/backend/src/protocol/ReviewTarget.ts +9 -0
- package/apps/backend/src/protocol/Role.ts +8 -0
- package/apps/backend/src/protocol/SandboxMode.ts +5 -0
- package/apps/backend/src/protocol/SandboxPolicy.ts +35 -0
- package/apps/backend/src/protocol/SandboxSettings.ts +6 -0
- package/apps/backend/src/protocol/SendUserMessageParams.ts +7 -0
- package/apps/backend/src/protocol/SendUserMessageResponse.ts +5 -0
- package/apps/backend/src/protocol/SendUserTurnParams.ts +11 -0
- package/apps/backend/src/protocol/SendUserTurnResponse.ts +5 -0
- package/apps/backend/src/protocol/ServerNotification.ts +36 -0
- package/apps/backend/src/protocol/ServerRequest.ts +13 -0
- package/apps/backend/src/protocol/SessionConfiguredEvent.ts +48 -0
- package/apps/backend/src/protocol/SessionConfiguredNotification.ts +8 -0
- package/apps/backend/src/protocol/SessionSource.ts +6 -0
- package/apps/backend/src/protocol/SetDefaultModelParams.ts +6 -0
- package/apps/backend/src/protocol/SetDefaultModelResponse.ts +5 -0
- package/apps/backend/src/protocol/SkillErrorInfo.ts +5 -0
- package/apps/backend/src/protocol/SkillMetadata.ts +6 -0
- package/apps/backend/src/protocol/SkillScope.ts +5 -0
- package/apps/backend/src/protocol/SkillsListEntry.ts +7 -0
- package/apps/backend/src/protocol/StepStatus.ts +5 -0
- package/apps/backend/src/protocol/StreamErrorEvent.ts +6 -0
- package/apps/backend/src/protocol/SubAgentSource.ts +5 -0
- package/apps/backend/src/protocol/TaskCompleteEvent.ts +5 -0
- package/apps/backend/src/protocol/TaskStartedEvent.ts +5 -0
- package/apps/backend/src/protocol/TerminalInteractionEvent.ts +17 -0
- package/apps/backend/src/protocol/TextContent.ts +9 -0
- package/apps/backend/src/protocol/TextResourceContents.ts +5 -0
- package/apps/backend/src/protocol/TokenCountEvent.ts +7 -0
- package/apps/backend/src/protocol/TokenUsage.ts +5 -0
- package/apps/backend/src/protocol/TokenUsageInfo.ts +6 -0
- package/apps/backend/src/protocol/Tool.ts +11 -0
- package/apps/backend/src/protocol/ToolAnnotations.ts +15 -0
- package/apps/backend/src/protocol/ToolInputSchema.ts +9 -0
- package/apps/backend/src/protocol/ToolOutputSchema.ts +10 -0
- package/apps/backend/src/protocol/Tools.ts +5 -0
- package/apps/backend/src/protocol/TurnAbortReason.ts +5 -0
- package/apps/backend/src/protocol/TurnAbortedEvent.ts +6 -0
- package/apps/backend/src/protocol/TurnDiffEvent.ts +5 -0
- package/apps/backend/src/protocol/TurnItem.ts +9 -0
- package/apps/backend/src/protocol/UndoCompletedEvent.ts +5 -0
- package/apps/backend/src/protocol/UndoStartedEvent.ts +5 -0
- package/apps/backend/src/protocol/UpdatePlanArgs.ts +6 -0
- package/apps/backend/src/protocol/UserInfoResponse.ts +5 -0
- package/apps/backend/src/protocol/UserInput.ts +8 -0
- package/apps/backend/src/protocol/UserMessageEvent.ts +5 -0
- package/apps/backend/src/protocol/UserMessageItem.ts +6 -0
- package/apps/backend/src/protocol/UserSavedConfig.ts +14 -0
- package/apps/backend/src/protocol/Verbosity.ts +9 -0
- package/apps/backend/src/protocol/ViewImageToolCallEvent.ts +13 -0
- package/apps/backend/src/protocol/WarningEvent.ts +5 -0
- package/apps/backend/src/protocol/WebSearchAction.ts +5 -0
- package/apps/backend/src/protocol/WebSearchBeginEvent.ts +5 -0
- package/apps/backend/src/protocol/WebSearchEndEvent.ts +5 -0
- package/apps/backend/src/protocol/WebSearchItem.ts +5 -0
- package/apps/backend/src/protocol/index.ts +198 -0
- package/apps/backend/src/protocol/serde_json/JsonValue.ts +5 -0
- package/apps/backend/src/protocol/v2/Account.ts +6 -0
- package/apps/backend/src/protocol/v2/AccountLoginCompletedNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/AccountRateLimitsUpdatedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/AccountUpdatedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/AgentMessageDeltaNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/ApprovalDecision.ts +6 -0
- package/apps/backend/src/protocol/v2/AskForApproval.ts +5 -0
- package/apps/backend/src/protocol/v2/CancelLoginAccountParams.ts +5 -0
- package/apps/backend/src/protocol/v2/CancelLoginAccountResponse.ts +6 -0
- package/apps/backend/src/protocol/v2/CancelLoginAccountStatus.ts +5 -0
- package/apps/backend/src/protocol/v2/CodexErrorInfo.ts +11 -0
- package/apps/backend/src/protocol/v2/CommandAction.ts +5 -0
- package/apps/backend/src/protocol/v2/CommandExecParams.ts +6 -0
- package/apps/backend/src/protocol/v2/CommandExecResponse.ts +5 -0
- package/apps/backend/src/protocol/v2/CommandExecutionOutputDeltaNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/CommandExecutionRequestApprovalParams.ts +14 -0
- package/apps/backend/src/protocol/v2/CommandExecutionRequestApprovalResponse.ts +6 -0
- package/apps/backend/src/protocol/v2/CommandExecutionStatus.ts +5 -0
- package/apps/backend/src/protocol/v2/Config.ts +15 -0
- package/apps/backend/src/protocol/v2/ConfigBatchWriteParams.ts +10 -0
- package/apps/backend/src/protocol/v2/ConfigEdit.ts +7 -0
- package/apps/backend/src/protocol/v2/ConfigLayer.ts +7 -0
- package/apps/backend/src/protocol/v2/ConfigLayerMetadata.ts +6 -0
- package/apps/backend/src/protocol/v2/ConfigLayerSource.ts +6 -0
- package/apps/backend/src/protocol/v2/ConfigReadParams.ts +5 -0
- package/apps/backend/src/protocol/v2/ConfigReadResponse.ts +8 -0
- package/apps/backend/src/protocol/v2/ConfigValueWriteParams.ts +11 -0
- package/apps/backend/src/protocol/v2/ConfigWriteResponse.ts +12 -0
- package/apps/backend/src/protocol/v2/ContextCompactedNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/CreditsSnapshot.ts +5 -0
- package/apps/backend/src/protocol/v2/DeprecationNoticeNotification.ts +13 -0
- package/apps/backend/src/protocol/v2/ErrorNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/ExecPolicyAmendment.ts +5 -0
- package/apps/backend/src/protocol/v2/FeedbackUploadParams.ts +5 -0
- package/apps/backend/src/protocol/v2/FeedbackUploadResponse.ts +5 -0
- package/apps/backend/src/protocol/v2/FileChangeOutputDeltaNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/FileChangeRequestApprovalParams.ts +14 -0
- package/apps/backend/src/protocol/v2/FileChangeRequestApprovalResponse.ts +6 -0
- package/apps/backend/src/protocol/v2/FileUpdateChange.ts +6 -0
- package/apps/backend/src/protocol/v2/GetAccountParams.ts +5 -0
- package/apps/backend/src/protocol/v2/GetAccountRateLimitsResponse.ts +6 -0
- package/apps/backend/src/protocol/v2/GetAccountResponse.ts +6 -0
- package/apps/backend/src/protocol/v2/GitInfo.ts +5 -0
- package/apps/backend/src/protocol/v2/ItemCompletedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/ItemStartedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/ListMcpServerStatusParams.ts +13 -0
- package/apps/backend/src/protocol/v2/ListMcpServerStatusResponse.ts +11 -0
- package/apps/backend/src/protocol/v2/LoginAccountParams.ts +5 -0
- package/apps/backend/src/protocol/v2/LoginAccountResponse.ts +9 -0
- package/apps/backend/src/protocol/v2/LogoutAccountResponse.ts +5 -0
- package/apps/backend/src/protocol/v2/McpAuthStatus.ts +5 -0
- package/apps/backend/src/protocol/v2/McpServerOauthLoginCompletedNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/McpServerOauthLoginParams.ts +5 -0
- package/apps/backend/src/protocol/v2/McpServerOauthLoginResponse.ts +5 -0
- package/apps/backend/src/protocol/v2/McpServerStatus.ts +9 -0
- package/apps/backend/src/protocol/v2/McpToolCallError.ts +5 -0
- package/apps/backend/src/protocol/v2/McpToolCallProgressNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/McpToolCallResult.ts +7 -0
- package/apps/backend/src/protocol/v2/McpToolCallStatus.ts +5 -0
- package/apps/backend/src/protocol/v2/MergeStrategy.ts +5 -0
- package/apps/backend/src/protocol/v2/Model.ts +7 -0
- package/apps/backend/src/protocol/v2/ModelListParams.ts +13 -0
- package/apps/backend/src/protocol/v2/ModelListResponse.ts +11 -0
- package/apps/backend/src/protocol/v2/NetworkAccess.ts +5 -0
- package/apps/backend/src/protocol/v2/OverriddenMetadata.ts +7 -0
- package/apps/backend/src/protocol/v2/PatchApplyStatus.ts +5 -0
- package/apps/backend/src/protocol/v2/PatchChangeKind.ts +5 -0
- package/apps/backend/src/protocol/v2/ProfileV2.ts +10 -0
- package/apps/backend/src/protocol/v2/RateLimitSnapshot.ts +8 -0
- package/apps/backend/src/protocol/v2/RateLimitWindow.ts +5 -0
- package/apps/backend/src/protocol/v2/RawResponseItemCompletedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/ReasoningEffortOption.ts +6 -0
- package/apps/backend/src/protocol/v2/ReasoningSummaryPartAddedNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/ReasoningSummaryTextDeltaNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/ReasoningTextDeltaNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/ReviewDelivery.ts +5 -0
- package/apps/backend/src/protocol/v2/ReviewStartParams.ts +12 -0
- package/apps/backend/src/protocol/v2/ReviewStartResponse.ts +13 -0
- package/apps/backend/src/protocol/v2/ReviewTarget.ts +9 -0
- package/apps/backend/src/protocol/v2/SandboxMode.ts +5 -0
- package/apps/backend/src/protocol/v2/SandboxPolicy.ts +7 -0
- package/apps/backend/src/protocol/v2/SandboxWorkspaceWrite.ts +5 -0
- package/apps/backend/src/protocol/v2/SessionSource.ts +5 -0
- package/apps/backend/src/protocol/v2/SkillErrorInfo.ts +5 -0
- package/apps/backend/src/protocol/v2/SkillMetadata.ts +6 -0
- package/apps/backend/src/protocol/v2/SkillScope.ts +5 -0
- package/apps/backend/src/protocol/v2/SkillsListEntry.ts +7 -0
- package/apps/backend/src/protocol/v2/SkillsListParams.ts +13 -0
- package/apps/backend/src/protocol/v2/SkillsListResponse.ts +6 -0
- package/apps/backend/src/protocol/v2/TerminalInteractionNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/Thread.ts +46 -0
- package/apps/backend/src/protocol/v2/ThreadArchiveParams.ts +5 -0
- package/apps/backend/src/protocol/v2/ThreadArchiveResponse.ts +5 -0
- package/apps/backend/src/protocol/v2/ThreadItem.ts +48 -0
- package/apps/backend/src/protocol/v2/ThreadListParams.ts +18 -0
- package/apps/backend/src/protocol/v2/ThreadListResponse.ts +11 -0
- package/apps/backend/src/protocol/v2/ThreadResumeParams.ts +35 -0
- package/apps/backend/src/protocol/v2/ThreadResumeResponse.ts +9 -0
- package/apps/backend/src/protocol/v2/ThreadStartParams.ts +15 -0
- package/apps/backend/src/protocol/v2/ThreadStartResponse.ts +9 -0
- package/apps/backend/src/protocol/v2/ThreadStartedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/ThreadTokenUsage.ts +6 -0
- package/apps/backend/src/protocol/v2/ThreadTokenUsageUpdatedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/TokenUsageBreakdown.ts +5 -0
- package/apps/backend/src/protocol/v2/ToolsV2.ts +5 -0
- package/apps/backend/src/protocol/v2/Turn.ts +18 -0
- package/apps/backend/src/protocol/v2/TurnCompletedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/TurnDiffUpdatedNotification.ts +9 -0
- package/apps/backend/src/protocol/v2/TurnError.ts +6 -0
- package/apps/backend/src/protocol/v2/TurnInterruptParams.ts +5 -0
- package/apps/backend/src/protocol/v2/TurnInterruptResponse.ts +5 -0
- package/apps/backend/src/protocol/v2/TurnPlanStep.ts +6 -0
- package/apps/backend/src/protocol/v2/TurnPlanStepStatus.ts +5 -0
- package/apps/backend/src/protocol/v2/TurnPlanUpdatedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/TurnStartParams.ts +34 -0
- package/apps/backend/src/protocol/v2/TurnStartResponse.ts +6 -0
- package/apps/backend/src/protocol/v2/TurnStartedNotification.ts +6 -0
- package/apps/backend/src/protocol/v2/TurnStatus.ts +5 -0
- package/apps/backend/src/protocol/v2/UserInput.ts +5 -0
- package/apps/backend/src/protocol/v2/WindowsWorldWritableWarningNotification.ts +5 -0
- package/apps/backend/src/protocol/v2/WriteStatus.ts +5 -0
- package/apps/backend/src/protocol/v2/index.ts +123 -0
- package/apps/backend/src/reviews/service.ts +27 -0
- package/apps/backend/src/reviews/store.ts +124 -0
- package/apps/backend/src/server.ts +531 -0
- package/apps/backend/src/services/profile-store.ts +114 -0
- package/apps/backend/src/services/supervisor.ts +102 -0
- package/apps/backend/src/thread-index/service.ts +75 -0
- package/apps/backend/src/thread-index/store.ts +195 -0
- package/apps/backend/src/ws/messages.ts +73 -0
- package/apps/backend/tsconfig.json +20 -0
- package/apps/web/README.md +24 -0
- package/apps/web/bun.lock +1062 -0
- package/apps/web/eslint.config.js +23 -0
- package/apps/web/index.html +16 -0
- package/apps/web/package.json +38 -0
- package/apps/web/src/app.tsx +83 -0
- package/apps/web/src/components/composer/slash-command-menu.tsx +47 -0
- package/apps/web/src/components/index.ts +2 -0
- package/apps/web/src/components/layout/account-usage-panel.tsx +167 -0
- package/apps/web/src/components/layout/analytics-view.tsx +296 -0
- package/apps/web/src/components/layout/index.ts +7 -0
- package/apps/web/src/components/layout/mobile-header.tsx +56 -0
- package/apps/web/src/components/layout/reviews-view.tsx +848 -0
- package/apps/web/src/components/layout/session-view.tsx +1374 -0
- package/apps/web/src/components/layout/settings-dialog.tsx +322 -0
- package/apps/web/src/components/layout/side-bar.tsx +417 -0
- package/apps/web/src/components/layout/thread-list.tsx +488 -0
- package/apps/web/src/components/layout/virtualized-message-list.tsx +748 -0
- package/apps/web/src/components/loading/startup-ascii.ts +652 -0
- package/apps/web/src/components/loading/startup-loader.tsx +37 -0
- package/apps/web/src/components/session-view/file-mention-menu.tsx +46 -0
- package/apps/web/src/components/session-view/session-auth-banner.tsx +61 -0
- package/apps/web/src/components/session-view/session-composer.tsx +328 -0
- package/apps/web/src/components/session-view/session-dialogs.tsx +280 -0
- package/apps/web/src/components/session-view/session-empty.tsx +47 -0
- package/apps/web/src/components/session-view/session-header.tsx +49 -0
- package/apps/web/src/components/ui/avatar.tsx +19 -0
- package/apps/web/src/components/ui/badge.tsx +21 -0
- package/apps/web/src/components/ui/button.tsx +47 -0
- package/apps/web/src/components/ui/collapsible-content.tsx +114 -0
- package/apps/web/src/components/ui/contribution-graph.tsx +182 -0
- package/apps/web/src/components/ui/dialog-box.tsx +203 -0
- package/apps/web/src/components/ui/icon-button.tsx +32 -0
- package/apps/web/src/components/ui/icons.tsx +187 -0
- package/apps/web/src/components/ui/index.tsx +15 -0
- package/apps/web/src/components/ui/input.tsx +43 -0
- package/apps/web/src/components/ui/markdown-stream.tsx +21 -0
- package/apps/web/src/components/ui/mobile-drawer.tsx +124 -0
- package/apps/web/src/components/ui/section-header.tsx +13 -0
- package/apps/web/src/components/ui/select.tsx +217 -0
- package/apps/web/src/components/ui/shimmer.tsx +138 -0
- package/apps/web/src/components/ui/status-dot.tsx +24 -0
- package/apps/web/src/config.ts +5 -0
- package/apps/web/src/hooks/index.ts +3 -0
- package/apps/web/src/hooks/use-analytics.ts +122 -0
- package/apps/web/src/hooks/use-hub-connection.ts +587 -0
- package/apps/web/src/hooks/use-mobile.ts +76 -0
- package/apps/web/src/hooks/use-thread-history.ts +210 -0
- package/apps/web/src/index.css +269 -0
- package/apps/web/src/main.tsx +10 -0
- package/apps/web/src/services/hub-client.ts +358 -0
- package/apps/web/src/store/index.ts +528 -0
- package/apps/web/src/types/index.ts +119 -0
- package/apps/web/src/utils/account-refresh.ts +168 -0
- package/apps/web/src/utils/approval-policy.ts +53 -0
- package/apps/web/src/utils/init-prompt.ts +41 -0
- package/apps/web/src/utils/item-format.ts +170 -0
- package/apps/web/src/utils/prompt-expander.ts +62 -0
- package/apps/web/src/utils/reasoning-summary.ts +48 -0
- package/apps/web/src/utils/slash-commands.ts +98 -0
- package/apps/web/tsconfig.app.json +28 -0
- package/apps/web/tsconfig.json +7 -0
- package/apps/web/tsconfig.node.json +26 -0
- package/apps/web/vite.config.ts +8 -0
- package/bin/better-codex.cjs +199 -0
- package/package.json +20 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react'
|
|
2
|
+
import { hubClient } from '../services/hub-client'
|
|
3
|
+
import { useAppStore } from '../store'
|
|
4
|
+
import type { Message, ReasoningEffort } from '../types'
|
|
5
|
+
import { buildSystemMessage } from '../utils/item-format'
|
|
6
|
+
import { normalizeApprovalPolicy } from '../utils/approval-policy'
|
|
7
|
+
|
|
8
|
+
type ThreadResumeResult = {
|
|
9
|
+
thread?: ThreadData
|
|
10
|
+
model?: string
|
|
11
|
+
reasoningEffort?: ReasoningEffort | null
|
|
12
|
+
approvalPolicy?: string | null
|
|
13
|
+
cwd?: string | null
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type ThreadData = {
|
|
17
|
+
id: string
|
|
18
|
+
preview?: string
|
|
19
|
+
modelProvider?: string
|
|
20
|
+
createdAt?: number
|
|
21
|
+
turns?: TurnData[]
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type TurnData = {
|
|
25
|
+
id: string
|
|
26
|
+
items?: ThreadItem[]
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
type ThreadItem = {
|
|
30
|
+
type: string
|
|
31
|
+
id: string
|
|
32
|
+
content?: UserInput[]
|
|
33
|
+
text?: string
|
|
34
|
+
summary?: string[]
|
|
35
|
+
changes?: Array<{ path?: string; kind?: string; diff?: string }>
|
|
36
|
+
command?: string
|
|
37
|
+
aggregatedOutput?: string
|
|
38
|
+
status?: string
|
|
39
|
+
server?: string
|
|
40
|
+
tool?: string
|
|
41
|
+
arguments?: unknown
|
|
42
|
+
result?: unknown
|
|
43
|
+
error?: unknown
|
|
44
|
+
query?: string
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
type UserInput =
|
|
48
|
+
| { type: 'text'; text: string }
|
|
49
|
+
| { type: 'image'; url: string }
|
|
50
|
+
| { type: 'localImage'; path: string }
|
|
51
|
+
|
|
52
|
+
const toUserContent = (content: UserInput[] = []) => {
|
|
53
|
+
const parts = content
|
|
54
|
+
.map((input) => {
|
|
55
|
+
if (input.type === 'text') {
|
|
56
|
+
return input.text
|
|
57
|
+
}
|
|
58
|
+
if (input.type === 'image') {
|
|
59
|
+
return `[image: ${input.url}]`
|
|
60
|
+
}
|
|
61
|
+
if (input.type === 'localImage') {
|
|
62
|
+
return `[image: ${input.path}]`
|
|
63
|
+
}
|
|
64
|
+
return ''
|
|
65
|
+
})
|
|
66
|
+
.filter((part) => part.trim().length > 0)
|
|
67
|
+
|
|
68
|
+
return parts.join('\n')
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const buildMessagesFromTurns = (turns: TurnData[] = []): Message[] => {
|
|
72
|
+
const messages: Message[] = []
|
|
73
|
+
turns.forEach((turn) => {
|
|
74
|
+
turn.items?.forEach((item) => {
|
|
75
|
+
if (item.type === 'userMessage') {
|
|
76
|
+
const content = toUserContent(item.content ?? [])
|
|
77
|
+
if (!content) {
|
|
78
|
+
return
|
|
79
|
+
}
|
|
80
|
+
messages.push({
|
|
81
|
+
id: item.id,
|
|
82
|
+
role: 'user',
|
|
83
|
+
content,
|
|
84
|
+
kind: 'chat',
|
|
85
|
+
timestamp: '',
|
|
86
|
+
})
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (item.type === 'agentMessage') {
|
|
90
|
+
if (!item.text?.trim()) {
|
|
91
|
+
return
|
|
92
|
+
}
|
|
93
|
+
messages.push({
|
|
94
|
+
id: item.id,
|
|
95
|
+
role: 'assistant',
|
|
96
|
+
content: item.text,
|
|
97
|
+
kind: 'chat',
|
|
98
|
+
timestamp: '',
|
|
99
|
+
})
|
|
100
|
+
return
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const systemMessage = buildSystemMessage(item)
|
|
104
|
+
if (systemMessage) {
|
|
105
|
+
messages.push(systemMessage)
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
return messages
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export const useThreadHistory = () => {
|
|
113
|
+
const {
|
|
114
|
+
threads,
|
|
115
|
+
selectedThreadId,
|
|
116
|
+
messages,
|
|
117
|
+
connectionStatus,
|
|
118
|
+
setMessagesForThread,
|
|
119
|
+
updateThread,
|
|
120
|
+
setThreadModel,
|
|
121
|
+
setThreadEffort,
|
|
122
|
+
setThreadApproval,
|
|
123
|
+
setThreadCwd,
|
|
124
|
+
} = useAppStore()
|
|
125
|
+
|
|
126
|
+
const inFlight = useRef<Set<string>>(new Set())
|
|
127
|
+
|
|
128
|
+
useEffect(() => {
|
|
129
|
+
if (!selectedThreadId || connectionStatus !== 'connected') {
|
|
130
|
+
return
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const thread = threads.find((item) => item.id === selectedThreadId)
|
|
134
|
+
if (!thread) {
|
|
135
|
+
return
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const existing = messages[selectedThreadId]
|
|
139
|
+
if (existing !== undefined) {
|
|
140
|
+
return
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (inFlight.current.has(selectedThreadId)) {
|
|
144
|
+
return
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
let cancelled = false
|
|
148
|
+
|
|
149
|
+
const loadHistory = async () => {
|
|
150
|
+
inFlight.current.add(selectedThreadId)
|
|
151
|
+
try {
|
|
152
|
+
const result = (await hubClient.request(thread.accountId, 'thread/resume', {
|
|
153
|
+
threadId: selectedThreadId,
|
|
154
|
+
})) as ThreadResumeResult
|
|
155
|
+
|
|
156
|
+
if (cancelled) {
|
|
157
|
+
return
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const resumeThread = result.thread
|
|
161
|
+
if (!resumeThread) {
|
|
162
|
+
return
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const loadedMessages = buildMessagesFromTurns(resumeThread.turns)
|
|
166
|
+
setMessagesForThread(selectedThreadId, loadedMessages)
|
|
167
|
+
|
|
168
|
+
updateThread(selectedThreadId, {
|
|
169
|
+
title: resumeThread.preview?.trim() || thread.title,
|
|
170
|
+
preview: resumeThread.preview?.trim() || thread.preview,
|
|
171
|
+
model: resumeThread.modelProvider ?? thread.model,
|
|
172
|
+
messageCount: loadedMessages.length,
|
|
173
|
+
})
|
|
174
|
+
if (result.model) {
|
|
175
|
+
setThreadModel(selectedThreadId, result.model)
|
|
176
|
+
}
|
|
177
|
+
if (result.reasoningEffort) {
|
|
178
|
+
setThreadEffort(selectedThreadId, result.reasoningEffort)
|
|
179
|
+
}
|
|
180
|
+
const approvalPolicy = normalizeApprovalPolicy(result.approvalPolicy)
|
|
181
|
+
if (approvalPolicy) {
|
|
182
|
+
setThreadApproval(selectedThreadId, approvalPolicy)
|
|
183
|
+
}
|
|
184
|
+
if (result.cwd) {
|
|
185
|
+
setThreadCwd(selectedThreadId, result.cwd)
|
|
186
|
+
}
|
|
187
|
+
} catch (error) {
|
|
188
|
+
console.error(error)
|
|
189
|
+
} finally {
|
|
190
|
+
inFlight.current.delete(selectedThreadId)
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
loadHistory()
|
|
195
|
+
|
|
196
|
+
return () => {
|
|
197
|
+
cancelled = true
|
|
198
|
+
}
|
|
199
|
+
}, [
|
|
200
|
+
connectionStatus,
|
|
201
|
+
messages,
|
|
202
|
+
selectedThreadId,
|
|
203
|
+
setMessagesForThread,
|
|
204
|
+
setThreadModel,
|
|
205
|
+
setThreadEffort,
|
|
206
|
+
setThreadApproval,
|
|
207
|
+
threads,
|
|
208
|
+
updateThread,
|
|
209
|
+
])
|
|
210
|
+
}
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
|
|
3
|
+
@theme {
|
|
4
|
+
--font-sans: 'Inter', system-ui, -apple-system, sans-serif;
|
|
5
|
+
|
|
6
|
+
--color-bg-primary: #0d0d0d;
|
|
7
|
+
--color-bg-secondary: #171717;
|
|
8
|
+
--color-bg-tertiary: #1f1f1f;
|
|
9
|
+
--color-bg-elevated: #262626;
|
|
10
|
+
--color-bg-hover: #2a2a2a;
|
|
11
|
+
|
|
12
|
+
--color-border: #2f2f2f;
|
|
13
|
+
--color-border-subtle: #262626;
|
|
14
|
+
|
|
15
|
+
--color-text-primary: #ececec;
|
|
16
|
+
--color-text-secondary: #a1a1a1;
|
|
17
|
+
--color-text-muted: #6b6b6b;
|
|
18
|
+
|
|
19
|
+
--color-accent-green: #10b981;
|
|
20
|
+
--color-accent-green-soft: rgba(16, 185, 129, 0.15);
|
|
21
|
+
--color-accent-red: #ef4444;
|
|
22
|
+
--color-accent-red-soft: rgba(239, 68, 68, 0.15);
|
|
23
|
+
--color-accent-blue: #3b82f6;
|
|
24
|
+
--color-accent-pink: #ec4899;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@layer base {
|
|
28
|
+
* {
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:root {
|
|
33
|
+
--vh: 1vh;
|
|
34
|
+
--safe-area-top: env(safe-area-inset-top, 0px);
|
|
35
|
+
--safe-area-bottom: env(safe-area-inset-bottom, 0px);
|
|
36
|
+
--safe-area-left: env(safe-area-inset-left, 0px);
|
|
37
|
+
--safe-area-right: env(safe-area-inset-right, 0px);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
html, body {
|
|
41
|
+
height: calc(var(--vh, 1vh) * 100);
|
|
42
|
+
max-height: calc(var(--vh, 1vh) * 100);
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
body {
|
|
47
|
+
margin: 0;
|
|
48
|
+
background-color: var(--color-bg-primary);
|
|
49
|
+
color: var(--color-text-primary);
|
|
50
|
+
font-family: var(--font-sans);
|
|
51
|
+
-webkit-font-smoothing: antialiased;
|
|
52
|
+
-moz-osx-font-smoothing: grayscale;
|
|
53
|
+
overscroll-behavior: none;
|
|
54
|
+
padding-top: var(--safe-area-top);
|
|
55
|
+
padding-left: var(--safe-area-left);
|
|
56
|
+
padding-right: var(--safe-area-right);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
#root {
|
|
60
|
+
height: calc(var(--vh, 1vh) * 100);
|
|
61
|
+
max-height: calc(var(--vh, 1vh) * 100);
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
button {
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
font-family: inherit;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
input {
|
|
71
|
+
font-family: inherit;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
input::placeholder {
|
|
75
|
+
color: var(--color-text-muted);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@media (hover: none) and (pointer: coarse) {
|
|
79
|
+
button, [role="button"] {
|
|
80
|
+
-webkit-user-select: none;
|
|
81
|
+
user-select: none;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Markdown content styles */
|
|
87
|
+
@layer components {
|
|
88
|
+
.markdown-content {
|
|
89
|
+
line-height: 1.6;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.markdown-content p {
|
|
93
|
+
margin: 0.5em 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.markdown-content p:first-child {
|
|
97
|
+
margin-top: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.markdown-content p:last-child {
|
|
101
|
+
margin-bottom: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.markdown-content strong {
|
|
105
|
+
font-weight: 600;
|
|
106
|
+
color: var(--color-text-primary);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.markdown-content em {
|
|
110
|
+
font-style: italic;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.markdown-content code {
|
|
114
|
+
font-family: 'SF Mono', 'Fira Code', 'Monaco', 'Menlo', monospace;
|
|
115
|
+
font-size: 0.875em;
|
|
116
|
+
background-color: var(--color-bg-primary);
|
|
117
|
+
padding: 0.15em 0.4em;
|
|
118
|
+
border-radius: 4px;
|
|
119
|
+
color: var(--color-accent-green);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.markdown-content pre {
|
|
123
|
+
margin: 0.75em 0;
|
|
124
|
+
padding: 0.875rem 1rem;
|
|
125
|
+
background-color: var(--color-bg-primary);
|
|
126
|
+
border-radius: 8px;
|
|
127
|
+
overflow-x: auto;
|
|
128
|
+
border: 1px solid var(--color-border-subtle);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.markdown-content pre code {
|
|
132
|
+
background: none;
|
|
133
|
+
padding: 0;
|
|
134
|
+
font-size: 0.8125rem;
|
|
135
|
+
color: var(--color-text-secondary);
|
|
136
|
+
line-height: 1.5;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.markdown-content ul,
|
|
140
|
+
.markdown-content ol {
|
|
141
|
+
margin: 0.5em 0;
|
|
142
|
+
padding-left: 1.5em;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.markdown-content li {
|
|
146
|
+
margin: 0.25em 0;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.markdown-content li::marker {
|
|
150
|
+
color: var(--color-text-muted);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.markdown-content blockquote {
|
|
154
|
+
margin: 0.5em 0;
|
|
155
|
+
padding-left: 1em;
|
|
156
|
+
border-left: 3px solid var(--color-border);
|
|
157
|
+
color: var(--color-text-secondary);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.markdown-content h1,
|
|
161
|
+
.markdown-content h2,
|
|
162
|
+
.markdown-content h3,
|
|
163
|
+
.markdown-content h4 {
|
|
164
|
+
margin: 1em 0 0.5em;
|
|
165
|
+
font-weight: 600;
|
|
166
|
+
color: var(--color-text-primary);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.markdown-content h1:first-child,
|
|
170
|
+
.markdown-content h2:first-child,
|
|
171
|
+
.markdown-content h3:first-child,
|
|
172
|
+
.markdown-content h4:first-child {
|
|
173
|
+
margin-top: 0;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.markdown-content a {
|
|
177
|
+
color: var(--color-accent-blue);
|
|
178
|
+
text-decoration: none;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.markdown-content a:hover {
|
|
182
|
+
text-decoration: underline;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.markdown-content table {
|
|
186
|
+
width: 100%;
|
|
187
|
+
margin: 0.75em 0;
|
|
188
|
+
border-collapse: collapse;
|
|
189
|
+
font-size: 0.875em;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.markdown-content th,
|
|
193
|
+
.markdown-content td {
|
|
194
|
+
padding: 0.5em 0.75em;
|
|
195
|
+
border: 1px solid var(--color-border-subtle);
|
|
196
|
+
text-align: left;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.markdown-content th {
|
|
200
|
+
background-color: var(--color-bg-primary);
|
|
201
|
+
font-weight: 600;
|
|
202
|
+
color: var(--color-text-primary);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.markdown-content tr:nth-child(even) {
|
|
206
|
+
background-color: var(--color-bg-primary);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.markdown-content hr {
|
|
210
|
+
margin: 1em 0;
|
|
211
|
+
border: none;
|
|
212
|
+
border-top: 1px solid var(--color-border-subtle);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Utility classes */
|
|
217
|
+
@layer utilities {
|
|
218
|
+
.overflow-wrap-anywhere {
|
|
219
|
+
overflow-wrap: anywhere;
|
|
220
|
+
word-break: break-word;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.h-dvh {
|
|
224
|
+
height: calc(var(--vh, 1vh) * 100);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.min-h-dvh {
|
|
228
|
+
min-height: calc(var(--vh, 1vh) * 100);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.max-h-dvh {
|
|
232
|
+
max-height: calc(var(--vh, 1vh) * 100);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.fixed-dvh {
|
|
236
|
+
position: fixed;
|
|
237
|
+
top: 0;
|
|
238
|
+
left: 0;
|
|
239
|
+
right: 0;
|
|
240
|
+
height: calc(var(--vh, 1vh) * 100);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.backdrop-blur-mobile {
|
|
244
|
+
backdrop-filter: blur(8px);
|
|
245
|
+
-webkit-backdrop-filter: blur(8px);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.scrollbar-hide {
|
|
249
|
+
-ms-overflow-style: none;
|
|
250
|
+
scrollbar-width: none;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.scrollbar-hide::-webkit-scrollbar {
|
|
254
|
+
display: none;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.touch-scroll {
|
|
258
|
+
-webkit-overflow-scrolling: touch;
|
|
259
|
+
overscroll-behavior: contain;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.pb-safe {
|
|
263
|
+
padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.pt-safe {
|
|
267
|
+
padding-top: env(safe-area-inset-top, 0px);
|
|
268
|
+
}
|
|
269
|
+
}
|