SYMBOL INDEX (2099 symbols across 416 files) FILE: __mocks__/@aws-sdk/client-s3.ts class PutObjectCommand (line 7) | class PutObjectCommand { method constructor (line 8) | constructor(params: any) {} class GetObjectCommand (line 11) | class GetObjectCommand { method constructor (line 12) | constructor(params: any) {} class DeleteObjectCommand (line 15) | class DeleteObjectCommand { method constructor (line 16) | constructor(params: any) {} FILE: __mocks__/@upstash/ratelimit.ts class Ratelimit (line 8) | class Ratelimit { method constructor (line 9) | constructor(_config: unknown) {} method tokenBucket (line 13) | static tokenBucket(_max: number, _interval: string, _refill: number) { method slidingWindow (line 17) | static slidingWindow(_max: number, _interval: string) { method fixedWindow (line 21) | static fixedWindow(_max: number, _interval: string) { FILE: __mocks__/@upstash/redis.ts class Redis (line 10) | class Redis { FILE: __mocks__/convex/browser.ts class ConvexHttpClient (line 12) | class ConvexHttpClient { method constructor (line 13) | constructor(_url: string) {} FILE: __mocks__/workos-node.ts class WorkOS (line 2) | class WorkOS { FILE: app/(chat)/c/[id]/page.tsx function Page (line 11) | function Page(props: { params: Promise<{ id: string }> }) { FILE: app/(chat)/layout.tsx function ChatRouteLayout (line 20) | function ChatRouteLayout({ FILE: app/(chat)/page.tsx constant LOGIN_TYPING_PREFIX (line 21) | const LOGIN_TYPING_PREFIX = "Ask HackerAI to "; constant LOGIN_TYPING_TAILS (line 22) | const LOGIN_TYPING_TAILS = [ function Page (line 119) | function Page() { FILE: app/api/agent-long/cancel/route.ts function POST (line 14) | async function POST(req: NextRequest) { FILE: app/api/agent-long/resume/route.ts constant TERMINAL_STATUSES (line 14) | const TERMINAL_STATUSES = new Set([ function GET (line 30) | async function GET(req: NextRequest) { FILE: app/api/agent-long/route.ts function POST (line 29) | async function POST(req: NextRequest) { FILE: app/api/agent/route.ts constant POST (line 5) | const POST = createChatHandler("/api/agent"); FILE: app/api/auth/desktop-callback/route.ts type DesktopAuthSession (line 9) | type DesktopAuthSession = { function escapeHtml (line 18) | function escapeHtml(str: string): string { function GET (line 27) | async function GET(request: NextRequest) { function renderSuccessPage (line 185) | function renderSuccessPage(deepLinkUrl: string): string { function renderErrorPage (line 234) | function renderErrorPage(message: string): string { FILE: app/api/chat/[id]/stream/route.ts function GET (line 16) | async function GET( FILE: app/api/chat/route.ts constant POST (line 5) | const POST = createChatHandler("/api/chat"); FILE: app/api/delete-sandboxes/route.ts function POST (line 7) | async function POST(req: NextRequest) { FILE: app/api/entitlements/route.ts function GET (line 17) | async function GET(req: NextRequest) { FILE: app/api/extra-usage/confirm/route.ts function GET (line 18) | async function GET(req: NextRequest) { FILE: app/api/extra-usage/webhook/route.ts function POST (line 17) | async function POST(req: NextRequest) { FILE: app/api/fraud/webhook/route.ts type SuspensionCategory (line 10) | type SuspensionCategory = function isTerminalStripeError (line 25) | function isTerminalStripeError(err: unknown): boolean { function cancelAllSubscriptions (line 38) | async function cancelAllSubscriptions( function detachAllPaymentMethods (line 78) | async function detachAllPaymentMethods( function markCustomerBlocked (line 113) | async function markCustomerBlocked( function reportChargeFraudulent (line 127) | async function reportChargeFraudulent(chargeId: string): Promise { function refundChargeForEFW (line 154) | async function refundChargeForEFW( function getCustomerIdFromCharge (line 190) | function getCustomerIdFromCharge(charge: Stripe.Charge): string | null { function suspendCustomerUsers (line 199) | async function suspendCustomerUsers({ function blockFraudulentUser (line 244) | async function blockFraudulentUser( function handleEarlyFraudWarning (line 286) | async function handleEarlyFraudWarning( function handleDisputeCreated (line 340) | async function handleDisputeCreated(dispute: Stripe.Dispute): Promise { function handleSubscriptionUpdated (line 237) | async function handleSubscriptionUpdated( function handleSubscriptionDeleted (line 319) | async function handleSubscriptionDeleted( function POST (line 368) | async function POST(req: NextRequest) { FILE: app/api/team/extra-usage/confirm/route.ts function GET (line 16) | async function GET(req: NextRequest) { FILE: app/api/team/extra-usage/webhook/route.ts function POST (line 17) | async function POST(req: NextRequest) { FILE: app/api/team/seats/route.ts constant MAX_SEATS (line 7) | const MAX_SEATS = 999; function validateQuantity (line 9) | function validateQuantity( type WorkOSOrganization (line 30) | type WorkOSOrganization = Awaited< type SeatOperationError (line 34) | interface SeatOperationError { type SeatOperationSuccess (line 38) | interface SeatOperationSuccess { type SeatOperationContext (line 50) | type SeatOperationContext = SeatOperationError | SeatOperationSuccess; function getSeatOperationContext (line 53) | async function getSeatOperationContext( type SubscriptionWithBillingAnchor (line 249) | type SubscriptionWithBillingAnchor = Stripe.Subscription & { type InvoiceWithPaymentIntent (line 404) | type InvoiceWithPaymentIntent = Stripe.Invoice & { FILE: app/api/team/team-auth.ts type Membership (line 5) | type Membership = Awaited< function requireTeamOrg (line 17) | async function requireTeamOrg( function requireAdminOrg (line 80) | async function requireAdminOrg( FILE: app/auth-error/auto-retry-button.tsx constant STORAGE_KEY (line 7) | const STORAGE_KEY = "auth_retry_state"; constant BASE_DELAY (line 8) | const BASE_DELAY = 5; constant MAX_DELAY (line 9) | const MAX_DELAY = 600; constant EXPIRY_HOURS (line 10) | const EXPIRY_HOURS = 4; type RetryState (line 12) | interface RetryState { function getRetryState (line 17) | function getRetryState(): RetryState { function setRetryState (line 33) | function setRetryState(count: number): void { function calculateDelay (line 46) | function calculateDelay(retryCount: number): number { type AutoRetryButtonProps (line 52) | interface AutoRetryButtonProps { function AutoRetryButton (line 56) | function AutoRetryButton({ loginUrl }: AutoRetryButtonProps) { FILE: app/auth-error/page.tsx type ErrorCode (line 14) | type ErrorCode = "429" | "401" | "403" | "500" | "502" | "503" | "504"; constant ERROR_MESSAGES (line 16) | const ERROR_MESSAGES: Record< constant DEFAULT_ERROR (line 58) | const DEFAULT_ERROR = { type SearchParams (line 63) | type SearchParams = Promise<{ code?: string }>; function AuthErrorPage (line 65) | async function AuthErrorPage({ FILE: app/callback/route.ts constant PKCE_COOKIE_PREFIX (line 11) | const PKCE_COOKIE_PREFIX = "wos-auth-verifier"; type RecoveryBucket (line 16) | type RecoveryBucket = function GET (line 110) | async function GET(request: NextRequest) { FILE: app/components/AllFilesDialog.tsx type AllFilesDialogProps (line 15) | interface AllFilesDialogProps { type FileItemProps (line 26) | interface FileItemProps { function fetchAllUrls (line 171) | async function fetchAllUrls() { FILE: app/components/AttachmentButton.tsx type AttachmentButtonProps (line 14) | interface AttachmentButtonProps { FILE: app/components/BillingFrequencySelector.tsx type BillingFrequency (line 5) | type BillingFrequency = "monthly" | "yearly"; type BillingFrequencySelectorProps (line 7) | interface BillingFrequencySelectorProps { FILE: app/components/BranchIndicator.tsx type BranchIndicatorProps (line 8) | interface BranchIndicatorProps { FILE: app/components/CancelSubscriptionDialog.tsx type CancelSubscriptionDialogProps (line 25) | type CancelSubscriptionDialogProps = { function getFeaturesForTier (line 30) | function getFeaturesForTier(tier: SubscriptionTier) { function getPlanDisplayName (line 47) | function getPlanDisplayName(tier: SubscriptionTier) { FILE: app/components/ChatHeader.tsx type ChatHeaderProps (line 27) | interface ChatHeaderProps { FILE: app/components/ChatInput/AgentUpgradeDialog.tsx type AgentUpgradeDialogProps (line 14) | interface AgentUpgradeDialogProps { function AgentUpgradeDialog (line 19) | function AgentUpgradeDialog({ FILE: app/components/ChatInput/ChatInput.tsx type ChatInputProps (line 25) | interface ChatInputProps { FILE: app/components/ChatInput/ChatInputTextarea.tsx type ChatInputTextareaProps (line 19) | interface ChatInputTextareaProps { function ChatInputTextarea (line 29) | function ChatInputTextarea({ FILE: app/components/ChatInput/ChatInputToolbar.tsx type ChatInputToolbarProps (line 16) | interface ChatInputToolbarProps extends SubmitStopButtonProps { function ChatInputToolbar (line 23) | function ChatInputToolbar({ FILE: app/components/ChatInput/ChatModeSelector.tsx type ChatModeSelectorProps (line 12) | interface ChatModeSelectorProps { function ChatModeSelector (line 16) | function ChatModeSelector({ className }: ChatModeSelectorProps) { FILE: app/components/ChatInput/ModeSelectorMenu/ModeOptionItem.tsx type ModeOptionItemProps (line 6) | interface ModeOptionItemProps { function ModeOptionItem (line 16) | function ModeOptionItem({ FILE: app/components/ChatInput/ModeSelectorMenu/ModeSelectorContent.tsx type ModeSelectorContentProps (line 8) | interface ModeSelectorContentProps { function ModeSelectorContent (line 14) | function ModeSelectorContent({ FILE: app/components/ChatInput/ModeSelectorMenu/ModeSelectorTrigger.tsx constant MODE_VARIANT_CLASSES (line 8) | const MODE_VARIANT_CLASSES: Record = { type ModeSelectorTriggerProps (line 17) | interface ModeSelectorTriggerProps { function ModeSelectorTrigger (line 21) | function ModeSelectorTrigger({ chatMode }: ModeSelectorTriggerProps) { FILE: app/components/ChatInput/SubmitStopButton.tsx constant BASE_BUTTON_CLASSES (line 12) | const BASE_BUTTON_CLASSES = "rounded-full p-0 w-8 h-8 min-w-0"; constant STOP_BUTTON_VARIANT_CLASSES (line 14) | const STOP_BUTTON_VARIANT_CLASSES: Record = { function getStopButtonVariantClasses (line 20) | function getStopButtonVariantClasses(mode: ChatMode): string { function getSubmitButtonVariantClasses (line 24) | function getSubmitButtonVariantClasses(mode: ChatMode): string { function getSendButtonTooltip (line 31) | function getSendButtonTooltip( type SubmitStopButtonProps (line 40) | interface SubmitStopButtonProps { function SubmitStopButton (line 52) | function SubmitStopButton({ FILE: app/components/ChatItem.tsx type ChatItemProps (line 58) | interface ChatItemProps { FILE: app/components/ChatLayout.tsx function ChatLayout (line 17) | function ChatLayout({ children }: { children: React.ReactNode }) { FILE: app/components/CodeHighlight.tsx type CodeHighlightProps (line 7) | interface CodeHighlightProps { FILE: app/components/ComputerCodeBlock.tsx type ComputerCodeBlockProps (line 13) | interface ComputerCodeBlockProps { FILE: app/components/ComputerSidebar.tsx type ComputerSidebarProps (line 38) | interface ComputerSidebarProps { FILE: app/components/ContextUsageIndicator.tsx type ContextUsageData (line 16) | interface ContextUsageData { type ContextUsageIndicatorProps (line 21) | interface ContextUsageIndicatorProps extends ContextUsageData { function formatTokenCount (line 25) | function formatTokenCount(n: number): string { function formatExactTokenCount (line 38) | function formatExactTokenCount(n: number): string { constant AUTO_COMPACT_PERCENT (line 42) | const AUTO_COMPACT_PERCENT = Math.round( constant CIRCLE_SIZE (line 46) | const CIRCLE_SIZE = 16; constant STROKE_WIDTH (line 47) | const STROKE_WIDTH = 2.5; constant RADIUS (line 48) | const RADIUS = (CIRCLE_SIZE - STROKE_WIDTH) / 2; constant CIRCUMFERENCE (line 49) | const CIRCUMFERENCE = 2 * Math.PI * RADIUS; function ContextUsageCircle (line 51) | function ContextUsageCircle({ dashOffset }: { dashOffset: number }) { FILE: app/components/ConvexErrorBoundary.tsx type Props (line 7) | interface Props { type State (line 12) | interface State { class ConvexErrorBoundary (line 17) | class ConvexErrorBoundary extends Component { method constructor (line 18) | constructor(props: Props) { method getDerivedStateFromError (line 23) | static getDerivedStateFromError(error: Error): State { method componentDidCatch (line 27) | componentDidCatch(error: Error, errorInfo: React.ErrorInfo) { method render (line 64) | render() { FILE: app/components/CustomizeHackerAIDialog.tsx type CustomizeHackerAIDialogProps (line 28) | interface CustomizeHackerAIDialogProps { FILE: app/components/DataStreamProvider.tsx type DataStreamStateValue (line 13) | interface DataStreamStateValue { type DataStreamDispatchValue (line 20) | interface DataStreamDispatchValue { function DataStreamProvider (line 31) | function DataStreamProvider({ function useDataStreamState (line 62) | function useDataStreamState() { function useDataStreamDispatch (line 74) | function useDataStreamDispatch() { function useDataStream (line 85) | function useDataStream() { FILE: app/components/DeleteAccountDialog.tsx type DeleteAccountDialogProps (line 21) | type DeleteAccountDialogProps = { FILE: app/components/DeleteMfaFactorDialog.tsx type DeleteMfaFactorDialogProps (line 15) | interface DeleteMfaFactorDialogProps { FILE: app/components/DiffView.tsx type ViewMode (line 7) | type ViewMode = "diff" | "original" | "modified"; type DiffViewProps (line 9) | interface DiffViewProps { FILE: app/components/DragDropOverlay.tsx type DragDropOverlayProps (line 5) | interface DragDropOverlayProps { FILE: app/components/FeedbackInput.tsx type FeedbackInputProps (line 5) | interface FeedbackInputProps { FILE: app/components/FilePartRenderer.tsx function fetchUrl (line 84) | async function fetchUrl() { FILE: app/components/FinishReasonNotice.tsx type FinishReasonNoticeProps (line 7) | interface FinishReasonNoticeProps { FILE: app/components/HackingSuggestions.tsx constant HACKING_QUESTIONS (line 6) | const HACKING_QUESTIONS = [ FILE: app/components/Header.tsx type HeaderProps (line 11) | interface HeaderProps { FILE: app/components/ImageViewer.tsx type ImageViewerProps (line 4) | interface ImageViewerProps { FILE: app/components/ManageNotesDialog.tsx type ManageNotesDialogProps (line 17) | interface ManageNotesDialogProps { FILE: app/components/ManageSharedChatsDialog.tsx type ManageSharedChatsDialogProps (line 9) | interface ManageSharedChatsDialogProps { FILE: app/components/MarkdownTable.tsx function extractTableData (line 6) | function extractTableData(tableEl: HTMLTableElement): string[][] { function toCSV (line 18) | function toCSV(data: string[][]): string { type MarkdownTableProps (line 33) | interface MarkdownTableProps { function MarkdownTable (line 39) | function MarkdownTable({ FILE: app/components/MemoizedMarkdown.tsx function isLocalFilePath (line 13) | function isLocalFilePath(href: string | undefined): boolean { type MemoizedMarkdownProps (line 18) | interface MemoizedMarkdownProps { method a (line 28) | a({ children, href }) { FILE: app/components/MessageActions.tsx type MessageActionsProps (line 17) | interface MessageActionsProps { FILE: app/components/MessageEditor.tsx type EditableFile (line 13) | interface EditableFile { type MessageEditorProps (line 20) | interface MessageEditorProps { FILE: app/components/MessageErrorState.tsx type MessageErrorStateProps (line 9) | interface MessageErrorStateProps { FILE: app/components/MessageItem.tsx type MessageItemProps (line 26) | interface MessageItemProps { function areMessageItemPropsEqual (line 65) | function areMessageItemPropsEqual( FILE: app/components/MessagePartHandler.tsx type MessagePartHandlerProps (line 18) | interface MessagePartHandlerProps { function deepEqual (line 37) | function deepEqual(a: any, b: any): boolean { function arePropsEqual (line 65) | function arePropsEqual( FILE: app/components/MessageSearchDialog.tsx type MessageSearchResult (line 29) | interface MessageSearchResult { type MessageSearchDialogProps (line 39) | interface MessageSearchDialogProps { type DateCategory (line 44) | type DateCategory = FILE: app/components/Messages.tsx type MessagesProps (line 27) | interface MessagesProps { FILE: app/components/MfaVerificationDialog.tsx type EnrollmentData (line 16) | interface EnrollmentData { type MfaVerificationDialogProps (line 30) | interface MfaVerificationDialogProps { FILE: app/components/MigratePentestgptDialog.tsx type MigratePentestgptDialogProps (line 15) | type MigratePentestgptDialogProps = { FILE: app/components/ModelSelector.tsx type ModelSelectorProps (line 53) | interface ModelSelectorProps { function ModelSelector (line 333) | function ModelSelector({ value, onChange, mode }: ModelSelectorProps) { FILE: app/components/ModelSelector/CostIndicator.tsx type CostTier (line 9) | type CostTier = "low" | "medium" | "high" | "very-high"; function getCostTier (line 14) | function getCostTier(modelId: string, mode?: ChatMode): CostTier { constant COST_CONFIG (line 27) | const COST_CONFIG: Record< constant MAX_DOLLARS (line 54) | const MAX_DOLLARS = 3; function CostIndicator (line 56) | function CostIndicator({ FILE: app/components/ModelSelector/constants.ts type ModelOption (line 4) | interface ModelOption { constant ASK_MODEL_OPTIONS (line 14) | const ASK_MODEL_OPTIONS: ModelOption[] = [ constant AGENT_MODEL_OPTIONS (line 36) | const AGENT_MODEL_OPTIONS: ModelOption[] = [ FILE: app/components/PersonalizationTab.tsx type PersonalizationTabProps (line 12) | interface PersonalizationTabProps { FILE: app/components/PricingDialog.tsx type PricingDialogProps (line 25) | interface PricingDialogProps { type PlanCardProps (line 30) | interface PlanCardProps { type PremiumPlan (line 154) | type PremiumPlan = "pro-plus" | "ultra"; type PremiumPlanSelectorProps (line 156) | interface PremiumPlanSelectorProps { FILE: app/components/QueuedMessagesPanel.tsx type QueuedMessagesPanelProps (line 19) | interface QueuedMessagesPanelProps { FILE: app/components/RateLimitWarning.tsx type RateLimitWarningData (line 8) | type RateLimitWarningData = type RateLimitWarningProps (line 36) | interface RateLimitWarningProps { constant WARNING_STYLES (line 100) | const WARNING_STYLES = "bg-input-chat border-black/8 dark:border-border"; FILE: app/components/ReasoningHandler.tsx type ReasoningHandlerProps (line 13) | type ReasoningHandlerProps = { constant REDACTED_PATTERN (line 37) | const REDACTED_PATTERN = /^(\[REDACTED\])+$/; function areReasoningPropsEqual (line 40) | function areReasoningPropsEqual( FILE: app/components/RemoteControlTab.tsx type LocalConnection (line 29) | interface LocalConnection { type CommandBlockProps (line 42) | interface CommandBlockProps { type UseAutoSelectNewRemoteConnectionArgs (line 89) | interface UseAutoSelectNewRemoteConnectionArgs { function useAutoSelectNewRemoteConnection (line 101) | function useAutoSelectNewRemoteConnection({ FILE: app/components/SandboxSelector.tsx type SandboxSelectorProps (line 27) | interface SandboxSelectorProps { type ConnectionOption (line 34) | interface ConnectionOption { function SandboxSelector (line 41) | function SandboxSelector({ FILE: app/components/ScrollToBottomButton.tsx type ScrollToBottomButtonProps (line 4) | interface ScrollToBottomButtonProps { FILE: app/components/SecurityTab.tsx type MfaFactor (line 10) | interface MfaFactor { type EnrollmentData (line 18) | interface EnrollmentData { FILE: app/components/SettingsDialog.tsx type SettingsDialogProps (line 32) | interface SettingsDialogProps { FILE: app/components/ShareDialog.tsx type ShareDialogProps (line 21) | interface ShareDialogProps { FILE: app/components/Sidebar.tsx type ChatListData (line 22) | type ChatListData = ReturnType; FILE: app/components/SidebarHeader.tsx type SidebarHeaderContentProps (line 19) | interface SidebarHeaderContentProps { type SidebarHeaderContentImplProps (line 29) | interface SidebarHeaderContentImplProps { FILE: app/components/SidebarHistory.tsx type SidebarHistoryProps (line 8) | interface SidebarHistoryProps { FILE: app/components/SidebarUserNav.tsx constant NEXT_PUBLIC_HELP_CENTER_URL (line 44) | const NEXT_PUBLIC_HELP_CENTER_URL = FILE: app/components/SourcesDialog.tsx type Source (line 4) | interface Source { type SourcesDialogProps (line 11) | interface SourcesDialogProps { FILE: app/components/TeamDialogs.tsx type TeamMember (line 16) | interface TeamMember { type PendingInvitation (line 27) | interface PendingInvitation { type TeamDialogsProps (line 35) | interface TeamDialogsProps { type SeatPreview (line 327) | interface SeatPreview { FILE: app/components/TeamExtraUsageSection.tsx type Member (line 13) | type Member = { type Pool (line 24) | type Pool = { FILE: app/components/TeamMembersList.tsx type TeamMember (line 7) | interface TeamMember { type PendingInvitation (line 18) | interface PendingInvitation { type TeamMembersListProps (line 26) | interface TeamMembersListProps { FILE: app/components/TeamPricingDialog.tsx type TeamPricingDialogProps (line 18) | interface TeamPricingDialogProps { FILE: app/components/TeamTab.tsx type TeamMember (line 26) | interface TeamMember { type PendingInvitation (line 37) | interface PendingInvitation { type TeamInfo (line 45) | interface TeamInfo { FILE: app/components/TerminalCodeBlock.tsx type TerminalCodeBlockProps (line 15) | interface TerminalCodeBlockProps { type AnsiCodeBlockProps (line 27) | interface AnsiCodeBlockProps { constant MAX_CACHE_SIZE (line 39) | const MAX_CACHE_SIZE = 100; FILE: app/components/TodoPanel.tsx type TodoPanelProps (line 13) | interface TodoPanelProps { FILE: app/components/UpgradeConfirmationDialog.tsx type UpgradeConfirmationDialogProps (line 9) | interface UpgradeConfirmationDialogProps { type SubscriptionDetails (line 25) | interface SubscriptionDetails { FILE: app/components/XtermRenderer.tsx type XtermRendererProps (line 8) | interface XtermRendererProps { function XtermRenderer (line 14) | function XtermRenderer({ FILE: app/components/__tests__/ContextUsageIndicator.test.tsx method observe (line 11) | observe() {} method unobserve (line 12) | unobserve() {} method disconnect (line 13) | disconnect() {} FILE: app/components/__tests__/FinishReasonNotice.test.tsx function DataStreamSetter (line 10) | function DataStreamSetter({ type RenderNoticeProps (line 35) | interface RenderNoticeProps { function renderNotice (line 41) | function renderNotice( FILE: app/components/__tests__/RemoteControlTab.test.tsx type MockConnection (line 5) | type MockConnection = { FILE: app/components/chat.tsx type StreamingEphemeralState (line 60) | interface StreamingEphemeralState { type StreamingAction (line 70) | type StreamingAction = function streamingReducer (line 93) | function streamingReducer( function StreamEffects (line 125) | function StreamEffects({ FILE: app/components/computer-sidebar-utils.tsx function getCategoryColor (line 35) | function getCategoryColor(category: NoteCategory): string { constant LANGUAGE_MAP (line 50) | const LANGUAGE_MAP: Record = { function getLanguageFromPath (line 89) | function getLanguageFromPath(filePath: string): string { function getActionText (line 98) | function getActionText(content: SidebarContent): string { function getSidebarIcon (line 179) | function getSidebarIcon(content: SidebarContent): React.ReactNode { function getToolName (line 194) | function getToolName(content: SidebarContent): string { function getDisplayTarget (line 210) | function getDisplayTarget(content: SidebarContent): string { FILE: app/components/extra-usage/AdjustSpendingLimitDialog.tsx type AdjustSpendingLimitDialogProps (line 13) | type AdjustSpendingLimitDialogProps = { type ContentProps (line 21) | type ContentProps = Omit< FILE: app/components/extra-usage/AutoReloadDialog.tsx type AutoReloadDialogProps (line 16) | type AutoReloadDialogProps = { type ContentProps (line 28) | type ContentProps = Omit; FILE: app/components/extra-usage/BuyExtraUsageDialog.tsx type BuyExtraUsageDialogProps (line 17) | type BuyExtraUsageDialogProps = { constant MAX_AMOUNT (line 34) | const MAX_AMOUNT = 999_999; type ContentProps (line 47) | type ContentProps = { FILE: app/components/extra-usage/ExtraUsagePurchaseToast.tsx function ExtraUsagePurchaseToast (line 17) | function ExtraUsagePurchaseToast() { FILE: app/components/extra-usage/TurnOffExtraUsageDialog.tsx type TurnOffExtraUsageDialogProps (line 13) | type TurnOffExtraUsageDialogProps = { FILE: app/components/tools/FileHandler.tsx type FileInput (line 10) | interface FileInput { type FileHandlerProps (line 19) | interface FileHandlerProps { function areFilePropsEqual (line 25) | function areFilePropsEqual( FILE: app/components/tools/FileToolsHandler.tsx type DiffDataPart (line 23) | interface DiffDataPart { type FileToolsHandlerProps (line 51) | interface FileToolsHandlerProps { FILE: app/components/tools/GetTerminalFilesHandler.tsx type TerminalFilesPart (line 13) | interface TerminalFilesPart { type GetTerminalFilesHandlerProps (line 30) | interface GetTerminalFilesHandlerProps { FILE: app/components/tools/HttpRequestToolHandler.tsx type HttpRequestToolHandlerProps (line 10) | interface HttpRequestToolHandlerProps { FILE: app/components/tools/NotesToolHandler.tsx type NotesToolHandlerProps (line 15) | interface NotesToolHandlerProps { FILE: app/components/tools/ProxyToolHandler.tsx type ProxyToolHandlerProps (line 9) | interface ProxyToolHandlerProps { constant PROXY_ACTION_LABELS (line 16) | const PROXY_ACTION_LABELS: Record = { constant PROXY_COMPLETED_LABELS (line 25) | const PROXY_COMPLETED_LABELS: Record = { function padRight (line 38) | function padRight(str: string, len: number): string { function formatListRequests (line 44) | function formatListRequests(r: any): string { function formatViewRequest (line 73) | function formatViewRequest(r: any): string { function formatSendRequest (line 91) | function formatSendRequest(r: any): string { function formatScopeRules (line 116) | function formatScopeRules(r: any): string { function formatListSitemap (line 140) | function formatListSitemap(r: any): string { function formatViewSitemapEntry (line 164) | function formatViewSitemapEntry(r: any): string { function formatProxyOutput (line 199) | function formatProxyOutput(toolName: string, result: any): string { FILE: app/components/tools/SummarizationHandler.tsx type SummarizationHandlerProps (line 6) | interface SummarizationHandlerProps { function areSummarizationPropsEqual (line 13) | function areSummarizationPropsEqual( FILE: app/components/tools/TerminalToolHandler.tsx type TerminalToolHandlerProps (line 17) | interface TerminalToolHandlerProps { function areTerminalPropsEqual (line 26) | function areTerminalPropsEqual( FILE: app/components/tools/TodoToolHandler.tsx type TodoToolHandlerProps (line 9) | interface TodoToolHandlerProps { function areTodoPropsEqual (line 16) | function areTodoPropsEqual( FILE: app/components/tools/WebToolHandler.tsx type WebSearchInput (line 9) | interface WebSearchInput { type OpenUrlInput (line 14) | interface OpenUrlInput { type LegacyWebInput (line 20) | interface LegacyWebInput { type WebToolHandlerProps (line 27) | interface WebToolHandlerProps { function areWebPropsEqual (line 41) | function areWebPropsEqual( FILE: app/components/tools/notes-tool-utils.tsx type NotesToolName (line 3) | type NotesToolName = type NotesActionType (line 9) | type NotesActionType = "create" | "list" | "update" | "delete"; FILE: app/components/tools/shell-tool-utils.ts type ShellAction (line 14) | type ShellAction = "exec" | "view" | "wait" | "send" | "kill"; type ShellToolInput (line 16) | interface ShellToolInput { type ShellToolOutput (line 25) | interface ShellToolOutput { function isInteractiveShellAction (line 45) | function isInteractiveShellAction(action?: string): boolean { constant LABELS (line 58) | const LABELS: Record = { function getShellActionLabel (line 66) | function getShellActionLabel(opts: { function getShellDisplayCommand (line 107) | function getShellDisplayCommand( function formatSendInput (line 126) | function formatSendInput(raw: string): string { function getShellDisplayTarget (line 194) | function getShellDisplayTarget( type DataTerminalPart (line 211) | interface DataTerminalPart { function isDataTerminalPart (line 216) | function isDataTerminalPart(part: unknown): part is DataTerminalPart { function getStreamingTerminalOutput (line 224) | function getStreamingTerminalOutput( function getShellOutput (line 242) | function getShellOutput( type ComputeShellBlockArgs (line 273) | interface ComputeShellBlockArgs { type ShellBlockComputed (line 291) | interface ShellBlockComputed { function computeShellTerminalBlock (line 300) | function computeShellTerminalBlock( FILE: app/components/usage/IncludedUsageCard.tsx type UsageLimitStatus (line 15) | type UsageLimitStatus = { type TokenUsageStatus (line 23) | type TokenUsageStatus = { constant POINTS_PER_DOLLAR (line 28) | const POINTS_PER_DOLLAR = 10_000; type IncludedUsageCardProps (line 68) | interface IncludedUsageCardProps { FILE: app/components/usage/OnDemandUsageCard.tsx type OnDemandUsageCardProps (line 9) | interface OnDemandUsageCardProps { FILE: app/components/usage/TokenBreakdownTooltip.tsx type TokenBreakdownTooltipProps (line 9) | interface TokenBreakdownTooltipProps { FILE: app/components/usage/UsageLogsTable.tsx type Preset (line 17) | type Preset = "1d" | "7d" | "30d" | "custom"; constant PRESET_OPTIONS (line 19) | const PRESET_OPTIONS: { value: Exclude; label: string ... constant INITIAL_NUM_ITEMS (line 25) | const INITIAL_NUM_ITEMS = 100; FILE: app/components/worked-for-parts.ts type MessagePart (line 4) | type MessagePart = ChatMessage["parts"][number]; constant TRAILING_METADATA_PART_TYPES (line 6) | const TRAILING_METADATA_PART_TYPES = new Set([ type WorkedForParts (line 21) | type WorkedForParts = { function splitWorkedForParts (line 33) | function splitWorkedForParts( FILE: app/contexts/FileUrlCacheContext.tsx type FileUrlCacheContextValue (line 3) | interface FileUrlCacheContextValue { function FileUrlCacheProvider (line 12) | function FileUrlCacheProvider({ function useFileUrlCacheContext (line 35) | function useFileUrlCacheContext() { FILE: app/contexts/GlobalState.tsx type GlobalStateType (line 51) | interface GlobalStateType { type GlobalStateProviderProps (line 166) | interface GlobalStateProviderProps { FILE: app/contexts/TodoBlockContext.tsx type TodoBlockContextType (line 6) | interface TodoBlockContextType { type TodoBlockProviderProps (line 16) | interface TodoBlockProviderProps { FILE: app/desktop-callback/route.ts function getCookieMaxAge (line 4) | function getCookieMaxAge(): number { function escapeHtml (line 15) | function escapeHtml(str: string): string { function isValidLocalPath (line 24) | function isValidLocalPath(path: string | undefined): path is string { function renderErrorPage (line 33) | function renderErrorPage( function GET (line 110) | async function GET(request: Request) { FILE: app/desktop-login/route.ts function GET (line 6) | async function GET(request: Request) { FILE: app/download/DownloadPageContent.tsx function AuthenticatedHeader (line 13) | function AuthenticatedHeader() { function DownloadContent (line 39) | function DownloadContent() { function DownloadPageContent (line 110) | function DownloadPageContent() { function DownloadCard (line 125) | function DownloadCard({ FILE: app/download/DownloadSection.tsx type Platform (line 16) | type Platform = "macos" | "windows" | "linux" | "ios" | "android" | "unk... type LinuxArch (line 17) | type LinuxArch = "x64" | "arm64"; type DetectedPlatform (line 19) | interface DetectedPlatform { function detectPlatform (line 26) | function detectPlatform(): DetectedPlatform { function getClientSnapshot (line 107) | function getClientSnapshot(): DetectedPlatform { function getServerSnapshot (line 114) | function getServerSnapshot(): DetectedPlatform | null { function subscribe (line 118) | function subscribe() { function useDetectedPlatform (line 122) | function useDetectedPlatform(): DetectedPlatform | null { function DownloadSection (line 126) | function DownloadSection() { type BeforeInstallPromptEvent (line 163) | type BeforeInstallPromptEvent = Event & { function MobileInstallCard (line 168) | function MobileInstallCard({ detected }: { detected: DetectedPlatform }) { function InstallInstructions (line 266) | function InstallInstructions({ platform }: { platform: Platform }) { function StepsList (line 305) | function StepsList({ steps }: { steps: React.ReactNode[] }) { function PlatformIcon (line 320) | function PlatformIcon({ platform }: { platform: Platform }) { function MobilePlatformIcon (line 335) | function MobilePlatformIcon({ platform }: { platform: Platform }) { FILE: app/download/constants.ts constant GITHUB_RELEASE_BASE (line 1) | const GITHUB_RELEASE_BASE = FILE: app/download/icons/AndroidIcon.tsx function AndroidIcon (line 1) | function AndroidIcon({ className }: { className?: string }) { FILE: app/download/icons/AppleIcon.tsx function AppleIcon (line 1) | function AppleIcon({ className }: { className?: string }) { FILE: app/download/icons/DeviceIcon.tsx function DeviceIcon (line 1) | function DeviceIcon({ className }: { className?: string }) { FILE: app/download/icons/DownloadIcon.tsx function DownloadIcon (line 1) | function DownloadIcon({ className }: { className?: string }) { FILE: app/download/icons/LinuxIcon.tsx function LinuxIcon (line 1) | function LinuxIcon({ className }: { className?: string }) { FILE: app/download/icons/WindowsIcon.tsx function WindowsIcon (line 1) | function WindowsIcon({ className }: { className?: string }) { FILE: app/download/page.tsx function DownloadPage (line 22) | function DownloadPage() { FILE: app/hooks/__tests__/useAutoContinue.test.ts type DataStreamEntry (line 11) | type DataStreamEntry = { type: string; data?: unknown }; function useTestHarness (line 13) | function useTestHarness(params: UseAutoContinueParams) { function createWrapper (line 19) | function createWrapper() { function buildParams (line 25) | function buildParams( function pushAutoContinue (line 41) | function pushAutoContinue( FILE: app/hooks/__tests__/useToolSidebar.test.tsx function ToolSidebarHarness (line 39) | function ToolSidebarHarness() { FILE: app/hooks/useAutoContinue.ts constant MAX_AUTO_CONTINUES (line 11) | const MAX_AUTO_CONTINUES = 5; type UseAutoContinueParams (line 13) | interface UseAutoContinueParams { function useAutoContinue (line 27) | function useAutoContinue({ FILE: app/hooks/useAutoResume.ts type UseAutoResumeParams (line 11) | interface UseAutoResumeParams { function useAutoResume (line 23) | function useAutoResume({ FILE: app/hooks/useChatHandlers.ts type UseChatHandlersProps (line 29) | interface UseChatHandlersProps { FILE: app/hooks/useDocumentDragAndDrop.ts type DragHandler (line 3) | type DragHandler = (e: DragEvent) => void; FILE: app/hooks/useFeedback.ts type UseFeedbackProps (line 8) | interface UseFeedbackProps { FILE: app/hooks/useFileUpload.ts constant RATE_LIMIT_WARNING_THRESHOLD (line 32) | const RATE_LIMIT_WARNING_THRESHOLD = 10; FILE: app/hooks/useFileUrlCache.ts type CachedUrl (line 8) | interface CachedUrl { constant URL_CACHE_EXPIRATION (line 13) | const URL_CACHE_EXPIRATION = 50 * 60 * 1000; constant MAX_BATCH_SIZE (line 14) | const MAX_BATCH_SIZE = 50; function useFileUrlCache (line 25) | function useFileUrlCache(messages: ChatMessage[]) { FILE: app/hooks/usePentestgptMigration.ts type UsePentestgptMigration (line 7) | type UsePentestgptMigration = { FILE: app/hooks/useSandboxPreference.ts type SandboxPreferenceState (line 10) | interface SandboxPreferenceState { function useSandboxPreference (line 20) | function useSandboxPreference( FILE: app/hooks/useSidebarNavigation.ts type UseSidebarNavigationProps (line 15) | interface UseSidebarNavigationProps { FILE: app/hooks/useTauri.ts type Window (line 7) | interface Window { function detectTauri (line 12) | function detectTauri(): boolean { function isTauriEnvironment (line 18) | function isTauriEnvironment(): boolean { function useTauri (line 22) | function useTauri(): { isTauri: boolean } { function openInBrowser (line 27) | async function openInBrowser(url: string): Promise { type AuthFallbackPath (line 42) | type AuthFallbackPath = type NavigateToAuthOptions (line 48) | type NavigateToAuthOptions = { function resolveAuthPath (line 52) | function resolveAuthPath( function navigateToAuth (line 69) | async function navigateToAuth( function getCmdServerInfo (line 115) | async function getCmdServerInfo(): Promise<{ type LocalFileMetadata (line 138) | type LocalFileMetadata = { type LocalFileData (line 146) | type LocalFileData = LocalFileMetadata & { function pickLocalFiles (line 150) | async function pickLocalFiles(): Promise { function getLocalFileMetadata (line 168) | async function getLocalFileMetadata( function readLocalFile (line 185) | async function readLocalFile( function revealFileInDir (line 205) | async function revealFileInDir(path: string): Promise { function saveFileToLocal (line 226) | async function saveFileToLocal( function openDownloadsFolder (line 286) | async function openDownloadsFolder(): Promise { FILE: app/hooks/useToolSidebar.ts type UseToolSidebarOptions (line 5) | interface UseToolSidebarOptions { type UseToolSidebarResult (line 19) | interface UseToolSidebarResult { function useToolSidebar (line 34) | function useToolSidebar({ FILE: app/hooks/useTypingAnimation.ts type UseTypingAnimationOptions (line 5) | interface UseTypingAnimationOptions { constant PAUSE_AFTER_CHAR (line 19) | const PAUSE_AFTER_CHAR: Record = { function jitter (line 29) | function jitter(ms: number, variance: number): number { function subscribeReducedMotion (line 35) | function subscribeReducedMotion(callback: () => void): () => void { function getReducedMotionSnapshot (line 41) | function getReducedMotionSnapshot(): boolean { function getReducedMotionServerSnapshot (line 45) | function getReducedMotionServerSnapshot(): boolean { function useTypingAnimation (line 49) | function useTypingAnimation({ FILE: app/layout.tsx constant APP_NAME (line 23) | const APP_NAME = "HackerAI"; constant APP_DEFAULT_TITLE (line 24) | const APP_DEFAULT_TITLE = "HackerAI - AI-Powered Penetration Testing Ass... constant APP_TITLE_TEMPLATE (line 25) | const APP_TITLE_TEMPLATE = "%s | HackerAI"; constant APP_DESCRIPTION (line 26) | const APP_DESCRIPTION = function RootLayout (line 91) | function RootLayout({ FILE: app/login/route.ts function GET (line 4) | async function GET(request: Request) { FILE: app/posthog.js function PostHogClient (line 3) | function PostHogClient() { FILE: app/privacy-policy/page.tsx function PrivacyPolicyPage (line 23) | function PrivacyPolicyPage() { FILE: app/providers.tsx function PostHogProvider (line 8) | function PostHogProvider({ children }: { children: React.ReactNode }) { FILE: app/services/__tests__/desktop-sandbox-bridge.test.ts function createTestJwt (line 50) | function createTestJwt(sub: string): string { function buildConfig (line 56) | function buildConfig(overrides: Record = {}) { function getPublicationHandler (line 71) | function getPublicationHandler(): (ctx: { data: unknown }) => void { function startBridgeAndForwardChunks (line 249) | async function startBridgeAndForwardChunks( FILE: app/services/desktop-sandbox-bridge.ts type RefreshTokenResult (line 18) | type RefreshTokenResult = type StreamChunk (line 42) | interface StreamChunk { function isUnauthenticatedError (line 52) | function isUnauthenticatedError(error: unknown): boolean { type DesktopBridgeConfig (line 59) | interface DesktopBridgeConfig { class DesktopSandboxBridge (line 81) | class DesktopSandboxBridge { method constructor (line 88) | constructor(config: DesktopBridgeConfig) { method getConnectionId (line 92) | getConnectionId(): string | null { method terminateClient (line 96) | private terminateClient(): void { method start (line 107) | async start(): Promise { method extractUserIdFromToken (line 250) | private extractUserIdFromToken(token: string): string { method getOsInfo (line 262) | private async getOsInfo(): Promise< method handleCommand (line 331) | private async handleCommand(command: CommandMessage): Promise { method handleCommandCancel (line 372) | private async handleCommandCancel( method forwardChunk (line 382) | private async forwardChunk( method publishResult (line 441) | private async publishResult(message: SandboxMessage): Promise { method handlePtyCreate (line 455) | private async handlePtyCreate(msg: PtyCreateMessage): Promise { method handlePtyInput (line 577) | private async handlePtyInput(msg: PtyInputMessage): Promise { method handlePtyResize (line 598) | private async handlePtyResize(msg: PtyResizeMessage): Promise { method handlePtyKill (line 611) | private async handlePtyKill(msg: PtyKillMessage): Promise { method stop (line 635) | async stop(): Promise { FILE: app/share/[shareId]/SharedChatContext.tsx type SharedChatContextType (line 6) | interface SharedChatContextType { FILE: app/share/[shareId]/SharedChatView.tsx function SharedComputerSidebarDesktop (line 22) | function SharedComputerSidebarDesktop({ messages }: { messages: any[] }) { function SharedComputerSidebarMobile (line 46) | function SharedComputerSidebarMobile({ messages }: { messages: any[] }) { type SharedChatViewProps (line 67) | interface SharedChatViewProps { constant UUID_REGEX (line 72) | const UUID_REGEX = function SharedChatView (line 75) | function SharedChatView({ shareId }: SharedChatViewProps) { FILE: app/share/[shareId]/SharedMessages.tsx type MessagePart (line 6) | interface MessagePart { type Message (line 17) | interface Message { type SharedMessagesProps (line 25) | interface SharedMessagesProps { function SharedMessages (line 30) | function SharedMessages({ messages, shareDate }: SharedMessagesProps) { FILE: app/share/[shareId]/components/SharedMessagePartHandler.tsx type MessagePart (line 44) | interface MessagePart { type SharedMessagePartHandlerProps (line 55) | interface SharedMessagePartHandlerProps { function renderTerminalTool (line 186) | function renderTerminalTool( function renderLegacyFileTool (line 248) | function renderLegacyFileTool( function renderFileTool (line 371) | function renderFileTool( function renderWebSearchTool (line 502) | function renderWebSearchTool(part: MessagePart, idx: number) { function renderOpenUrlTool (line 548) | function renderOpenUrlTool(part: MessagePart, idx: number) { function renderGetTerminalFilesTool (line 579) | function renderGetTerminalFilesTool(part: MessagePart, idx: number) { function renderTodoTool (line 623) | function renderTodoTool(part: MessagePart, idx: number) { function renderProxyTool (line 673) | function renderProxyTool( function renderReasoningPart (line 773) | function renderReasoningPart(parts: MessagePart[], partIndex: number) { function renderSummarizationPart (line 810) | function renderSummarizationPart(part: MessagePart, idx: number) { function renderHttpRequestTool (line 825) | function renderHttpRequestTool( function renderNotesTool (line 887) | function renderNotesTool( FILE: app/share/[shareId]/components/SharedTodoBlock.tsx type SharedTodoBlockProps (line 9) | interface SharedTodoBlockProps { FILE: app/share/[shareId]/page.tsx type Props (line 4) | type Props = { function generateMetadata (line 8) | async function generateMetadata({ params }: Props): Promise { function SharedChatPage (line 18) | async function SharedChatPage({ params }: Props) { FILE: app/signup/route.ts function GET (line 4) | async function GET(request: Request) { FILE: app/terms-of-service/page.tsx function TermsOfServicePage (line 20) | function TermsOfServicePage() { FILE: components/ConvexClientProvider.tsx function ConvexClientProvider (line 11) | function ConvexClientProvider({ children }: { children: ReactNode }) { FILE: components/ai-elements/__tests__/worked-for.test.tsx function renderScrollableWorkedFor (line 10) | function renderScrollableWorkedFor({ FILE: components/ai-elements/reasoning.tsx type ReasoningContextValue (line 14) | type ReasoningContextValue = { type ReasoningProps (line 30) | type ReasoningProps = ComponentProps & { function Reasoning (line 34) | function Reasoning({ type ReasoningTriggerProps (line 75) | type ReasoningTriggerProps = ComponentProps< function ReasoningTrigger (line 84) | function ReasoningTrigger({ type ReasoningContentProps (line 119) | type ReasoningContentProps = ComponentProps; function ReasoningContent (line 121) | function ReasoningContent({ FILE: components/ai-elements/shimmer.tsx type TextShimmerProps (line 12) | interface TextShimmerProps { FILE: components/ai-elements/worked-for.tsx function formatDuration (line 23) | function formatDuration(ms: number): string { type WorkedForContextValue (line 35) | type WorkedForContextValue = { type WorkedForProps (line 52) | type WorkedForProps = ComponentProps & { type ScrollSnapshot (line 57) | type ScrollSnapshot = { constant AUTO_COLLAPSE_DELAY_MS (line 84) | const AUTO_COLLAPSE_DELAY_MS = 700; constant SCROLL_RESTORE_MS (line 85) | const SCROLL_RESTORE_MS = 450; constant BOTTOM_SCROLL_RESTORE_MS (line 86) | const BOTTOM_SCROLL_RESTORE_MS = 1_100; constant BOTTOM_SCROLL_THRESHOLD_PX (line 89) | const BOTTOM_SCROLL_THRESHOLD_PX = 96; function WorkedFor (line 101) | function WorkedFor({ type WorkedForTriggerProps (line 247) | type WorkedForTriggerProps = ComponentProps< function WorkedForTrigger (line 256) | function WorkedForTrigger({ type WorkedForContentProps (line 363) | type WorkedForContentProps = Omit< function WorkedForContent (line 371) | function WorkedForContent({ FILE: components/icons/hackerai-svg.tsx type HackerAISVGProps (line 3) | interface HackerAISVGProps { FILE: components/ui/alert-dialog.tsx function AlertDialog (line 9) | function AlertDialog({ function AlertDialogTrigger (line 15) | function AlertDialogTrigger({ function AlertDialogPortal (line 23) | function AlertDialogPortal({ function AlertDialogOverlay (line 31) | function AlertDialogOverlay({ function AlertDialogContent (line 47) | function AlertDialogContent({ function AlertDialogHeader (line 66) | function AlertDialogHeader({ function AlertDialogFooter (line 79) | function AlertDialogFooter({ function AlertDialogTitle (line 95) | function AlertDialogTitle({ function AlertDialogDescription (line 108) | function AlertDialogDescription({ function AlertDialogAction (line 121) | function AlertDialogAction({ function AlertDialogCancel (line 133) | function AlertDialogCancel({ FILE: components/ui/avatar.tsx function Avatar (line 8) | function Avatar({ function AvatarImage (line 24) | function AvatarImage({ function AvatarFallback (line 37) | function AvatarFallback({ FILE: components/ui/badge.tsx type BadgeProps (line 26) | interface BadgeProps function Badge (line 31) | function Badge({ className, variant, ...props }: BadgeProps) { FILE: components/ui/button.tsx function Button (line 42) | function Button({ FILE: components/ui/calendar.tsx function Calendar (line 18) | function Calendar({ function CalendarDayButton (line 182) | function CalendarDayButton({ FILE: components/ui/card.tsx function Card (line 5) | function Card({ className, ...props }: React.ComponentProps<"div">) { function CardHeader (line 18) | function CardHeader({ className, ...props }: React.ComponentProps<"div">) { function CardTitle (line 31) | function CardTitle({ className, ...props }: React.ComponentProps<"div">) { function CardDescription (line 41) | function CardDescription({ className, ...props }: React.ComponentProps<"... function CardAction (line 51) | function CardAction({ className, ...props }: React.ComponentProps<"div">) { function CardContent (line 64) | function CardContent({ className, ...props }: React.ComponentProps<"div"... function CardFooter (line 74) | function CardFooter({ className, ...props }: React.ComponentProps<"div">) { FILE: components/ui/code-action-buttons.tsx type CodeActionButtonsProps (line 11) | interface CodeActionButtonsProps { FILE: components/ui/collapsible.tsx function Collapsible (line 5) | function Collapsible({ function CollapsibleTrigger (line 11) | function CollapsibleTrigger({ function CollapsibleContent (line 22) | function CollapsibleContent({ FILE: components/ui/dialog.tsx function Dialog (line 9) | function Dialog({ function DialogTrigger (line 15) | function DialogTrigger({ function DialogPortal (line 21) | function DialogPortal({ function DialogClose (line 27) | function DialogClose({ function DialogOverlay (line 33) | function DialogOverlay({ function DialogContent (line 49) | function DialogContent({ function DialogHeader (line 83) | function DialogHeader({ className, ...props }: React.ComponentProps<"div... function DialogFooter (line 93) | function DialogFooter({ className, ...props }: React.ComponentProps<"div... function DialogTitle (line 106) | function DialogTitle({ function DialogDescription (line 119) | function DialogDescription({ FILE: components/ui/dots-spinner.tsx type DotsSpinnerProps (line 4) | interface DotsSpinnerProps extends HTMLAttributes { FILE: components/ui/dropdown-menu.tsx function DropdownMenu (line 9) | function DropdownMenu({ function DropdownMenuPortal (line 15) | function DropdownMenuPortal({ function DropdownMenuTrigger (line 23) | function DropdownMenuTrigger({ function DropdownMenuContent (line 34) | function DropdownMenuContent({ function DropdownMenuGroup (line 54) | function DropdownMenuGroup({ function DropdownMenuItem (line 62) | function DropdownMenuItem({ function DropdownMenuCheckboxItem (line 85) | function DropdownMenuCheckboxItem({ function DropdownMenuRadioGroup (line 111) | function DropdownMenuRadioGroup({ function DropdownMenuRadioItem (line 122) | function DropdownMenuRadioItem({ function DropdownMenuLabel (line 146) | function DropdownMenuLabel({ function DropdownMenuSeparator (line 166) | function DropdownMenuSeparator({ function DropdownMenuShortcut (line 179) | function DropdownMenuShortcut({ function DropdownMenuSub (line 195) | function DropdownMenuSub({ function DropdownMenuSubTrigger (line 201) | function DropdownMenuSubTrigger({ function DropdownMenuSubContent (line 225) | function DropdownMenuSubContent({ FILE: components/ui/input.tsx function Input (line 5) | function Input({ className, type, ...props }: React.ComponentProps<"inpu... FILE: components/ui/loading.tsx type LoadingProps (line 3) | interface LoadingProps { function Loading (line 7) | function Loading({ size = 12 }: LoadingProps): JSX.Element { FILE: components/ui/popover.tsx function Popover (line 8) | function Popover({ function PopoverTrigger (line 14) | function PopoverTrigger({ function PopoverContent (line 20) | function PopoverContent({ function PopoverAnchor (line 42) | function PopoverAnchor({ FILE: components/ui/radio-group.tsx function RadioGroup (line 9) | function RadioGroup({ function RadioGroupItem (line 22) | function RadioGroupItem({ FILE: components/ui/separator.tsx function Separator (line 8) | function Separator({ FILE: components/ui/shared-todo-item.tsx type TodoDisplayStatus (line 11) | type TodoDisplayStatus = Todo["status"] | "paused"; constant STATUS_ICONS (line 13) | const STATUS_ICONS = { FILE: components/ui/sheet.tsx function Sheet (line 9) | function Sheet({ ...props }: React.ComponentProps) { function SidebarMenuItem (line 515) | function SidebarMenuItem({ className, ...props }: React.ComponentProps<"... function SidebarMenuButton (line 548) | function SidebarMenuButton({ function SidebarMenuAction (line 598) | function SidebarMenuAction({ function SidebarMenuBadge (line 630) | function SidebarMenuBadge({ function SidebarMenuSkeleton (line 652) | function SidebarMenuSkeleton({ function SidebarMenuSub (line 692) | function SidebarMenuSub({ className, ...props }: React.ComponentProps<"u... function SidebarMenuSubItem (line 707) | function SidebarMenuSubItem({ function SidebarMenuSubButton (line 721) | function SidebarMenuSubButton({ FILE: components/ui/skeleton.tsx function Skeleton (line 3) | function Skeleton({ className, ...props }: React.ComponentProps<"div">) { FILE: components/ui/sonner.tsx type ToasterProps (line 7) | type ToasterProps = React.ComponentProps; FILE: components/ui/switch.tsx function Switch (line 8) | function Switch({ FILE: components/ui/textarea.tsx function Textarea (line 5) | function Textarea({ className, ...props }: React.ComponentProps<"textare... FILE: components/ui/tool-block.tsx type ToolBlockProps (line 4) | interface ToolBlockProps { FILE: components/ui/tooltip.tsx function TooltipProvider (line 8) | function TooltipProvider({ function Tooltip (line 21) | function Tooltip({ function TooltipTrigger (line 31) | function TooltipTrigger({ function TooltipContent (line 37) | function TooltipContent({ FILE: components/ui/with-tooltip.tsx type WithTooltipProps (line 9) | interface WithTooltipProps { FILE: convex/__tests__/chatSummaryFallback.test.ts method constructor (line 26) | constructor(data: any) { constant SERVICE_KEY (line 48) | const SERVICE_KEY = "test-service-key"; constant CHAT_ID (line 59) | const CHAT_ID = "chat-001"; constant USER_ID (line 60) | const USER_ID = "user-123"; constant CHAT_DOC_ID (line 61) | const CHAT_DOC_ID = "chat-doc-id" as Id<"chats">; constant SUMMARY_DOC_ID (line 62) | const SUMMARY_DOC_ID = "summary-doc-id" as Id<"chat_summaries">; function makeSummaryDoc (line 64) | function makeSummaryDoc( function makeChatDoc (line 77) | function makeChatDoc(overrides: Record = {}): Record | null): void { function makeAssistantMessage (line 247) | function makeAssistantMessage( function setupDbQueryChain (line 299) | function setupDbQueryChain(config: { FILE: convex/__tests__/fileStorage.aggregate.test.ts method constructor (line 25) | constructor(data: unknown) { FILE: convex/__tests__/fileStorage.delete.test.ts method constructor (line 25) | constructor(data: any) { FILE: convex/__tests__/messages.hidden.test.ts method constructor (line 26) | constructor(data: any) { constant SERVICE_KEY (line 55) | const SERVICE_KEY = "test-service-key"; constant CHAT_ID (line 58) | const CHAT_ID = "chat-001"; constant USER_ID (line 59) | const USER_ID = "user-123"; function makeMessage (line 61) | function makeMessage(overrides: Record = {}): Record | null): void { function setupPaginatedMessages (line 194) | function setupPaginatedMessages(messages: Record[]): void { function setupPaginatedMessages (line 288) | function setupPaginatedMessages(messages: Record[]): void { FILE: convex/__tests__/teamExtraUsage.test.ts constant SERVICE_KEY (line 44) | const SERVICE_KEY = "test-service-key"; constant ORIGINAL_SERVICE_KEY (line 45) | const ORIGINAL_SERVICE_KEY = process.env.CONVEX_SERVICE_ROLE_KEY; constant ORG_ID (line 57) | const ORG_ID = "org_123"; constant USER_ID (line 58) | const USER_ID = "user_abc"; constant OTHER_USER_ID (line 59) | const OTHER_USER_ID = "user_xyz"; constant POINTS_PER_DOLLAR (line 61) | const POINTS_PER_DOLLAR = 10_000; type TeamRow (line 63) | type TeamRow = { type MemberRow (line 82) | type MemberRow = { type WebhookRow (line 93) | type WebhookRow = { function makeMockCtx (line 106) | function makeMockCtx(opts?: { function callDeduct (line 198) | async function callDeduct( function callRefund (line 209) | async function callRefund( function callAddCredits (line 220) | async function callAddCredits( function callGetState (line 236) | async function callGetState( FILE: convex/__tests__/userSuspensions.test.ts constant SERVICE_KEY (line 29) | const SERVICE_KEY = "test-service-key"; type SuspensionRow (line 31) | type SuspensionRow = { function makeMockCtx (line 52) | function makeMockCtx(initialRows: SuspensionRow[] = []) { FILE: convex/__tests__/webhookClaim.test.ts method constructor (line 32) | constructor(data: any) { constant SERVICE_KEY (line 50) | const SERVICE_KEY = "test-service-key"; constant STALE_CLAIM_MS (line 53) | const STALE_CLAIM_MS = 10 * 60 * 1000; constant EVENT_ID (line 54) | const EVENT_ID = "evt_test_123"; type Row (line 56) | type Row = { function makeMockCtx (line 64) | function makeMockCtx(initialRows: Row[] = []) { function callClaim (line 111) | async function callClaim(ctx: any) { function callFinalize (line 119) | async function callFinalize(ctx: any) { FILE: convex/_generated/dataModel.d.ts type TableNames (line 23) | type TableNames = TableNamesInDataModel; type Doc (line 30) | type Doc = DocumentByName< type Id (line 48) | type Id = type DataModel (line 60) | type DataModel = DataModelFromSchemaDefinition; FILE: convex/_generated/server.d.ts type QueryCtx (line 107) | type QueryCtx = GenericQueryCtx; type MutationCtx (line 115) | type MutationCtx = GenericMutationCtx; type ActionCtx (line 123) | type ActionCtx = GenericActionCtx; type DatabaseReader (line 132) | type DatabaseReader = GenericDatabaseReader; type DatabaseWriter (line 143) | type DatabaseWriter = GenericDatabaseWriter; FILE: convex/constants.ts constant MAX_PREVIOUS_SUMMARIES (line 1) | const MAX_PREVIOUS_SUMMARIES = 10; FILE: convex/extraUsage.ts constant POINTS_PER_DOLLAR (line 14) | const POINTS_PER_DOLLAR = 10_000; constant TRUST_TIERS (line 36) | const TRUST_TIERS = [ constant DEFAULT_TRUST_CAP_DOLLARS (line 42) | const DEFAULT_TRUST_CAP_DOLLARS = 100; constant DAYS_MS (line 44) | const DAYS_MS = 24 * 60 * 60 * 1000; type TrustReason (line 46) | type TrustReason = function computeExtraUsageCap (line 55) | function computeExtraUsageCap(settings: { constant STALE_CLAIM_MS (line 172) | const STALE_CLAIM_MS = 10 * 60 * 1000; constant MAX_AUTO_RELOAD_FAILURES (line 841) | const MAX_AUTO_RELOAD_FAILURES = 2; FILE: convex/extraUsageActions.ts function getStripe (line 17) | function getStripe(): Stripe { function getWorkOS (line 26) | function getWorkOS(): WorkOS { function getStripeCustomerId (line 41) | async function getStripeCustomerId(userId: string): Promise | null; FILE: convex/s3Utils.ts function getRequiredEnvVar (line 17) | function getRequiredEnvVar(name: string): string { function getS3Client (line 28) | function getS3Client(): S3Client { function generateS3Key (line 47) | function generateS3Key(userId: string, fileName: string): string { function generateS3UploadUrl (line 61) | async function generateS3UploadUrl( function generateS3DownloadUrl (line 94) | async function generateS3DownloadUrl(s3Key: string): Promise { function deleteS3Object (line 121) | async function deleteS3Object(s3Key: string): Promise { FILE: convex/teamExtraUsage.ts constant POINTS_PER_DOLLAR (line 17) | const POINTS_PER_DOLLAR = 10_000; function ensureTeamRow (line 32) | async function ensureTeamRow(ctx: MutationCtx, organizationId: string) { function ensureMemberRow (line 50) | async function ensureMemberRow( function currentMonthString (line 74) | function currentMonthString(): string { constant MAX_AUTO_RELOAD_FAILURES (line 735) | const MAX_AUTO_RELOAD_FAILURES = 2; FILE: convex/teamExtraUsageActions.ts function getStripe (line 17) | function getStripe(): Stripe { function getWorkOS (line 26) | function getWorkOS(): WorkOS { function getOrgStripeCustomerId (line 41) | async function getOrgStripeCustomerId( function getDefaultPaymentMethodId (line 50) | async function getDefaultPaymentMethodId( function createAutoReloadInvoice (line 74) | async function createAutoReloadInvoice( FILE: e2b/build.dev.ts function main (line 8) | async function main() { FILE: e2b/build.prod.ts function main (line 8) | async function main() { FILE: e2e/chat-pinned.spec.ts constant SHARED_CHAT_NAMES (line 7) | const SHARED_CHAT_NAMES = [ function unpinAllChats (line 72) | async function unpinAllChats( function waitForChatsToAppear (line 113) | async function waitForChatsToAppear(page: Page): Promise { function getOrderedChatTitles (line 123) | async function getOrderedChatTitles( function getOrderedChatUrls (line 141) | async function getOrderedChatUrls( FILE: e2e/constants.ts constant TIMEOUTS (line 6) | const TIMEOUTS = { constant TEST_DATA (line 24) | const TEST_DATA = { FILE: e2e/fixtures/auth.ts type TestUser (line 10) | type TestUser = TestUserFromConfig; constant TEST_USERS (line 12) | const TEST_USERS = getTestUsersRecord(); type SessionCache (line 14) | interface SessionCache { constant SESSION_CACHE_DURATION (line 29) | const SESSION_CACHE_DURATION = 5 * 60 * 1000; constant AUTH_STORAGE_PATHS (line 32) | const AUTH_STORAGE_PATHS = { function getStorageStatePath (line 38) | function getStorageStatePath(user: TestUser): string { type PlaywrightStorageState (line 42) | interface PlaywrightStorageState { function tryLoadFromStorageStateFile (line 59) | async function tryLoadFromStorageStateFile( function isSessionValid (line 71) | function isSessionValid(cache: SessionCache): boolean { type AuthOptions (line 82) | interface AuthOptions { function authenticateUser (line 88) | async function authenticateUser( function performLogin (line 180) | async function performLogin(page: Page, user: TestUser): Promise { function logout (line 224) | async function logout(page: Page): Promise { function clearAuthCache (line 244) | async function clearAuthCache(): Promise { function getAuthState (line 248) | async function getAuthState(context: BrowserContext): Promise<{ FILE: e2e/helpers/convex-helpers.ts function loadEnv (line 8) | function loadEnv(): void { function getConvexEnv (line 13) | function getConvexEnv(): { convexUrl: string; serviceKey: string } | null { function getProUserId (line 24) | async function getProUserId(): Promise { function deleteTestUserChats (line 45) | async function deleteTestUserChats(): Promise { function createManyTestChatsForProUser (line 65) | async function createManyTestChatsForProUser( FILE: e2e/helpers/mock-handlers.ts type MockConfig (line 10) | interface MockConfig { function setupMocks (line 17) | async function setupMocks( function mockWorkOSLogin (line 55) | async function mockWorkOSLogin( function clearMocks (line 84) | async function clearMocks(page: Page): Promise { FILE: e2e/helpers/test-helpers.ts function sendAndWaitForResponse (line 14) | async function sendAndWaitForResponse( function attachTestFile (line 27) | async function attachTestFile( function setupChat (line 57) | async function setupChat(page: Page): Promise { function chatIdFromUrl (line 62) | function chatIdFromUrl(url: string): string { function createTwoChats (line 71) | async function createTwoChats( function sendMessageWithFileAndVerifyContent (line 110) | async function sendMessageWithFileAndVerifyContent( FILE: e2e/page-objects/BasePage.ts method constructor (line 4) | constructor(protected page: Page) {} method goto (line 6) | async goto(path: string = "/"): Promise { method reload (line 10) | async reload(): Promise { FILE: e2e/page-objects/ChatComponent.ts class ChatComponent (line 5) | class ChatComponent { method constructor (line 6) | constructor(private page: Page) {} method chatInput (line 8) | private get chatInput(): Locator { method sendButton (line 12) | private get sendButton(): Locator { method stopButton (line 16) | private get stopButton(): Locator { method attachButton (line 20) | private get attachButton(): Locator { method fileInput (line 24) | private get fileInput(): Locator { method messages (line 28) | private get messages(): Locator { method streamingIndicator (line 34) | private get streamingIndicator(): Locator { method modeDropdown (line 38) | private get modeDropdown(): Locator { method askModeOption (line 42) | private get askModeOption(): Locator { method agentModeOption (line 46) | private get agentModeOption(): Locator { method upgradeDialog (line 50) | private get upgradeDialog(): Locator { method upgradePopover (line 54) | private get upgradePopover(): Locator { method upgradeNowButton (line 58) | private get upgradeNowButton(): Locator { method upgradePlanButton (line 62) | private get upgradePlanButton(): Locator { method attachedFiles (line 66) | private get attachedFiles(): Locator { method removeFileButtons (line 70) | private get removeFileButtons(): Locator { method sendMessage (line 74) | async sendMessage(message: string): Promise { method typeMessage (line 80) | async typeMessage(message: string): Promise { method clickSend (line 84) | async clickSend(): Promise { method stopGeneration (line 88) | async stopGeneration(): Promise { method attachFile (line 92) | async attachFile(filePath: string): Promise { method attachFiles (line 100) | async attachFiles(filePaths: string[]): Promise { method waitForUploadComplete (line 107) | async waitForUploadComplete(fileName?: string): Promise { method clickAttachButton (line 125) | async clickAttachButton(): Promise { method removeAttachedFile (line 129) | async removeAttachedFile(index: number = 0): Promise { method switchToAgentMode (line 133) | async switchToAgentMode(): Promise { method switchToAskMode (line 138) | async switchToAskMode(): Promise { method waitForResponse (line 143) | async waitForResponse(timeout: number = TIMEOUTS.MEDIUM): Promise { method getMessageCount (line 157) | async getMessageCount( method getLastMessageText (line 168) | async getLastMessageText(timeout: number = TIMEOUTS.SHORT): Promise { method expectStreamingNotVisible (line 198) | async expectStreamingNotVisible( method expectUpgradeDialogVisible (line 213) | async expectUpgradeDialogVisible(): Promise { method expectUpgradePopoverVisible (line 217) | async expectUpgradePopoverVisible(): Promise { method expectUpgradeNowButtonVisible (line 221) | async expectUpgradeNowButtonVisible(): Promise { method expectUpgradePlanButtonVisible (line 227) | async expectUpgradePlanButtonVisible(): Promise { method clickUpgradeNow (line 233) | async clickUpgradeNow(): Promise { method clickUpgradePlan (line 237) | async clickUpgradePlan(): Promise { method expectImageAttached (line 241) | async expectImageAttached(fileName: string): Promise { method expectNonImageFileAttached (line 248) | async expectNonImageFileAttached(fileName: string): Promise { method expectFileAttached (line 255) | async expectFileAttached(fileName: string): Promise { method expectAttachedFileCount (line 265) | async expectAttachedFileCount(count: number): Promise { method expectChatInputVisible (line 271) | async expectChatInputVisible(): Promise { method expectSendButtonEnabled (line 275) | async expectSendButtonEnabled(): Promise { method expectSendButtonDisabled (line 279) | async expectSendButtonDisabled(): Promise { method getCurrentMode (line 283) | async getCurrentMode(): Promise { method expectMode (line 289) | async expectMode(mode: "ask" | "agent"): Promise { method getChatHeaderTitle (line 297) | async getChatHeaderTitle(timeout: number = TIMEOUTS.SHORT): Promise { method selectMode (line 29) | async selectMode(mode: ChatMode): Promise { method selectAskMode (line 41) | async selectAskMode(): Promise { method selectAgentMode (line 45) | async selectAgentMode(): Promise { method getCurrentMode (line 49) | async getCurrentMode(): Promise { method verifyCurrentMode (line 57) | async verifyCurrentMode(mode: ChatMode): Promise { method verifyModeSelectorVisible (line 62) | async verifyModeSelectorVisible(): Promise { method verifyAskModeSelected (line 66) | async verifyAskModeSelected(): Promise { method verifyAgentModeSelected (line 70) | async verifyAgentModeSelected(): Promise { method verifyAgentModeHasProBadge (line 74) | async verifyAgentModeHasProBadge(): Promise { method verifyModeDropdownContainsOptions (line 85) | async verifyModeDropdownContainsOptions(options: ChatMode[]): Promise<... FILE: e2e/page-objects/ChatPage.ts type ChatMode (line 8) | type ChatMode = "agent" | "ask"; class ChatPage (line 10) | class ChatPage extends BasePage { method constructor (line 20) | constructor(page: Page) { method sendMessage (line 33) | async sendMessage(message: string): Promise { method typeMessage (line 38) | async typeMessage(message: string): Promise { method clickSend (line 42) | async clickSend(): Promise { method sendMessageWithEnter (line 46) | async sendMessageWithEnter(message: string): Promise { method stopGeneration (line 51) | async stopGeneration(): Promise { method waitForResponse (line 55) | async waitForResponse(timeout: number = TIMEOUTS.MEDIUM): Promise { method getLastMessage (line 70) | async getLastMessage(timeout: number = TIMEOUTS.SHORT): Promise { method getLastAssistantMessage (line 78) | async getLastAssistantMessage( method getAllMessages (line 88) | async getAllMessages(): Promise { method verifyMessageVisible (line 99) | async verifyMessageVisible(text: string): Promise { method verifyAssistantMessageVisible (line 105) | async verifyAssistantMessageVisible(text: string): Promise { method verifySendButtonEnabled (line 111) | async verifySendButtonEnabled(): Promise { method verifySendButtonDisabled (line 115) | async verifySendButtonDisabled(): Promise { method verifyStopButtonVisible (line 119) | async verifyStopButtonVisible(): Promise { method verifyStopButtonNotVisible (line 123) | async verifyStopButtonNotVisible(): Promise { method clearInput (line 127) | async clearInput(): Promise { method getInputValue (line 131) | async getInputValue(): Promise { method switchMode (line 135) | async switchMode(mode: ChatMode): Promise { method getCurrentMode (line 139) | async getCurrentMode(): Promise { method verifyCurrentMode (line 143) | async verifyCurrentMode(mode: ChatMode): Promise { method attachFile (line 147) | async attachFile(filePath: string): Promise { method attachFiles (line 151) | async attachFiles(filePaths: string[]): Promise { method removeAttachedFile (line 155) | async removeAttachedFile(fileName: string): Promise { method expectImageAttached (line 159) | async expectImageAttached(fileName: string): Promise { method expectFileAttached (line 163) | async expectFileAttached(fileName: string): Promise { method verifyFileAttached (line 167) | async verifyFileAttached(fileName: string): Promise { method verifyNoFilesAttached (line 171) | async verifyNoFilesAttached(): Promise { method getAttachedFileCount (line 175) | async getAttachedFileCount(): Promise { FILE: e2e/page-objects/FileAttachment.ts class FileAttachment (line 4) | class FileAttachment { method constructor (line 10) | constructor(private page: Page) { method attachFile (line 21) | async attachFile(filePath: string): Promise { method attachFiles (line 28) | async attachFiles(filePaths: string[]): Promise { method clickAttachButton (line 39) | async clickAttachButton(): Promise { method removeFile (line 45) | async removeFile(fileName: string): Promise { method removeAllFiles (line 57) | async removeAllFiles(): Promise { method expectImageAttached (line 70) | async expectImageAttached(fileName: string): Promise { method expectFileAttached (line 79) | async expectFileAttached(fileName: string): Promise { method verifyFileAttached (line 90) | async verifyFileAttached(fileName: string): Promise { method verifyFileNotAttached (line 102) | async verifyFileNotAttached(fileName: string): Promise { method verifyNoFilesAttached (line 109) | async verifyNoFilesAttached(): Promise { method verifyFileUploading (line 113) | async verifyFileUploading(): Promise { method waitForUploadComplete (line 117) | async waitForUploadComplete(fileName?: string): Promise { method getAttachedFileCount (line 144) | async getAttachedFileCount(): Promise { method getAttachedFileNames (line 155) | async getAttachedFileNames(): Promise { method verifyFileHasError (line 170) | async verifyFileHasError(fileName: string): Promise { method verifyFilePreviewVisible (line 182) | async verifyFilePreviewVisible(): Promise { method verifyAttachButtonVisible (line 186) | async verifyAttachButtonVisible(): Promise { method verifyAttachButtonEnabled (line 190) | async verifyAttachButtonEnabled(): Promise { method verifyAttachButtonDisabled (line 194) | async verifyAttachButtonDisabled(): Promise { FILE: e2e/page-objects/HomePage.ts class HomePage (line 7) | class HomePage extends BasePage { method constructor (line 12) | constructor(page: Page) { method openSettingsDialog (line 19) | async openSettingsDialog(): Promise { method navigateToSettingsTab (line 24) | async navigateToSettingsTab(tab: SettingsTab): Promise { method verifySessionPersistence (line 29) | async verifySessionPersistence(): Promise { method verifyUpgradeButtonNotVisible (line 35) | async verifyUpgradeButtonNotVisible(): Promise { FILE: e2e/page-objects/SettingsDialog.ts type SettingsTab (line 3) | type SettingsTab = class SettingsDialog (line 10) | class SettingsDialog { method constructor (line 14) | constructor(private page: Page) { method expectVisible (line 19) | async expectVisible(): Promise { method navigateToTab (line 23) | async navigateToTab(tab: SettingsTab): Promise { method navigateToAllTabs (line 29) | async navigateToAllTabs(tabs: SettingsTab[]): Promise { method close (line 35) | async close(): Promise { method getMFAToggle (line 44) | async getMFAToggle(): Promise { method getLogoutAllDevicesButton (line 48) | async getLogoutAllDevicesButton(): Promise { method expectMFAToggleVisible (line 52) | async expectMFAToggleVisible(): Promise { method expectLogoutAllDevicesVisible (line 56) | async expectLogoutAllDevicesVisible(): Promise { FILE: e2e/page-objects/SidebarComponent.ts class SidebarComponent (line 4) | class SidebarComponent { method constructor (line 8) | constructor(private page: Page) { method expandIfCollapsed (line 13) | async expandIfCollapsed(): Promise { method collapse (line 28) | async collapse(): Promise { method getSubscriptionTier (line 33) | async getSubscriptionTier(): Promise { method verifySubscriptionTier (line 38) | async verifySubscriptionTier(expectedTier: string): Promise { method findChatByTitle (line 46) | async findChatByTitle(title: string): Promise { method expectChatWithTitle (line 53) | async expectChatWithTitle( method clickChatByTitle (line 66) | async clickChatByTitle(title: string): Promise { method clickChatById (line 76) | async clickChatById(chatId: string): Promise { method clickChatByUrl (line 86) | async clickChatByUrl(url: string): Promise { method expectChatWithId (line 94) | async expectChatWithId( method getChatTitleById (line 105) | async getChatTitleById(chatId: string): Promise { method getAllChatItems (line 116) | async getAllChatItems(): Promise { method getChatCount (line 123) | async getChatCount(): Promise { method waitForChatListReady (line 133) | async waitForChatListReady(timeout: number = TIMEOUTS.MEDIUM): Promise... method openChatOptionsByTitle (line 149) | async openChatOptionsByTitle(title: string): Promise { method openChatOptionsById (line 164) | async openChatOptionsById(chatId: string): Promise { method openChatOptionsByIndex (line 179) | async openChatOptionsByIndex(index: number): Promise { method clickPin (line 194) | async clickPin(title: string): Promise { method clickUnpin (line 202) | async clickUnpin(title: string): Promise { method clickPinByIndex (line 210) | async clickPinByIndex(index: number): Promise { method clickUnpinByIndex (line 218) | async clickUnpinByIndex(index: number): Promise { method expectPinIconVisible (line 226) | async expectPinIconVisible( method openChatOptionsByUrl (line 240) | async openChatOptionsByUrl(url: string): Promise { method clickPinByUrl (line 248) | async clickPinByUrl(url: string): Promise { method clickUnpinByUrl (line 256) | async clickUnpinByUrl(url: string): Promise { FILE: e2e/page-objects/UpgradeDialog.ts class UpgradeDialog (line 4) | class UpgradeDialog { method constructor (line 13) | constructor(private page: Page) { method verifyDialogVisible (line 31) | async verifyDialogVisible(): Promise { method verifyDialogNotVisible (line 35) | async verifyDialogNotVisible(): Promise { method verifyDialogTitle (line 39) | async verifyDialogTitle(expectedTitle: string): Promise { method verifyDialogTitleContains (line 43) | async verifyDialogTitleContains(text: string): Promise { method verifyDialogDescriptionContains (line 47) | async verifyDialogDescriptionContains(text: string): Promise { method clickUpgradeNow (line 51) | async clickUpgradeNow(): Promise { method clickUpgradePlan (line 55) | async clickUpgradePlan(): Promise { method clickAnyUpgradeButton (line 59) | async clickAnyUpgradeButton(): Promise { method closeDialog (line 69) | async closeDialog(): Promise { method verifyUpgradeButtonVisible (line 78) | async verifyUpgradeButtonVisible(): Promise { method verifyDialogContent (line 90) | async verifyDialogContent(expectedContent: { method waitForDialogToAppear (line 114) | async waitForDialogToAppear(): Promise { method waitForDialogToDisappear (line 118) | async waitForDialogToDisappear(): Promise { method verifyAgentModeUpgradeDialog (line 122) | async verifyAgentModeUpgradeDialog(): Promise { method verifyFileUploadUpgradeDialog (line 129) | async verifyFileUploadUpgradeDialog(): Promise { method getDialogTitle (line 135) | async getDialogTitle(): Promise { method getDialogDescription (line 139) | async getDialogDescription(): Promise { FILE: e2e/page-objects/UserMenuComponent.ts class UserMenuComponent (line 3) | class UserMenuComponent { method constructor (line 7) | constructor(private page: Page) { method getUserMenuButton (line 14) | async getUserMenuButton(): Promise { method isVisible (line 18) | async isVisible(): Promise { method expectVisible (line 22) | async expectVisible(): Promise { method openMenu (line 26) | async openMenu(): Promise { method openSettings (line 30) | async openSettings(): Promise { FILE: hooks/use-is-standalone.ts function useIsStandalone (line 3) | function useIsStandalone() { FILE: hooks/use-mobile.ts constant MOBILE_BREAKPOINT (line 3) | const MOBILE_BREAKPOINT = 768; function useIsMobile (line 5) | function useIsMobile() { FILE: lib/__tests__/suspensionMessage.test.ts constant SUPPORT_URL (line 4) | const SUPPORT_URL = "https://help.hackerai.co/"; FILE: lib/actions/billing-portal.ts function redirectToBillingPortal (line 7) | async function redirectToBillingPortal() { FILE: lib/ai/providers.ts type OpenRouterInstance (line 39) | type OpenRouterInstance = typeof openrouter; type ModelName (line 59) | type ModelName = keyof typeof baseProviders; function isAnthropicModel (line 102) | function isAnthropicModel(modelName: string): boolean { function isDeepSeekModel (line 106) | function isDeepSeekModel(modelName: string): boolean { function resolveTierToProviderKey (line 120) | function resolveTierToProviderKey( FILE: lib/ai/tools/__tests__/interact-terminal-session.test.ts method constructor (line 20) | constructor(msg = "exit", exitCode = 1) { type FakeHandle (line 67) | interface FakeHandle extends PtyHandle { function makeFakeHandle (line 74) | function makeFakeHandle(pid = 4242): FakeHandle { function makeFakeE2BSandbox (line 110) | function makeFakeE2BSandbox() { function makeContext (line 119) | function makeContext(opts: { function runTool (line 171) | async function runTool( function runExecTool (line 188) | async function runExecTool( function createSession (line 205) | async function createSession( FILE: lib/ai/tools/__tests__/run-terminal-cmd.test.ts method constructor (line 21) | constructor(msg = "exit", exitCode = 1) { type FakeHandle (line 73) | interface FakeHandle extends PtyHandle { function makeFakeHandle (line 80) | function makeFakeHandle(pid = 4242): FakeHandle { function makeFakeE2BSandbox (line 116) | function makeFakeE2BSandbox() { function makeContext (line 125) | function makeContext(opts: { function runTool (line 181) | async function runTool( function tool (line 415) | function tool(ctx: Parameters[0]) { FILE: lib/ai/tools/file.ts method toModelOutput (line 315) | toModelOutput({ output }) { FILE: lib/ai/tools/interact-terminal-session.ts constant MAX_INPUT_BYTES_PER_SEND (line 18) | const MAX_INPUT_BYTES_PER_SEND = 8 * 1024; constant DEFAULT_WAIT_TIMEOUT_SECONDS (line 19) | const DEFAULT_WAIT_TIMEOUT_SECONDS = 10; constant MAX_WAIT_TIMEOUT_SECONDS (line 20) | const MAX_WAIT_TIMEOUT_SECONDS = 300; constant SEND_IMMEDIATE_OUTPUT_WINDOW_MS (line 24) | const SEND_IMMEDIATE_OUTPUT_WINDOW_MS = 500; constant WAIT_QUIET_WINDOW_MS (line 28) | const WAIT_QUIET_WINDOW_MS = 500; type ActionResult (line 148) | type ActionResult = { result: Record }; method toModelOutput (line 355) | toModelOutput({ output }) { FILE: lib/ai/tools/notes.ts method toModelOutput (line 295) | toModelOutput({ output }) { FILE: lib/ai/tools/run-terminal-cmd.ts constant DEFAULT_STREAM_TIMEOUT_SECONDS (line 43) | const DEFAULT_STREAM_TIMEOUT_SECONDS = 60; constant MAX_TIMEOUT_SECONDS (line 44) | const MAX_TIMEOUT_SECONDS = 600; constant INTERACTIVE_QUIET_WINDOW_MS (line 49) | const INTERACTIVE_QUIET_WINDOW_MS = 500; function executeCommand (line 428) | async function executeCommand(sandboxInstance: typeof sandbox) { method toModelOutput (line 821) | toModelOutput({ output }) { FILE: lib/ai/tools/utils/__tests__/centrifugo-sandbox.test.ts class MockSubscription (line 18) | class MockSubscription extends EventEmitter { class MockCentrifugeClient (line 24) | class MockCentrifugeClient extends EventEmitter { constant FIXED_UUID (line 52) | const FIXED_UUID = "cmd-test-uuid-1234"; function createSandbox (line 65) | function createSandbox( function startCommand (line 79) | function startCommand( function createWindowsBashSandbox (line 473) | function createWindowsBashSandbox() { FILE: lib/ai/tools/utils/__tests__/e2b-pty-adapter.test.ts type OnDataCb (line 20) | type OnDataCb = (bytes: Uint8Array) => void | Promise; type CapturedCreateCall (line 22) | interface CapturedCreateCall { type MockHandle (line 30) | interface MockHandle { type MockPtyCalls (line 35) | interface MockPtyCalls { type MockSandboxResult (line 43) | interface MockSandboxResult { function buildMockSandbox (line 51) | function buildMockSandbox(pid = 4242): MockSandboxResult { FILE: lib/ai/tools/utils/__tests__/pty-session-manager.test.ts type FakeHandle (line 15) | interface FakeHandle extends PtyHandle { function makeFakeHandle (line 27) | function makeFakeHandle(overrides?: { pid?: number }): FakeHandle { function makeCreateHandleFactory (line 53) | function makeCreateHandleFactory(handle: PtyHandle) { FILE: lib/ai/tools/utils/__tests__/sandbox-file-uploader.test.ts function makeSandbox (line 29) | function makeSandbox(size: number, e2b = false) { FILE: lib/ai/tools/utils/background-process-tracker.ts type BackgroundProcess (line 3) | interface BackgroundProcess { class BackgroundProcessTracker (line 10) | class BackgroundProcessTracker { method constructor (line 13) | constructor() { method addProcess (line 20) | addProcess(pid: number, command: string, outputFiles: string[]): void { method removeProcess (line 32) | removeProcess(pid: number): void { method checkProcessStatus (line 39) | async checkProcessStatus(sandbox: AnySandbox, pid: number): Promise { method getSandboxContext (line 129) | getSandboxContext(): string | null { method getOsContext (line 154) | getOsContext(): string | null { method escapePath (line 456) | private static escapePath(path: string): string { method parentDir (line 468) | private static parentDir(path: string): string { method isWindows (line 477) | isWindows(): boolean { method toNativePath (line 487) | private toNativePath(path: string): string { method escapeForTarget (line 500) | private escapeForTarget(value: string): string { method toBashPath (line 510) | private static toBashPath(path: string): string { method detectShell (line 528) | private async detectShell(): Promise<"bash" | "cmd"> { method shellContext (line 549) | private async shellContext(rawPath: string): Promise<{ method ensureDirectory (line 573) | private async ensureDirectory(dir: string): Promise { method detectCurlCaps (line 603) | private async detectCurlCaps(): Promise<{ method detectHttpClient (line 628) | private async detectHttpClient(): Promise<"curl" | "wget"> { method getHost (line 1002) | getHost(_port: number): string { method close (line 1006) | async close(): Promise { FILE: lib/ai/tools/utils/e2b-errors.ts type E2BErrorCategory (line 34) | type E2BErrorCategory = function classifyE2BError (line 46) | function classifyE2BError(error: unknown): E2BErrorCategory { function isE2BPermanentError (line 77) | function isE2BPermanentError(error: unknown): boolean { function isE2BRateLimitError (line 85) | function isE2BRateLimitError(error: unknown): boolean { function getUserFacingE2BErrorMessage (line 93) | function getUserFacingE2BErrorMessage(error: unknown): string | null { FILE: lib/ai/tools/utils/e2b-pty-adapter.ts type PtyDataCb (line 17) | type PtyDataCb = (data: Uint8Array) => void | Promise; type E2BPtyCreateOpts (line 19) | interface E2BPtyCreateOpts { type E2BCommandHandle (line 28) | interface E2BCommandHandle { type E2BPtyModule (line 35) | interface E2BPtyModule { type SandboxWithPty (line 42) | interface SandboxWithPty { type PtyHandle (line 48) | interface PtyHandle { type CreatePtyOptions (line 58) | interface CreatePtyOptions { constant LOG_PREFIX (line 67) | const LOG_PREFIX = "[e2b-pty-adapter]"; constant PTY_NO_TIMEOUT_MS (line 73) | const PTY_NO_TIMEOUT_MS = 0; function createE2BPtyHandle (line 75) | async function createE2BPtyHandle( FILE: lib/ai/tools/utils/file-accumulator.ts type AccumulatedFileMetadata (line 3) | interface AccumulatedFileMetadata { class FileAccumulator (line 11) | class FileAccumulator { method add (line 14) | add(metadata: AccumulatedFileMetadata) { method addMany (line 18) | addMany(metadataList: Array) { method getAllIds (line 25) | getAllIds(): Array> { method getAll (line 30) | getAll(): Array { method clear (line 34) | clear() { FILE: lib/ai/tools/utils/guardrails.ts type GuardrailAction (line 12) | enum GuardrailAction { type Severity (line 18) | enum Severity { type GuardrailResult (line 26) | interface GuardrailResult { type GuardrailConfig (line 40) | interface GuardrailConfig { type GuardrailConfigUI (line 51) | interface GuardrailConfigUI { constant DEFAULT_GUARDRAILS (line 79) | const DEFAULT_GUARDRAILS: GuardrailConfig[] = [ FILE: lib/ai/tools/utils/hybrid-sandbox-manager.ts type SandboxInstance (line 16) | type SandboxInstance = Sandbox | CentrifugoSandbox; type SandboxPreference (line 20) | type SandboxPreference = "e2b" | "desktop" | (string & {}); type SandboxFallbackInfo (line 22) | interface SandboxFallbackInfo { constant MAX_SANDBOX_HEALTH_FAILURES (line 41) | const MAX_SANDBOX_HEALTH_FAILURES = 5; class HybridSandboxManager (line 43) | class HybridSandboxManager implements SandboxManager { method constructor (line 52) | constructor( method recordHealthFailure (line 64) | recordHealthFailure(): boolean { method resetHealthFailures (line 81) | resetHealthFailures(): void { method isSandboxUnavailable (line 86) | isSandboxUnavailable(): boolean { method getEffectivePreference (line 95) | getEffectivePreference(): SandboxPreference { method getOsContext (line 113) | getOsContext(): string | null { method closeCurrentSandbox (line 123) | private async closeCurrentSandbox(): Promise { method setSandboxPreference (line 135) | async setSandboxPreference(preference: SandboxPreference): Promise { method getSandbox (line 195) | async getSandbox(): Promise<{ sandbox: SandboxInstance }> { method useCentrifugoConnection (line 267) | private async useCentrifugoConnection( method getE2BSandbox (line 291) | private async getE2BSandbox(): Promise<{ sandbox: Sandbox }> { method setSandbox (line 320) | setSandbox(sandbox: SandboxInstance): void { method getSandboxContextForPrompt (line 337) | async getSandboxContextForPrompt(): Promise { method buildSandboxContext (line 361) | private buildSandboxContext(connection: ConnectionInfo): string | null { FILE: lib/ai/tools/utils/path-validation.ts function validateDownloadUrl (line 4) | function validateDownloadUrl(url: string): void { FILE: lib/ai/tools/utils/perplexity.ts constant SEARCH_RESULT_CONTENT_MAX_TOKENS (line 2) | const SEARCH_RESULT_CONTENT_MAX_TOKENS = 250; constant RECENCY_MAP (line 5) | const RECENCY_MAP: Record = { type PerplexitySearchResult (line 12) | interface PerplexitySearchResult { type PerplexitySearchResponse (line 20) | interface PerplexitySearchResponse { type FormattedSearchResult (line 25) | interface FormattedSearchResult { FILE: lib/ai/tools/utils/pid-discovery.ts function findProcessPid (line 11) | async function findProcessPid( FILE: lib/ai/tools/utils/platform-utils.ts function getPlatformDisplayName (line 8) | function getPlatformDisplayName(platform: string): string { function escapeShellValue (line 29) | function escapeShellValue(value: string, platform?: string): string { FILE: lib/ai/tools/utils/process-termination.ts function verifyProcessTerminated (line 14) | async function verifyProcessTerminated( function forceKillProcess (line 55) | async function forceKillProcess( function terminateProcessReliably (line 94) | async function terminateProcessReliably( FILE: lib/ai/tools/utils/proxy-manager.ts constant CAIDO_TOKEN_FILE (line 15) | const CAIDO_TOKEN_FILE = "/tmp/caido-token"; constant CAIDO_LOG (line 16) | const CAIDO_LOG = "/tmp/caido.log"; type CaidoSetupTimings (line 41) | interface CaidoSetupTimings { function classifyCaidoError (line 56) | function classifyCaidoError(error: unknown): CaidoErrorKind { function reportCaidoReady (line 69) | function reportCaidoReady( function isCaidoBroken (line 93) | function isCaidoBroken(text: string): boolean { function invalidateAndKillCaido (line 106) | async function invalidateAndKillCaido(context: ToolContext): Promise { function doEnsureExternalCaido (line 220) | async function doEnsureExternalCaido( function doEnsureCaido (line 285) | async function doEnsureCaido( function exportCaidoUiUrl (line 523) | async function exportCaidoUiUrl( constant HTTPQL_TEXT_FIELDS (line 570) | const HTTPQL_TEXT_FIELDS = new Set([ function fixHttpqlQuoting (line 579) | function fixHttpqlQuoting(filter: string): string { constant SORT_MAPPING (line 604) | const SORT_MAPPING: Record = { function getBaseUrl (line 615) | function getBaseUrl(): string { constant GRAPHQL_TIMEOUT (line 626) | const GRAPHQL_TIMEOUT = 15_000; function runGql (line 628) | async function runGql( function readCaidoTokenFromDisk (line 649) | async function readCaidoTokenFromDisk( function runGqlLocal (line 661) | async function runGqlLocal( function runGqlViaSandbox (line 774) | async function runGqlViaSandbox( function parseGqlResponse (line 824) | async function parseGqlResponse( function listRequests (line 853) | async function listRequests( function viewRequest (line 928) | async function viewRequest( constant MAX_REGEX_LENGTH (line 992) | const MAX_REGEX_LENGTH = 500; function searchContent (line 994) | function searchContent( function paginateContent (line 1041) | function paginateContent( function parseHttpResponse (line 1081) | function parseHttpResponse(raw: string): { function sendRequest (line 1133) | async function sendRequest( function scopeRules (line 1227) | async function scopeRules( function listSitemap (line 1347) | async function listSitemap( function cleanSitemapNode (line 1416) | function cleanSitemapNode( function viewSitemapEntry (line 1446) | async function viewSitemapEntry(context: ToolContext, entryId: string) { FILE: lib/ai/tools/utils/pty-exited-promise.ts type ResolvableExited (line 10) | interface ResolvableExited { function createResolvableExited (line 15) | function createResolvableExited(): ResolvableExited { FILE: lib/ai/tools/utils/pty-keys.ts constant SPECIAL_KEYS (line 13) | const SPECIAL_KEYS: Record = { constant TMUX_SPECIAL_KEYS (line 77) | const TMUX_SPECIAL_KEYS: ReadonlySet = new Set( constant RAW_TO_KEY_NAME (line 87) | const RAW_TO_KEY_NAME: Record = Object.fromEntries( FILE: lib/ai/tools/utils/pty-output-formatter.ts constant PARSER_ROWS (line 16) | const PARSER_ROWS = 500; constant PARSER_SCROLLBACK (line 17) | const PARSER_SCROLLBACK = 5000; constant ANSI_PATTERNS (line 51) | const ANSI_PATTERNS = [ function fallbackClean (line 60) | function fallbackClean(text: string): string { function cleanPtyForUI (line 71) | async function cleanPtyForUI(text: string): Promise { function lastNLinesBytes (line 108) | async function lastNLinesBytes( type SnapshotSource (line 118) | interface SnapshotSource { function getSessionSnapshot (line 122) | async function getSessionSnapshot( function getSessionSnapshots (line 131) | async function getSessionSnapshots( FILE: lib/ai/tools/utils/pty-output.ts constant OSC_COMPLETE_RE (line 16) | const OSC_COMPLETE_RE = /\x1b\][^\x07\x1b\x9c]*(?:\x07|\x1b\\|\x9c)/g; constant OSC_633_RE (line 26) | const OSC_633_RE = /^.*\]633;.*$\r?\n?/gm; constant OSC_3008_RE (line 29) | const OSC_3008_RE = /^.*\]3008;.*$\r?\n?/gm; constant BRACKETED_PASTE_RE (line 32) | const BRACKETED_PASTE_RE = /^.*\[\?2004[hl].*$\r?\n?/gm; constant LEADING_CRLF_RE (line 35) | const LEADING_CRLF_RE = /^(\r?\n)+/; constant SENTINEL_LINE_RE (line 103) | const SENTINEL_LINE_RE = /^.*__DONE_[a-f0-9]+__\d*.*$/gm; FILE: lib/ai/tools/utils/pty-session-manager.ts constant MAX_CONCURRENT_PTYS_PER_CHAT (line 14) | const MAX_CONCURRENT_PTYS_PER_CHAT = 10; constant SESSION_IDLE_TIMEOUT_MS (line 15) | const SESSION_IDLE_TIMEOUT_MS = 10 * 60_000; constant SESSION_MAX_LIFETIME_MS (line 16) | const SESSION_MAX_LIFETIME_MS = 60 * 60_000; constant MAX_BUFFER_BYTES (line 17) | const MAX_BUFFER_BYTES = 256 * 1024; constant DEFAULT_PTY_COLS (line 25) | const DEFAULT_PTY_COLS = 120; constant DEFAULT_PTY_ROWS (line 26) | const DEFAULT_PTY_ROWS = 30; constant CLOSE_EXIT_FALLBACK_MS (line 28) | const CLOSE_EXIT_FALLBACK_MS = 2_000; type PtySession (line 30) | interface PtySession { type CreateSessionOpts (line 55) | interface CreateSessionOpts { type InternalSession (line 62) | interface InternalSession extends PtySession { function shortSessionId (line 86) | function shortSessionId( class PtySessionManager (line 96) | class PtySessionManager { method create (line 99) | async create(chatId: string, opts: CreateSessionOpts): Promise { method closeAll (line 235) | async closeAll(chatId: string): Promise { method onData (line 244) | private onData(session: InternalSession, bytes: Uint8Array): void { method armIdleTimer (line 254) | private armIdleTimer(session: InternalSession): void { method enforceRing (line 261) | private enforceRing(session: InternalSession): void { method totalBufferBytes (line 278) | private totalBufferBytes(session: PtySession): number { method sliceBuffer (line 284) | private sliceBuffer( method killAndRemove (line 310) | private async killAndRemove( method removeSession (line 356) | private removeSession(session: InternalSession): void { FILE: lib/ai/tools/utils/pty-wait-utils.ts constant ANSI_REGEX (line 8) | const ANSI_REGEX = function waitForOutput (line 25) | async function waitForOutput( function capOutput (line 100) | function capOutput(text: string, maxBytes: number = 8 * 1024): string { function peekExited (line 115) | async function peekExited( FILE: lib/ai/tools/utils/retry-with-backoff.ts type RetryOptions (line 10) | interface RetryOptions { function defaultIsPermanentError (line 30) | function defaultIsPermanentError(error: unknown): boolean { function retryWithBackoff (line 56) | async function retryWithBackoff( FILE: lib/ai/tools/utils/sandbox-command-options.ts constant MAX_COMMAND_EXECUTION_TIME (line 4) | const MAX_COMMAND_EXECUTION_TIME = 10 * 60 * 1000; constant LOCAL_EXTRA_PATH_DIRS (line 10) | const LOCAL_EXTRA_PATH_DIRS = [ function augmentCommandPath (line 23) | function augmentCommandPath( function buildSandboxCommandOptions (line 46) | function buildSandboxCommandOptions( FILE: lib/ai/tools/utils/sandbox-file-uploader.ts constant DEFAULT_MEDIA_TYPE (line 13) | const DEFAULT_MEDIA_TYPE = "application/octet-stream"; constant MAX_GENERATED_FILE_SIZE_MB (line 14) | const MAX_GENERATED_FILE_SIZE_MB = constant SANDBOX_UPLOAD_TIMEOUT_MS (line 16) | const SANDBOX_UPLOAD_TIMEOUT_MS = 5 * 60 * 1000; type UploadedFileInfo (line 18) | type UploadedFileInfo = { function extractErrorMessage (line 33) | function extractErrorMessage(error: unknown): string { function shellQuote (line 44) | function shellQuote(value: string): string { function getSandboxFileSize (line 48) | async function getSandboxFileSize( function assertSandboxFileSizeAllowed (line 81) | function assertSandboxFileSizeAllowed(fileName: string, size: number): v... function getSandboxLogType (line 89) | function getSandboxLogType(sandbox: AnySandbox): "e2b" | "centrifugo" { function errorToLog (line 93) | function errorToLog(error: unknown) { function getFileNameFromPath (line 117) | function getFileNameFromPath(fullPath: string): string { function uploadGeneratedFileFromSandboxToUrl (line 121) | async function uploadGeneratedFileFromSandboxToUrl(args: { function uploadSandboxFileToConvex (line 172) | async function uploadSandboxFileToConvex(args: { FILE: lib/ai/tools/utils/sandbox-health.ts constant CPU_WARNING_THRESHOLD (line 13) | const CPU_WARNING_THRESHOLD = 95; constant MEM_WARNING_THRESHOLD (line 14) | const MEM_WARNING_THRESHOLD = 90; function checkSandboxMetrics (line 20) | async function checkSandboxMetrics(sandbox: AnySandbox): Promise<{ function getSandboxDiagnostics (line 64) | async function getSandboxDiagnostics( function waitForSandboxReady (line 84) | async function waitForSandboxReady( FILE: lib/ai/tools/utils/sandbox-manager.ts constant MAX_SANDBOX_HEALTH_FAILURES (line 11) | const MAX_SANDBOX_HEALTH_FAILURES = 5; class DefaultSandboxManager (line 13) | class DefaultSandboxManager implements SandboxManager { method constructor (line 18) | constructor( method recordHealthFailure (line 27) | recordHealthFailure(): boolean { method resetHealthFailures (line 35) | resetHealthFailures(): void { method isSandboxUnavailable (line 40) | isSandboxUnavailable(): boolean { method getSandboxInfo (line 44) | getSandboxInfo(): SandboxInfo | null { method getEffectivePreference (line 48) | getEffectivePreference(): string { method getSandboxType (line 52) | getSandboxType(toolName: string): SandboxType | undefined { method getSandbox (line 59) | async getSandbox(): Promise<{ method setSandbox (line 83) | setSandbox(sandbox: Sandbox): void { FILE: lib/ai/tools/utils/sandbox-tools.ts constant SANDBOX_ENVIRONMENT_TOOLS (line 2) | const SANDBOX_ENVIRONMENT_TOOLS = [ FILE: lib/ai/tools/utils/sandbox-types.ts type OsInfo (line 5) | interface OsInfo { type ConnectionInfo (line 12) | interface ConnectionInfo { function isCentrifugoSandbox (line 24) | function isCentrifugoSandbox( function isE2BSandbox (line 40) | function isE2BSandbox(sandbox: AnySandbox | null): sandbox is Sandbox { type CommonSandboxInterface (line 49) | interface CommonSandboxInterface { function asCommonSandbox (line 82) | function asCommonSandbox(sandbox: AnySandbox): CommonSandboxInterface { FILE: lib/ai/tools/utils/sandbox.ts type SandboxReadyPath (line 5) | type SandboxReadyPath = SandboxBootInfo["path"]; constant SANDBOX_TEMPLATE (line 7) | const SANDBOX_TEMPLATE = process.env.E2B_TEMPLATE || "terminal-agent-san... constant BASH_SANDBOX_RESUME_TIMEOUT (line 8) | const BASH_SANDBOX_RESUME_TIMEOUT = 5 * 60 * 1000; constant BASH_SANDBOX_AUTOPAUSE_TIMEOUT (line 9) | const BASH_SANDBOX_AUTOPAUSE_TIMEOUT = 7 * 60 * 1000; constant RATE_LIMIT_COOLDOWN_MS (line 11) | const RATE_LIMIT_COOLDOWN_MS = 1_000; constant MAX_CREATE_RETRIES (line 12) | const MAX_CREATE_RETRIES = 3; constant SANDBOX_VERSION (line 23) | const SANDBOX_VERSION = "v9"; FILE: lib/ai/tools/utils/terminal-output-saver.ts function saveFullOutputToFile (line 11) | async function saveFullOutputToFile( function saveTruncatedOutput (line 49) | async function saveTruncatedOutput(opts: { FILE: lib/ai/tools/utils/todo-manager.ts type TodoUpdate (line 3) | interface TodoUpdate { class TodoManager (line 13) | class TodoManager { method constructor (line 17) | constructor(initialTodos?: Todo[]) { method getAllTodos (line 26) | getAllTodos(): Todo[] { method setTodos (line 33) | setTodos( method getStats (line 87) | getStats() { method mergeWith (line 107) | mergeWith(baseTodos: Todo[] | undefined, assistantMessageId: string): ... FILE: lib/ai/tools/web-search.ts constant WEB_SEARCH_COST_PER_REQUEST (line 17) | const WEB_SEARCH_COST_PER_REQUEST = 0.005; FILE: lib/api/__tests__/build-extra-usage-config.test.ts constant USER_ID (line 38) | const USER_ID = "user_abc"; constant ORG_ID (line 39) | const ORG_ID = "org_123"; FILE: lib/api/__tests__/chat-stream-helpers-fallback.test.ts constant KIMI_SLUG (line 21) | const KIMI_SLUG = "moonshotai/kimi-k2.6:exacto"; constant GEMINI_SLUG (line 22) | const GEMINI_SLUG = "google/gemini-3-flash-preview"; FILE: lib/api/__tests__/chat-stream-helpers-notes.test.ts function buildNotesReminder (line 28) | function buildNotesReminder(noteTitle: string): string { constant RESUME_REMINDER (line 41) | const RESUME_REMINDER = function buildConversationMessages (line 125) | function buildConversationMessages(userTextContent: string) { FILE: lib/api/agent-stream-runner.ts type AgentStreamState (line 72) | type AgentStreamState = { function initAgentStreamState (line 90) | function initAgentStreamState( type AgentStreamContext (line 112) | type AgentStreamContext = { function createAgentStream (line 163) | async function createAgentStream( FILE: lib/api/chat-handler.ts function getStreamContext (line 108) | function getStreamContext() { method consumeSseStream (line 1281) | async consumeSseStream({ stream: sseStream }) { FILE: lib/api/chat-logger.ts type ChatLoggerConfig (line 30) | interface ChatLoggerConfig { type RequestDetails (line 35) | interface RequestDetails { type UserContext (line 41) | interface UserContext { type ChatContext (line 47) | interface ChatContext { type RateLimitContext (line 56) | interface RateLimitContext { type StreamResult (line 64) | interface StreamResult { function providerErrorCategory (line 71) | function providerErrorCategory(details: Record): string { function posthogProviderException (line 85) | function posthogProviderException( function createChatLogger (line 103) | function createChatLogger(config: ChatLoggerConfig) { type ChatLogger (line 425) | type ChatLogger = ReturnType; function captureToolCalls (line 432) | function captureToolCalls({ function captureAgentRun (line 475) | function captureAgentRun({ function shutdownPostHog (line 503) | function shutdownPostHog(posthog: PostHog | null) { FILE: lib/api/chat-stream-helpers.ts function hasFileAttachments (line 57) | function hasFileAttachments( function countFileAttachments (line 68) | function countFileAttachments( function stripImageAttachments (line 93) | function stripImageAttachments< function sendRateLimitWarnings (line 120) | function sendRateLimitWarnings( type TokenBucketEmitContext (line 189) | interface TokenBucketEmitContext { function emitTokenBucketThresholdWarning (line 205) | function emitTokenBucketThresholdWarning( function isXaiSafetyError (line 231) | function isXaiSafetyError(error: unknown): boolean { function isProviderApiError (line 262) | function isProviderApiError(error: unknown): boolean { function computeContextUsage (line 291) | function computeContextUsage( function isContextUsageEnabled (line 301) | function isContextUsageEnabled( function writeContextUsage (line 312) | function writeContextUsage( type SummarizationStepResult (line 319) | interface SummarizationStepResult { function runSummarizationStep (line 326) | async function runSummarizationStep(options: { class SummarizationTracker (line 395) | class SummarizationTracker { method recordSummarization (line 404) | recordSummarization( method processMessageForSave (line 430) | processMessageForSave( constant MODEL_FALLBACK_CHAIN (line 458) | const MODEL_FALLBACK_CHAIN: Partial = { function getAuthRedirectPath (line 8) | function getAuthRedirectPath(url: URL): string | null { function redirectToAuthorizationUrl (line 23) | function redirectToAuthorizationUrl( FILE: lib/auth/cross-tab-mutex.ts type LockData (line 8) | type LockData = { type CrossTabMutexOptions (line 13) | type CrossTabMutexOptions = { constant DEFAULT_LOCK_KEY (line 19) | const DEFAULT_LOCK_KEY = "cross-tab-mutex"; constant DEFAULT_LOCK_TIMEOUT_MS (line 20) | const DEFAULT_LOCK_TIMEOUT_MS = 10000; class CrossTabMutex (line 22) | class CrossTabMutex { method constructor (line 28) | constructor(options: CrossTabMutexOptions = {}) { method tryAcquire (line 42) | tryAcquire(): boolean { method release (line 92) | release(): void { method acquireWithWait (line 115) | async acquireWithWait( method withLock (line 139) | async withLock( method forceClear (line 158) | forceClear(): void { FILE: lib/auth/entitlements.ts constant TIER_ENTITLEMENTS (line 4) | const TIER_ENTITLEMENTS: ReadonlyArray<{ function parseEntitlements (line 27) | function parseEntitlements(raw: unknown): string[] { function resolveSubscriptionTier (line 37) | function resolveSubscriptionTier( FILE: lib/auth/feature-flags.ts function hashToPercentage (line 10) | function hashToPercentage(str: string): number { function isFeatureEnabled (line 26) | function isFeatureEnabled( constant FEATURE_FLAGS (line 42) | const FEATURE_FLAGS = { function getCrossTabRolloutPercentage (line 47) | function getCrossTabRolloutPercentage(): number { constant FEATURE_ROLLOUTS (line 57) | const FEATURE_ROLLOUTS = { method [FEATURE_FLAGS.CROSS_TAB_TOKEN_SHARING] (line 58) | get [FEATURE_FLAGS.CROSS_TAB_TOKEN_SHARING]() { function isCrossTabTokenSharingEnabled (line 66) | function isCrossTabTokenSharingEnabled( FILE: lib/auth/shared-token.ts constant SHARED_TOKEN_KEY (line 8) | const SHARED_TOKEN_KEY = "hackerai-shared-token"; constant TOKEN_FRESHNESS_MS (line 9) | const TOKEN_FRESHNESS_MS = 60000; type SharedToken (line 11) | type SharedToken = { function isValidSharedToken (line 16) | function isValidSharedToken(parsed: unknown): parsed is SharedToken { function getSharedToken (line 25) | function getSharedToken(): SharedToken | null { function setSharedToken (line 43) | function setSharedToken(token: string): void { function clearExpiredSharedToken (line 56) | function clearExpiredSharedToken(): void { function isTokenFresh (line 77) | function isTokenFresh(sharedToken: SharedToken | null): boolean { function clearSharedToken (line 82) | function clearSharedToken(): void { function getFreshSharedToken (line 98) | function getFreshSharedToken(): string | null { function getFreshSharedTokenWithFallback (line 110) | async function getFreshSharedTokenWithFallback( FILE: lib/auth/use-auth-from-authkit.ts function useSharedTokenCleanup (line 20) | function useSharedTokenCleanup(enabled: boolean): void { type ConvexAuthState (line 28) | type ConvexAuthState = { type AuthKitDeps (line 36) | type AuthKitDeps = { function useAuthFromAuthKit (line 50) | function useAuthFromAuthKit( FILE: lib/auth/workos-organization-name.ts constant FALLBACK_ORGANIZATION_NAME (line 1) | const FALLBACK_ORGANIZATION_NAME = "Personal Workspace"; constant MAX_ORGANIZATION_NAME_LENGTH (line 2) | const MAX_ORGANIZATION_NAME_LENGTH = 255; type OrganizationNameInput (line 7) | type OrganizationNameInput = { function buildWorkOSOrganizationName (line 13) | function buildWorkOSOrganizationName({ FILE: lib/billing/resolve-customer-users.ts function resolveUserIdsFromCustomer (line 5) | async function resolveUserIdsFromCustomer( FILE: lib/centrifugo/__tests__/jwt.test.ts class SignJWT (line 12) | class SignJWT { method constructor (line 16) | constructor(payload: Record) { method setProtectedHeader (line 20) | setProtectedHeader(header: Record) { method setExpirationTime (line 25) | setExpirationTime(time: string) { method sign (line 34) | async sign(_key: Uint8Array): Promise { function decodeJwtPayload (line 50) | function decodeJwtPayload(token: string): Record { function decodeJwtHeader (line 57) | function decodeJwtHeader(token: string): Record { FILE: lib/centrifugo/jwt.ts function generateCentrifugoToken (line 3) | async function generateCentrifugoToken( FILE: lib/centrifugo/types.ts type CommandMessage (line 1) | interface CommandMessage { type CommandCancelMessage (line 13) | interface CommandCancelMessage { type StdoutMessage (line 19) | interface StdoutMessage { type StderrMessage (line 25) | interface StderrMessage { type ExitMessage (line 31) | interface ExitMessage { type ErrorMessage (line 38) | interface ErrorMessage { type PtyCreateMessage (line 46) | interface PtyCreateMessage { type PtyInputMessage (line 57) | interface PtyInputMessage { type PtyResizeMessage (line 64) | interface PtyResizeMessage { type PtyKillMessage (line 72) | interface PtyKillMessage { type PtyReadyMessage (line 80) | interface PtyReadyMessage { type PtyDataMessage (line 86) | interface PtyDataMessage { type PtyExitMessage (line 92) | interface PtyExitMessage { type PtyErrorMessage (line 98) | interface PtyErrorMessage { type CommandResponseMessage (line 105) | type CommandResponseMessage = type SandboxMessage (line 114) | type SandboxMessage = function sandboxChannel (line 132) | function sandboxChannel(userId: string): string { FILE: lib/chat/__tests__/agent-routing.test.ts constant DESKTOP_UA (line 6) | const DESKTOP_UA = FILE: lib/chat/__tests__/chat-processor.test.ts function makeFilePart (line 10) | function makeFilePart(id: string, mediaType = "image/png") { function makeMessage (line 14) | function makeMessage( FILE: lib/chat/__tests__/doom-loop-detection.test.ts function makeStep (line 10) | function makeStep(toolCalls: Array<{ toolName: string; input: unknown }>) { FILE: lib/chat/__tests__/stop-conditions.test.ts function makeState (line 14) | function makeState(overrides: { FILE: lib/chat/agent-long-heartbeat.ts constant AGENT_LONG_HEARTBEAT_PART_TYPE (line 1) | const AGENT_LONG_HEARTBEAT_PART_TYPE = "data-agent-heartbeat" as const; constant AGENT_LONG_HEARTBEAT_INTERVAL_MS (line 6) | const AGENT_LONG_HEARTBEAT_INTERVAL_MS = 25_000; type MessageWithParts (line 8) | type MessageWithParts = { FILE: lib/chat/agent-long-tool-input-dedup.ts type ChunkLike (line 8) | type ChunkLike = { type?: string; toolCallId?: string }; type ToolInputDedupFilter (line 10) | type ToolInputDedupFilter = { method shouldDrop (line 17) | shouldDrop(chunk) { FILE: lib/chat/agent-long-transport.ts type RunHandle (line 23) | type RunHandle = { runId: string; publicAccessToken: string }; constant TERMINAL_RUN_STATUSES (line 36) | const TERMINAL_RUN_STATUSES = new Set([ constant STREAM_TIMEOUT_MS (line 49) | const STREAM_TIMEOUT_MS = 30_000; method start (line 57) | async start(controller) { FILE: lib/chat/agent-routing.ts constant HACKERAI_DESKTOP_USER_AGENT_TOKEN (line 3) | const HACKERAI_DESKTOP_USER_AGENT_TOKEN = "HackerAI-Desktop"; function isHackerAIDesktopUserAgent (line 5) | function isHackerAIDesktopUserAgent( function shouldUseAgentLongForAgent (line 11) | function shouldUseAgentLongForAgent({ function getBrowserUserAgent (line 31) | function getBrowserUserAgent(): string { FILE: lib/chat/auth-disclaimer.ts type SupportedLang (line 3) | type SupportedLang = constant AUTH_DISCLAIMER (line 13) | const AUTH_DISCLAIMER: Record = { constant ISO_639_3_TO_1 (line 24) | const ISO_639_3_TO_1: Record = { constant FRANC_ALLOWLIST (line 36) | const FRANC_ALLOWLIST = Object.keys(ISO_639_3_TO_1); constant MIN_LETTER_COUNT (line 41) | const MIN_LETTER_COUNT = 25; constant MIN_CONFIDENCE_MARGIN (line 48) | const MIN_CONFIDENCE_MARGIN = 0.05; function detectLang (line 50) | function detectLang(text: string): SupportedLang { FILE: lib/chat/budget-monitor.ts constant BUDGET_THRESHOLDS (line 21) | const BUDGET_THRESHOLDS = [80, 95, 100] as const; type BudgetSnapshot (line 23) | interface BudgetSnapshot { function captureBudgetSnapshot (line 36) | function captureBudgetSnapshot(args: { class BudgetMonitor (line 69) | class BudgetMonitor { method constructor (line 72) | constructor( method checkAfterStep (line 85) | checkAfterStep(currentCostDollars: number): "continue" | "abort" { method emit (line 140) | private emit(args: { FILE: lib/chat/chat-processor.ts function selectModel (line 42) | function selectModel( function hasImageOrPdfAttachment (line 85) | function hasImageOrPdfAttachment(messages: UIMessage[]): boolean { function addAuthMessage (line 101) | function addAuthMessage(messages: UIMessage[], moderationText: string) { constant ABORT_RENDERABLE_TOOL_TYPES (line 128) | const ABORT_RENDERABLE_TOOL_TYPES = new Set([ type IncompleteMessagePartsLogContext (line 156) | type IncompleteMessagePartsLogContext = { function logIncompleteToolPartHandled (line 167) | function logIncompleteToolPartHandled({ function createAbortedToolPart (line 207) | function createAbortedToolPart(part: any): any | null { function fixIncompleteMessageParts (line 236) | function fixIncompleteMessageParts( function fixIncompleteToolInvocations (line 368) | function fixIncompleteToolInvocations(messages: UIMessage[]): UIMessage[] { function removeDuplicateToolParts (line 393) | function removeDuplicateToolParts(messages: UIMessage[]): UIMessage[] { function stripOriginalContentFromMessages (line 439) | function stripOriginalContentFromMessages(messages: UIMessage[]): UIMess... function limitImageParts (line 511) | function limitImageParts( function stripProviderMetadata (line 572) | function stripProviderMetadata(messages: UIMessage[]): UIMessage[] { constant UI_ONLY_PART_TYPES (line 602) | const UI_ONLY_PART_TYPES = new Set(["data-summarization"]); function processChatMessages (line 623) | async function processChatMessages({ FILE: lib/chat/compaction/__tests__/prune-tool-outputs.test.ts function makeAssistantMessage (line 13) | function makeAssistantMessage( function makeUserMessage (line 20) | function makeUserMessage(text: string, id = "user-1"): UIMessage { function makeToolPart (line 24) | function makeToolPart( constant NO_MIN (line 41) | const NO_MIN = 0; function makeAssistantModelMsg (line 813) | function makeAssistantModelMsg( function makeToolModelMsg (line 831) | function makeToolModelMsg( FILE: lib/chat/compaction/prune-tool-outputs.ts constant TOOL_OUTPUT_TOKEN_BUDGET (line 10) | const TOOL_OUTPUT_TOKEN_BUDGET = 40_000; constant PRUNE_MINIMUM_SAVINGS (line 18) | const PRUNE_MINIMUM_SAVINGS = 20_000; constant PROTECTED_TOOLS (line 25) | const PROTECTED_TOOLS = new Set([ constant TOOL_TYPE_PREFIX (line 33) | const TOOL_TYPE_PREFIX = "tool-"; type PruneResult (line 35) | interface PruneResult { type StorageCompactionResult (line 51) | interface StorageCompactionResult { constant STORAGE_MESSAGE_SOFT_LIMIT_BYTES (line 60) | const STORAGE_MESSAGE_SOFT_LIMIT_BYTES = 850 * 1024; constant STORAGE_TOOL_OUTPUT_TOKEN_BUDGET (line 61) | const STORAGE_TOOL_OUTPUT_TOKEN_BUDGET = 20_000; constant STORAGE_REASONING_CHAR_BUDGET (line 62) | const STORAGE_REASONING_CHAR_BUDGET = 32_000; constant STORAGE_REASONING_PART_CHAR_LIMIT (line 63) | const STORAGE_REASONING_PART_CHAR_LIMIT = 8_000; constant STORAGE_COMPACTED_REASONING_PREFIX (line 64) | const STORAGE_COMPACTED_REASONING_PREFIX = type ToolPart (line 71) | interface ToolPart { function compactMessageForStorage (line 266) | function compactMessageForStorage( function pruneToolOutputs (line 355) | function pruneToolOutputs( type ToolResultPart (line 480) | interface ToolResultPart { type ModelPruneResult (line 488) | interface ModelPruneResult { function pruneModelMessages (line 514) | function pruneModelMessages( function filterEmptyAssistantMessages (line 667) | function filterEmptyAssistantMessages>( constant ANTHROPIC_CONTINUE_MESSAGE (line 691) | const ANTHROPIC_CONTINUE_MESSAGE = { type PromptMessage (line 697) | type PromptMessage = Record & { type AnthropicPromptRepairAction (line 702) | type AnthropicPromptRepairAction = type AnthropicPromptRepairReason (line 707) | type AnthropicPromptRepairReason = type AppliedAnthropicPromptRepairReason (line 713) | type AppliedAnthropicPromptRepairReason = Exclude< type AppliedAnthropicPromptRepair (line 718) | interface AppliedAnthropicPromptRepair { type NoAnthropicPromptRepair (line 725) | interface NoAnthropicPromptRepair { type AnthropicPromptRepairTelemetry (line 731) | type AnthropicPromptRepairTelemetry = function repairAnthropicModelMessagesWithTelemetry (line 771) | function repairAnthropicModelMessagesWithTelemetry( function repairAnthropicModelMessages (line 811) | function repairAnthropicModelMessages( FILE: lib/chat/doom-loop-detection.ts constant DOOM_LOOP_WARNING_THRESHOLD (line 13) | const DOOM_LOOP_WARNING_THRESHOLD = 3; constant DOOM_LOOP_HALT_THRESHOLD (line 14) | const DOOM_LOOP_HALT_THRESHOLD = 5; type DoomLoopSeverity (line 16) | type DoomLoopSeverity = "none" | "warning" | "halt"; type DoomLoopResult (line 18) | interface DoomLoopResult { type MinimalToolCall (line 24) | interface MinimalToolCall { type MinimalStep (line 29) | interface MinimalStep { constant COSMETIC_INPUT_FIELDS (line 35) | const COSMETIC_INPUT_FIELDS = new Set(["brief", "explanation"]); function stripCosmeticFields (line 37) | function stripCosmeticFields(input: unknown): unknown { function createStepFingerprint (line 52) | function createStepFingerprint(step: MinimalStep): string { function detectDoomLoop (line 70) | function detectDoomLoop(steps: MinimalStep[]): DoomLoopResult { function generateDoomLoopNudge (line 117) | function generateDoomLoopNudge(result: DoomLoopResult): string { FILE: lib/chat/stop-conditions.ts constant TOKEN_EXHAUSTION_FINISH_REASON (line 7) | const TOKEN_EXHAUSTION_FINISH_REASON = "context-limit"; constant BUDGET_EXHAUSTION_FINISH_REASON (line 9) | const BUDGET_EXHAUSTION_FINISH_REASON = "budget-exhausted"; function tokenExhaustedAfterSummarization (line 11) | function tokenExhaustedAfterSummarization(state: { constant PREEMPTIVE_TIMEOUT_FINISH_REASON (line 28) | const PREEMPTIVE_TIMEOUT_FINISH_REASON = "preemptive-timeout"; constant AGENT_MAX_STREAM_DURATION_MS (line 29) | const AGENT_MAX_STREAM_DURATION_MS = 10 * 60 * 1000; function elapsedTimeExceeds (line 31) | function elapsedTimeExceeds(state: { constant DOOM_LOOP_FINISH_REASON (line 44) | const DOOM_LOOP_FINISH_REASON = "doom-loop"; function doomLoopDetected (line 46) | function doomLoopDetected(state: { FILE: lib/chat/summarization/__tests__/index.test.ts constant THRESHOLD (line 29) | const THRESHOLD = Math.floor( constant TOKENS_PER_ABOVE_MSG (line 33) | const TOKENS_PER_ABOVE_MSG = Math.ceil(THRESHOLD / 4) + 500; FILE: lib/chat/summarization/constants.ts constant MESSAGES_TO_KEEP_UNSUMMARIZED (line 2) | const MESSAGES_TO_KEEP_UNSUMMARIZED = 0; constant SUMMARIZATION_THRESHOLD_PERCENTAGE (line 5) | const SUMMARIZATION_THRESHOLD_PERCENTAGE = 0.9; FILE: lib/chat/summarization/helpers.ts type SummarizationUsage (line 27) | interface SummarizationUsage { type SummarizationResult (line 35) | interface SummarizationResult { FILE: lib/chat/summarization/index.ts type EnsureSandbox (line 34) | type EnsureSandbox = () => Promise; FILE: lib/chat/summarization/prompts.ts constant AGENT_SUMMARIZATION_PROMPT (line 1) | const AGENT_SUMMARIZATION_PROMPT = constant ASK_SUMMARIZATION_PROMPT (line 64) | const ASK_SUMMARIZATION_PROMPT = constant AGENT_RESUME_PREAMBLE (line 89) | const AGENT_RESUME_PREAMBLE = FILE: lib/chat/tool-abort-utils.ts constant ABORTED_TOOL_ERROR_TEXT (line 1) | const ABORTED_TOOL_ERROR_TEXT = function hasMeaningfulToolInput (line 7) | function hasMeaningfulToolInput(input: unknown): boolean { type MessageLike (line 18) | type MessageLike = { function summarizeIncompleteToolParts (line 24) | function summarizeIncompleteToolParts(messages: MessageLike[]) { FILE: lib/constants/s3.ts constant MAX_FILE_SIZE_BYTES (line 20) | const MAX_FILE_SIZE_BYTES = 20 * 1024 * 1024; constant MAX_GENERATED_FILE_SIZE_BYTES (line 23) | const MAX_GENERATED_FILE_SIZE_BYTES = 250 * 1024 * 1024; constant S3_USER_FILES_PREFIX (line 26) | const S3_USER_FILES_PREFIX = "users"; FILE: lib/db/actions.ts constant MAX_DATABASE_ERROR_MESSAGE_LENGTH (line 30) | const MAX_DATABASE_ERROR_MESSAGE_LENGTH = 500; constant LARGE_MESSAGE_SAVE_WARNING_BYTES (line 31) | const LARGE_MESSAGE_SAVE_WARNING_BYTES = 850 * 1024; function getChatById (line 81) | async function getChatById({ id }: { id: string }) { function saveChat (line 93) | async function saveChat({ function saveMessage (line 117) | async function saveMessage({ function handleInitialChatAndUserMessage (line 253) | async function handleInitialChatAndUserMessage({ function updateChat (line 319) | async function updateChat({ function getMessagesByChatId (line 360) | async function getMessagesByChatId({ function getUserCustomization (line 633) | async function getUserCustomization({ userId }: { userId: string }) { function setActiveTriggerRun (line 649) | async function setActiveTriggerRun({ function getActiveTriggerRun (line 673) | async function getActiveTriggerRun({ chatId }: { chatId: string }) { function startStream (line 684) | async function startStream({ function prepareForNewStream (line 703) | async function prepareForNewStream({ chatId }: { chatId: string }) { function getCancellationStatus (line 718) | async function getCancellationStatus({ chatId }: { chatId: string }) { function startTempStream (line 735) | async function startTempStream({ function getTempCancellationStatus (line 753) | async function getTempCancellationStatus({ function deleteTempStreamForBackend (line 771) | async function deleteTempStreamForBackend({ function saveChatSummary (line 789) | async function saveChatSummary({ function getLatestSummary (line 826) | async function getLatestSummary({ chatId }: { chatId: string }) { function createNote (line 846) | async function createNote({ function listNotes (line 880) | async function listNotes({ function updateNote (line 911) | async function updateNote({ function deleteNote (line 945) | async function deleteNote({ function getNotes (line 970) | async function getNotes({ function logUsageRecord (line 990) | async function logUsageRecord({ FILE: lib/db/convex-client.ts function getConvexClient (line 13) | function getConvexClient(): ConvexHttpClient { function setConvexUrl (line 29) | function setConvexUrl(url: string) { FILE: lib/db/convex-value-sanitizer.ts constant MIN_CONVEX_BIGINT (line 15) | const MIN_CONVEX_BIGINT = -BigInt("9223372036854775808"); constant MAX_CONVEX_BIGINT (line 16) | const MAX_CONVEX_BIGINT = BigInt("9223372036854775807"); function sanitizeForConvexValue (line 75) | function sanitizeForConvexValue( FILE: lib/db/message-persistence-diagnostics.ts constant UNKNOWN_PART_TYPE (line 3) | const UNKNOWN_PART_TYPE = "unknown"; function getMessagePersistenceDiagnostics (line 19) | function getMessagePersistenceDiagnostics( FILE: lib/desktop-auth.ts constant TRANSFER_TOKEN_TTL_SECONDS (line 3) | const TRANSFER_TOKEN_TTL_SECONDS = 300; constant OAUTH_STATE_TTL_SECONDS (line 4) | const OAUTH_STATE_TTL_SECONDS = 300; constant TRANSFER_TOKEN_PREFIX (line 5) | const TRANSFER_TOKEN_PREFIX = "desktop-auth-transfer:"; constant OAUTH_STATE_PREFIX (line 6) | const OAUTH_STATE_PREFIX = "desktop-oauth-state:"; constant TOKEN_FORMAT_REGEX (line 7) | const TOKEN_FORMAT_REGEX = /^[a-f0-9]{64}$/; type TransferTokenData (line 9) | type TransferTokenData = { function getRedis (line 15) | function getRedis(): Redis | null { function generateTransferToken (line 29) | function generateTransferToken(): string { function createDesktopTransferToken (line 37) | async function createDesktopTransferToken( function exchangeDesktopTransferToken (line 73) | async function exchangeDesktopTransferToken( type OAuthStateMetadata (line 142) | type OAuthStateMetadata = { function createOAuthState (line 147) | async function createOAuthState( function verifyAndConsumeOAuthState (line 173) | async function verifyAndConsumeOAuthState( FILE: lib/errors.ts type ErrorType (line 1) | type ErrorType = type Surface (line 9) | type Surface = type ErrorCode (line 20) | type ErrorCode = `${ErrorType}:${Surface}`; type ErrorVisibility (line 22) | type ErrorVisibility = "response" | "log" | "none"; class ChatSDKError (line 36) | class ChatSDKError extends Error { method constructor (line 42) | constructor( method toResponse (line 59) | public toResponse() { function getMessageByErrorCode (line 85) | function getMessageByErrorCode(errorCode: ErrorCode): string { function isNetworkStreamError (line 127) | function isNetworkStreamError(error: unknown): boolean { function getStatusCodeByType (line 141) | function getStatusCodeByType(type: ErrorType) { FILE: lib/extra-usage.ts constant EXTRA_USAGE_MULTIPLIER (line 6) | const EXTRA_USAGE_MULTIPLIER = 1.05; type ExtraUsageBalance (line 8) | interface ExtraUsageBalance { type DeductBalanceResult (line 18) | interface DeductBalanceResult { function pointsToDollars (line 45) | function pointsToDollars(points: number): number { function getExtraUsageBalance (line 54) | async function getExtraUsageBalance( type RefundBalanceResult (line 91) | interface RefundBalanceResult { function refundToBalance (line 105) | async function refundToBalance( function deductFromBalance (line 150) | async function deductFromBalance( type TeamExtraUsageState (line 209) | interface TeamExtraUsageState { function getTeamExtraUsageState (line 221) | async function getTeamExtraUsageState( function deductFromTeamBalance (line 253) | async function deductFromTeamBalance( function refundToTeamBalance (line 308) | async function refundToTeamBalance( FILE: lib/logger.ts type ChatWideEvent (line 15) | interface ChatWideEvent { class WideEventBuilder (line 197) | class WideEventBuilder { method constructor (line 203) | constructor( method setRequestDetails (line 222) | setRequestDetails(details: { method setAssistantId (line 236) | setAssistantId(assistantId: string): this { method setUser (line 244) | setUser(user: { id: string; subscription: string }): this { method setChat (line 252) | setChat(chat: { method setExtraUsage (line 274) | setExtraUsage(config: ExtraUsageConfig | undefined): this { method setRateLimit (line 289) | setRateLimit(info: { method setModel (line 307) | setModel(configured: string): this { method setActualModel (line 315) | setActualModel(actual: string): this { method recordModelFallback (line 327) | recordModelFallback(fallback: { served: string; chain: string[] }): th... method recordAnthropicPromptRepair (line 340) | recordAnthropicPromptRepair(repair: { method startStream (line 364) | startStream(): this { method setSandbox (line 372) | setSandbox(info: ChatWideEvent["sandbox"]): this { method setSandboxBoot (line 381) | setSandboxBoot(boot: NonNullable): this { method setCaidoReady (line 392) | setCaidoReady(caido: NonNullable): this { method recordToolCall (line 402) | recordToolCall(name: string, sandboxType?: string): this { method getToolCalls (line 410) | getToolCalls(): Array<{ name: string; sandbox_type?: string }> { method setStreamResult (line 417) | setStreamResult(result: { method addToolCost (line 438) | addToolCost(costDollars: number): this { method setUsage (line 446) | setUsage(usage: Record | undefined): this { method setCacheMetrics (line 471) | setCacheMetrics(metrics: { method setSuccess (line 517) | setSuccess(): this { method setAborted (line 526) | setAborted(): this { method markProviderError (line 536) | markProviderError(details: { method setError (line 559) | setError(error: { method build (line 584) | build(): ChatWideEvent { method info (line 638) | info(event: ChatWideEvent): void { method warn (line 647) | warn(message: string, context?: Record): void { method error (line 661) | error( function createWideEventBuilder (line 687) | function createWideEventBuilder( FILE: lib/moderation.ts constant MODERATION_TOKEN_LIMIT (line 4) | const MODERATION_TOKEN_LIMIT = 512; function getModerationResult (line 6) | async function getModerationResult( function findTargetMessage (line 65) | function findTargetMessage(messages: any[], minLength: number): any | nu... function createCombinedMessage (line 109) | function createCombinedMessage(messages: any[]): any { function prepareInput (line 129) | function prepareInput(message: any): string { function truncateByTokens (line 146) | function truncateByTokens(content: string): string { function calculateModerationLevel (line 160) | function calculateModerationLevel( function determineShouldUncensorResponse (line 171) | function determineShouldUncensorResponse( FILE: lib/posthog/server.ts function getClient (line 6) | function getClient(): PostHog | null { type LogFields (line 13) | type LogFields = Record & { type EventFields (line 18) | type EventFields = Record & { function distinctIdFor (line 23) | function distinctIdFor(userId: unknown): string { method error (line 28) | error(message: string, fields: LogFields = {}) { method warn (line 46) | warn(message: string, fields: LogFields = {}) { method info (line 64) | info(message: string, fields: LogFields = {}) { method event (line 82) | event(name: string, fields: EventFields = {}) { method flush (line 97) | async flush(): Promise { FILE: lib/posthog/worker.ts function createRetryLogger (line 10) | function createRetryLogger( FILE: lib/pricing/features.ts constant PRICING (line 8) | const PRICING = { type PricingTier (line 27) | type PricingTier = keyof typeof PRICING; type PricingFeature (line 29) | type PricingFeature = { constant PLAN_HEADERS (line 34) | const PLAN_HEADERS = { FILE: lib/rate-limit/refund.ts class UsageRefundTracker (line 8) | class UsageRefundTracker { method setUser (line 19) | setUser( method recordDeductions (line 32) | recordDeductions(rateLimitInfo: RateLimitInfo): void { method hasDeductions (line 40) | hasDeductions(): boolean { method refund (line 48) | async refund(): Promise { FILE: lib/rate-limit/token-bucket.ts constant MODEL_PRICING_MAP (line 22) | const MODEL_PRICING_MAP: Record = { constant TEAM_CREDITS (line 752) | const TEAM_CREDITS = MONTHLY_CREDITS["team"] ?? 0; FILE: lib/suspensionMessage.ts function getSuspensionMessage (line 13) | function getSuspensionMessage(blockedReason?: string | null): string { function mapBlockedReasonToLabel (line 18) | function mapBlockedReasonToLabel(blockedReason?: string | null): string { FILE: lib/suspensions.ts function getActiveSuspensionForUser (line 10) | async function getActiveSuspensionForUser(userId: string) { function assertUserCanMakeCostIncurringRequest (line 17) | async function assertUserCanMakeCostIncurringRequest(userId: string) { FILE: lib/system-prompt.ts constant DATE_FORMAT_OPTIONS (line 14) | const DATE_FORMAT_OPTIONS: Intl.DateTimeFormatOptions = { constant LANGUAGE_SECTION (line 24) | const LANGUAGE_SECTION = ` constant PREINSTALLED_PENTESTING_TOOLS (line 32) | const PREINSTALLED_PENTESTING_TOOLS = `Pre-installed Pentesting Tools: FILE: lib/system-prompt/notes.ts type Note (line 1) | interface Note { FILE: lib/system-prompt/personality.ts constant PERSONALITY_INSTRUCTIONS (line 4) | const PERSONALITY_INSTRUCTIONS: Record = { FILE: lib/token-utils.ts constant MAX_TOKENS_FREE (line 6) | const MAX_TOKENS_FREE = 32000; constant MAX_TOKENS_PAID (line 7) | const MAX_TOKENS_PAID = 200000; constant FILE_TOKEN_PERCENT (line 12) | const FILE_TOKEN_PERCENT = 0.5; constant STREAM_MAX_TOKENS (line 35) | const STREAM_MAX_TOKENS = 4096; constant TOOL_DEFAULT_MAX_TOKENS (line 36) | const TOOL_DEFAULT_MAX_TOKENS = 4096; constant TRUNCATION_MESSAGE (line 39) | const TRUNCATION_MESSAGE = constant FILE_READ_TRUNCATION_MESSAGE (line 41) | const FILE_READ_TRUNCATION_MESSAGE = function truncateOutput (line 211) | function truncateOutput(args: { FILE: lib/usage-projection.ts type DailyUsage (line 5) | interface DailyUsage { type UsageProjection (line 10) | interface UsageProjection { function calculateUsageProjection (line 26) | function calculateUsageProjection( FILE: lib/usage-tracker.ts type StepUsage (line 5) | interface StepUsage { class UsageTracker (line 20) | class UsageTracker { method resetModelLeg (line 42) | resetModelLeg() { method accumulateStep (line 56) | accumulateStep(usage: StepUsage) { method streamOutputTokens (line 71) | get streamOutputTokens(): number { method hasCacheData (line 76) | get hasCacheData(): boolean { method cacheHitRate (line 81) | get cacheHitRate(): number | null { method hasUsage (line 87) | get hasUsage(): boolean { method computeModelCostDollars (line 93) | computeModelCostDollars(selectedModel: string): number { method computeCostDollars (line 108) | computeCostDollars(selectedModel: string): number { method resolveUsageType (line 117) | resolveUsageType(rateLimitInfo: RateLimitInfo): "included" | "extra" { method resolveModelName (line 124) | resolveModelName({ method log (line 141) | log({ FILE: lib/utils.ts type MessageRecord (line 8) | interface MessageRecord { function cn (line 26) | function cn(...inputs: ClassValue[]) { function fetchWithErrorHandlers (line 30) | async function fetchWithErrorHandlers( function convertToUIMessages (line 52) | function convertToUIMessages(messages: MessageRecord[]): ChatMessage[] { FILE: lib/utils/__tests__/client-storage.test.ts constant STORAGE_KEY (line 10) | const STORAGE_KEY = "selected_model"; constant LEGACY_ASK_KEY (line 11) | const LEGACY_ASK_KEY = `${STORAGE_KEY}_ask`; constant LEGACY_AGENT_KEY (line 12) | const LEGACY_AGENT_KEY = `${STORAGE_KEY}_agent`; FILE: lib/utils/accumulate-ui-chunks.ts function accumulateChunksToMessage (line 9) | function accumulateChunksToMessage( FILE: lib/utils/client-storage.ts type ConversationDraft (line 8) | type ConversationDraft = { type ConversationDraftStore (line 14) | type ConversationDraftStore = { constant CONVERSATION_DRAFTS_STORAGE_KEY (line 19) | const CONVERSATION_DRAFTS_STORAGE_KEY = "conversation_drafts"; constant NULL_THREAD_DRAFT_ID (line 20) | const NULL_THREAD_DRAFT_ID = "null_thread"; constant CHAT_MODE_STORAGE_KEY (line 21) | const CHAT_MODE_STORAGE_KEY = "chat_mode"; constant HAS_AUTHENTICATED_BEFORE_STORAGE_KEY (line 22) | const HAS_AUTHENTICATED_BEFORE_STORAGE_KEY = "hackerai_has_authed_before"; constant SELECTED_MODEL_STORAGE_KEY (line 23) | const SELECTED_MODEL_STORAGE_KEY = "selected_model"; FILE: lib/utils/error-utils.ts constant SENSITIVE_KEYS (line 22) | const SENSITIVE_KEYS = new Set([ type ProviderAttempt (line 116) | interface ProviderAttempt { constant REQUEST_ID_HEADERS (line 123) | const REQUEST_ID_HEADERS = [ function getStatusSummary (line 249) | function getStatusSummary(statusCode: number | undefined): string { function extractProviderDetails (line 273) | function extractProviderDetails(error: unknown): { function extractStatusCode (line 316) | function extractStatusCode(error: unknown): number | undefined { function extractMessageFromResponseBody (line 349) | function extractMessageFromResponseBody(body: string): string | undefined { function truncate (line 366) | function truncate(str: string, max: number): string { FILE: lib/utils/file-download.ts type DownloadFileOptions (line 11) | interface DownloadFileOptions { function downloadFile (line 28) | async function downloadFile({ FILE: lib/utils/file-transform-utils.ts constant MAX_PROVIDER_IMAGE_DOWNLOAD_SIZE (line 17) | const MAX_PROVIDER_IMAGE_DOWNLOAD_SIZE = 30 * 1024 * 1024; type FileToProcess (line 19) | type FileToProcess = { type SizeProbeResult (line 26) | type SizeProbeResult = { FILE: lib/utils/file-utils.ts type RateLimitInfo (line 9) | type RateLimitInfo = { type UploadUrlResult (line 16) | type UploadUrlResult = { constant MAX_FILE_SIZE (line 22) | const MAX_FILE_SIZE = 10 * 1024 * 1024; constant MAX_IMAGE_SIZE (line 29) | const MAX_IMAGE_SIZE = 5 * 1024 * 1024; constant ASK_MODE_MAX_FILES_LIMIT (line 32) | const ASK_MODE_MAX_FILES_LIMIT = 10; constant AGENT_MODE_MAX_FILES_LIMIT (line 35) | const AGENT_MODE_MAX_FILES_LIMIT = 20; constant MAX_FILES_LIMIT (line 38) | const MAX_FILES_LIMIT = AGENT_MODE_MAX_FILES_LIMIT; function getMaxFilesLimitForMode (line 40) | function getMaxFilesLimitForMode(mode: ChatMode): number { constant SUPPORTED_IMAGE_TYPES (line 47) | const SUPPORTED_IMAGE_TYPES = new Set([ function isSupportedImageMediaType (line 58) | function isSupportedImageMediaType(mediaType: string): boolean { function isImageFile (line 65) | function isImageFile(file: File | LocalDesktopFile): boolean { function validateFile (line 72) | function validateFile(file: File | LocalDesktopFile): { function validateImageFile (line 95) | async function validateImageFile( function createFileMessagePartFromUploadedFile (line 140) | function createFileMessagePartFromUploadedFile( function formatFileSize (line 180) | function formatFileSize(bytes: number): string { function fileToBase64 (line 193) | function fileToBase64(file: File): Promise { FILE: lib/utils/message-processor.ts type BaseToolPart (line 36) | interface BaseToolPart { type TerminalToolPart (line 46) | interface TerminalToolPart extends BaseToolPart { type DataPart (line 76) | interface DataPart { FILE: lib/utils/message-utils.ts type MessagePart (line 5) | interface MessagePart { type WebSource (line 47) | type WebSource = { FILE: lib/utils/parse-rate-limit-warning.ts constant WARNING_TYPES (line 4) | const WARNING_TYPES = [ type RawWarningType (line 9) | type RawWarningType = (typeof WARNING_TYPES)[number]; constant BUCKET_TYPES (line 11) | const BUCKET_TYPES = ["monthly"] as const; type RawBucketType (line 12) | type RawBucketType = (typeof BUCKET_TYPES)[number]; function isString (line 14) | function isString(v: unknown): v is string { function isNumber (line 17) | function isNumber(v: unknown): v is number { type ParseRateLimitWarningOptions (line 21) | interface ParseRateLimitWarningOptions { constant EXTRA_USAGE_STORAGE_KEY_PREFIX (line 26) | const EXTRA_USAGE_STORAGE_KEY_PREFIX = "extraUsageWarningShownUntil_"; constant TOKEN_BUCKET_WARNING_KEY_PREFIX (line 27) | const TOKEN_BUCKET_WARNING_KEY_PREFIX = "tokenBucketWarningShownAt_"; constant SEVERITY_DEDUP_HOURS (line 30) | const SEVERITY_DEDUP_HOURS: Record = { function parseRateLimitWarning (line 42) | function parseRateLimitWarning( FILE: lib/utils/pro-max-notice-cookie.ts constant COOKIE_NAME (line 1) | const COOKIE_NAME = "hackerai_pro_max_usage_ack"; constant MAX_AGE_SEC (line 4) | const MAX_AGE_SEC = 60 * 60 * 24 * 365 * 5; FILE: lib/utils/redis-pubsub.ts type RedisClient (line 4) | type RedisClient = ReturnType; FILE: lib/utils/safe-wait-until.ts function safeWaitUntil (line 10) | function safeWaitUntil(promise: Promise) { FILE: lib/utils/sandbox-command.ts constant PRODUCTION_CONVEX_URL (line 2) | const PRODUCTION_CONVEX_URL = "https://convex.haiusercontent.com"; FILE: lib/utils/sandbox-file-utils.ts type SandboxFile (line 7) | type SandboxFile = { FILE: lib/utils/scroll-events.ts constant STICKY_BOTTOM_ESCAPE_EVENT (line 1) | const STICKY_BOTTOM_ESCAPE_EVENT = "hackerai:escape-sticky-bottom"; FILE: lib/utils/settings-dialog.ts constant EVENT_NAME (line 1) | const EVENT_NAME = "open-settings-dialog"; type OpenSettingsDetail (line 3) | interface OpenSettingsDetail { function openSettingsDialog (line 8) | function openSettingsDialog(tab?: string) { function onOpenSettingsDialog (line 15) | function onOpenSettingsDialog( FILE: lib/utils/shiki.tsx constant SUPPORTED_LANGUAGES (line 5) | const SUPPORTED_LANGUAGES = new Set( type ShikiBoundaryProps (line 14) | interface ShikiBoundaryProps { type ShikiBoundaryState (line 19) | interface ShikiBoundaryState { class ShikiErrorBoundary (line 23) | class ShikiErrorBoundary extends Component< method getDerivedStateFromError (line 29) | static getDerivedStateFromError(error: Error) { method componentDidCatch (line 34) | componentDidCatch(error: Error) { method render (line 41) | render() { FILE: lib/utils/sidebar-storage.ts constant STORAGE_KEYS (line 7) | const STORAGE_KEYS = { type StorageKey (line 12) | type StorageKey = (typeof STORAGE_KEYS)[keyof typeof STORAGE_KEYS]; FILE: lib/utils/sidebar-utils.ts type MessagePart (line 13) | interface MessagePart { type Message (line 22) | interface Message { constant STREAMS_DURING_INPUT (line 32) | const STREAMS_DURING_INPUT = new Set(["tool-file"]); function extractSidebarContentFromMessage (line 38) | function extractSidebarContentFromMessage( function extractAllSidebarContent (line 675) | function extractAllSidebarContent( FILE: lib/utils/stream-cancellation.ts type RedisClient (line 13) | type RedisClient = ReturnType; type PollOptions (line 15) | type PollOptions = { type ApiEndpoint (line 23) | type ApiEndpoint = "/api/chat" | "/api/agent" | "/api/chat/[id]/stream"; type PreemptiveTimeoutOptions (line 25) | type PreemptiveTimeoutOptions = { type CancellationSubscriberResult (line 32) | type CancellationSubscriberResult = { FILE: lib/utils/stream-writer-utils.ts type RateLimitWarningData (line 96) | type RateLimitWarningData = FILE: lib/utils/terminal-executor.ts type TerminalResult (line 11) | type TerminalResult = { constant MAX_FULL_OUTPUT_CHARS (line 20) | const MAX_FULL_OUTPUT_CHARS = 5 * 1024 * 1024; function truncateTerminalOutput (line 131) | function truncateTerminalOutput(output: string): TerminalResult { FILE: lib/utils/todo-block-manager.ts type TodoBlockState (line 5) | interface TodoBlockState { type TodoBlockManager (line 10) | interface TodoBlockManager { FILE: lib/utils/todo-utils.ts type TodoLike (line 60) | type TodoLike = { FILE: middleware.ts constant UNAUTHENTICATED_PATHS (line 5) | const UNAUTHENTICATED_PATHS = new Set([ function getRedirectUri (line 25) | function getRedirectUri(): string | undefined { function isDesktopApp (line 32) | function isDesktopApp(request: NextRequest): boolean { function isUnauthenticatedPath (line 37) | function isUnauthenticatedPath(pathname: string): boolean { function isBrowserRequest (line 47) | function isBrowserRequest(request: NextRequest): boolean { constant SESSION_HEADER (line 52) | const SESSION_HEADER = "x-workos-session"; function middleware (line 54) | async function middleware( function buildRequestHeaders (line 138) | function buildRequestHeaders( function buildResponseHeaders (line 151) | function buildResponseHeaders(authkitHeaders: Headers): Headers { FILE: packages/desktop/scripts/build.js constant APP_URL (line 5) | const APP_URL = process.env.APP_URL || "https://hackerai.co"; FILE: packages/desktop/scripts/generate-icons.mjs function createIcon (line 10) | async function createIcon(svgBuffer, size, filename) { function createIcns (line 18) | async function createIcns(svgBuffer) { function createIco (line 41) | async function createIco(svgBuffer) { function main (line 49) | async function main() { FILE: packages/desktop/src-tauri/build.rs function main (line 1) | fn main() { FILE: packages/desktop/src-tauri/src/lib.rs constant UPDATE_CHECK_INTERVAL (line 14) | const UPDATE_CHECK_INTERVAL: Duration = Duration::from_secs(24 * 60 * 60); function get_dev_auth_port (line 27) | fn get_dev_auth_port() -> u16 { function get_cmd_server_info (line 33) | fn get_cmd_server_info() -> CmdServerInfo { type CmdServerInfo (line 41) | struct CmdServerInfo { type LocalFileMetadata (line 48) | struct LocalFileMetadata { type LocalFileData (line 58) | struct LocalFileData { function json_error_body (line 67) | fn json_error_body(message: &str) -> String { function json_stream_error_line (line 72) | fn json_stream_error_line(message: &str) -> String { function guess_media_type (line 80) | fn guess_media_type(path: &std::path::Path) -> String { function get_local_file_metadata (line 111) | fn get_local_file_metadata(path: String) -> Result Result { type ExecRequest (line 159) | struct ExecRequest { function default_timeout (line 167) | fn default_timeout() -> u64 { type ExecResponse (line 172) | struct ExecResponse { function wait_with_output_or_kill_on_timeout (line 178) | async fn wait_with_output_or_kill_on_timeout( type FileReadRequest (line 262) | struct FileReadRequest { type FileWriteRequest (line 267) | struct FileWriteRequest { type FileRemoveRequest (line 275) | struct FileRemoveRequest { type FileListRequest (line 280) | struct FileListRequest { function start_cmd_server (line 286) | async fn start_cmd_server() { constant MAX_HEADER_SIZE (line 334) | const MAX_HEADER_SIZE: usize = 256 * 1024; constant MAX_BODY_SIZE (line 337) | const MAX_BODY_SIZE: usize = 10 * 1024 * 1024; function parse_http_request (line 340) | async fn parse_http_request( function handle_cmd_request (line 439) | async fn handle_cmd_request( function handle_execute (line 509) | async fn handle_execute(body: &str) -> Result { function handle_execute_stream (line 558) | async fn handle_execute_stream( function write_chunk (line 662) | async fn write_chunk(stream: &mut tokio::net::TcpStream, data: &str) { function handle_file_read (line 673) | async fn handle_file_read(body: &str) -> Result { function handle_file_write (line 682) | async fn handle_file_write(body: &str) -> Result { function handle_file_remove (line 710) | async fn handle_file_remove(body: &str) -> Result { function handle_file_list (line 728) | async fn handle_file_list(body: &str) -> Result { type StreamEvent (line 752) | enum StreamEvent { type StreamCommandState (line 770) | type StreamCommandState = std::sync::Arc Option { function should_check_for_updates (line 1049) | fn should_check_for_updates(app: &tauri::AppHandle) -> bool { function save_update_check_timestamp (line 1067) | fn save_update_check_timestamp(app: &tauri::AppHandle) { function get_allowed_hosts (line 1086) | fn get_allowed_hosts() -> Vec { function is_valid_token_format (line 1093) | fn is_valid_token_format(token: &str) -> bool { function validate_origin (line 1097) | fn validate_origin(origin: &str) -> bool { function handle_auth_deep_link (line 1111) | fn handle_auth_deep_link(app: &tauri::AppHandle, url: &url::Url) { function check_for_updates (line 1177) | async fn check_for_updates(app: tauri::AppHandle, silent: bool) { type PtyState (line 1273) | type PtyState = std::sync::Arc>; function execute_pty_create (line 1276) | async fn execute_pty_create( function execute_pty_input (line 1291) | async fn execute_pty_input( function execute_pty_resize (line 1301) | async fn execute_pty_resize( function execute_pty_kill (line 1312) | async fn execute_pty_kill( function run (line 1321) | pub fn run() { FILE: packages/desktop/src-tauri/src/main.rs function main (line 7) | fn main() { FILE: packages/desktop/src-tauri/src/platform.rs function is_executable (line 3) | fn is_executable(path: &std::path::Path) -> bool { type ShellConfig (line 11) | pub struct ShellConfig { function get_shell_config (line 29) | pub fn get_shell_config() -> ShellConfig { function find_git_bash (line 81) | fn find_git_bash() -> Option { function build_command (line 125) | pub fn build_command( function graceful_kill (line 183) | pub async fn graceful_kill(child: &mut tokio::process::Child) { function terminate_process_group (line 215) | fn terminate_process_group(pid: u32, signal: libc::c_int) { function cancel_process_tree (line 228) | pub async fn cancel_process_tree(pid: u32) { FILE: packages/desktop/src-tauri/src/pty.rs constant OUTPUT_BUFFER_MAX_BYTES (line 11) | const OUTPUT_BUFFER_MAX_BYTES: usize = 32 * 1024; type PtySession (line 13) | struct PtySession { type PtyManager (line 20) | pub struct PtyManager { method new (line 31) | pub fn new() -> Self { method create (line 37) | pub fn create( method send_input (line 129) | pub fn send_input(&mut self, session_id: &str, data: &str) -> Result<(... method resize (line 148) | pub fn resize(&mut self, session_id: &str, cols: u16, rows: u16) -> Re... method kill (line 167) | pub fn kill(&mut self, session_id: &str) -> Result<(), String> { method stop_all (line 187) | pub fn stop_all(&mut self) { type PtyCreateResult (line 25) | pub struct PtyCreateResult { function pty_reader_thread (line 197) | fn pty_reader_thread( function session_not_found_err (line 249) | fn session_not_found_err(id: &str) -> String { function flush_buffer (line 253) | fn flush_buffer(on_data: &Channel, buf: &mut Vec) { function send_exit (line 262) | fn send_exit(on_data: &Channel, exit_code: i32, session_id: &str) { function get_default_shell (line 273) | fn get_default_shell() -> String { function get_shell_exec_flag (line 279) | fn get_shell_exec_flag(shell: &str) -> &'static str { FILE: packages/local/src/index.ts constant DEFAULT_SHELL (line 32) | const DEFAULT_SHELL = getDefaultShell(os.platform()); constant IDLE_TIMEOUT_MS (line 35) | const IDLE_TIMEOUT_MS = 60 * 60 * 1000; constant IDLE_CHECK_INTERVAL_MS (line 38) | const IDLE_CHECK_INTERVAL_MS = 5 * 60 * 1000; type ShellCommandResult (line 40) | interface ShellCommandResult { function runShellCommand (line 50) | function runShellCommand( constant PRODUCTION_CONVEX_URL (line 141) | const PRODUCTION_CONVEX_URL = "https://convex.haiusercontent.com"; type Config (line 163) | interface Config { type OsInfo (line 169) | interface OsInfo { type CentrifugoCommandMessage (line 176) | interface CentrifugoCommandMessage { type CentrifugoCommandCancelMessage (line 188) | interface CentrifugoCommandCancelMessage { type CentrifugoStdoutMessage (line 194) | interface CentrifugoStdoutMessage { type CentrifugoStderrMessage (line 200) | interface CentrifugoStderrMessage { type CentrifugoExitMessage (line 206) | interface CentrifugoExitMessage { type CentrifugoErrorMessage (line 213) | interface CentrifugoErrorMessage { type PtyCreateMessage (line 221) | interface PtyCreateMessage { type PtyInputMessage (line 232) | interface PtyInputMessage { type PtyResizeMessage (line 239) | interface PtyResizeMessage { type PtyKillMessage (line 247) | interface PtyKillMessage { type CentrifugoPtyIncomingMessage (line 254) | type CentrifugoPtyIncomingMessage = type CentrifugoPtyReadyMessage (line 262) | interface CentrifugoPtyReadyMessage { type CentrifugoPtyDataMessage (line 268) | interface CentrifugoPtyDataMessage { type CentrifugoPtyExitMessage (line 274) | interface CentrifugoPtyExitMessage { type CentrifugoPtyErrorMessage (line 280) | interface CentrifugoPtyErrorMessage { type CentrifugoOutgoingMessage (line 286) | type CentrifugoOutgoingMessage = type ConnectResult (line 296) | interface ConnectResult { type RefreshTokenResult (line 305) | type RefreshTokenResult = function isInvalidTokenError (line 332) | function isInvalidTokenError(error: unknown): boolean { class LocalSandboxClient (line 339) | class LocalSandboxClient { method constructor (line 351) | constructor(private config: Config) { method setupProcessRunnerListeners (line 358) | private setupProcessRunnerListeners(): void { method start (line 408) | async start(): Promise { method getOsInfo (line 418) | private getOsInfo(): OsInfo { method connect (line 427) | private async connect(): Promise { method setupCentrifugo (line 474) | private setupCentrifugo(wsUrl: string, initialToken: string): void { method publishToChannel (line 640) | private async publishToChannel( method handleCommand (line 656) | private async handleCommand(msg: CentrifugoCommandMessage): Promise { method handlePtyCreate (line 962) | private async handlePtyCreate(msg: PtyCreateMessage): Promise { method handlePtyInput (line 1002) | private handlePtyInput(msg: PtyInputMessage): void { method handlePtyResize (line 1010) | private handlePtyResize(msg: PtyResizeMessage): void { method handlePtyKill (line 1020) | private handlePtyKill(msg: PtyKillMessage): void { method startIdleCheck (line 1033) | private startIdleCheck(): void { method stopIdleCheck (line 1049) | private stopIdleCheck(): void { method cleanup (line 1056) | async cleanup(): Promise { FILE: packages/local/src/process-runner.ts type ProcessRunOptions (line 11) | interface ProcessRunOptions { type ProcessRunResult (line 18) | interface ProcessRunResult { type ProcessRunnerEvents (line 22) | interface ProcessRunnerEvents { constant FLUSH_INTERVAL_MS (line 32) | const FLUSH_INTERVAL_MS = 16; constant FLUSH_THRESHOLD_BYTES (line 33) | const FLUSH_THRESHOLD_BYTES = 32 * 1024; constant SIGTERM_GRACE_MS (line 34) | const SIGTERM_GRACE_MS = 5_000; class ProcessRunner (line 40) | class ProcessRunner { method constructor (line 50) | constructor() { method on (line 59) | on( method run (line 70) | run( method write (line 122) | write(sessionId: string, data: string): boolean { method resize (line 131) | resize(sessionId: string, cols: number, rows: number): boolean { method stop (line 140) | stop(sessionId: string, _signal?: string): boolean { method stopAll (line 160) | stopAll(): void { method isRunning (line 166) | isRunning(sessionId: string): boolean { method dispose (line 170) | dispose(): void { method emit (line 186) | private emit( method flush (line 198) | private flush(sessionId: string): void { method flushAll (line 207) | private flushAll(): void { method clearKillTimer (line 213) | private clearKillTimer(sessionId: string): void { FILE: packages/local/src/utils.ts constant MAX_OUTPUT_SIZE (line 11) | const MAX_OUTPUT_SIZE = 12288; constant TRUNCATION_MARKER (line 14) | const TRUNCATION_MARKER = function truncateOutput (line 21) | function truncateOutput( type ShellConfig (line 40) | interface ShellConfig { function getDefaultShell (line 50) | function getDefaultShell(platform: string): ShellConfig { function findGitBash (line 72) | function findGitBash(): string | null { function buildShellSpawn (line 109) | function buildShellSpawn( FILE: scripts/accept-invitation.ts function acceptInvitationForUser (line 23) | async function acceptInvitationForUser(email: string) { FILE: scripts/attach-failing-card.ts function attachFailingCard (line 48) | async function attachFailingCard(customerEmail: string) { FILE: scripts/check-openrouter-gen-id.ts constant VALID_SLUG (line 27) | const VALID_SLUG = "google/gemini-3-flash-preview"; constant INVALID_SLUG (line 28) | const INVALID_SLUG = "anthropic/this-model-does-not-exist-please-fail"; function classify (line 30) | function classify(id: string | undefined): string { function probeSuccess (line 40) | async function probeSuccess(openrouter: ReturnType { function resetRateLimitForUser (line 59) | async function resetRateLimitForUser( function resetAllTestUsers (line 120) | async function resetAllTestUsers(): Promise { function main (line 132) | async function main() { FILE: scripts/setup.ts function question (line 11) | function question(query: string): Promise { function getOpenRouterApiKey (line 25) | async function getOpenRouterApiKey(): Promise { function getOpenAiApiKey (line 42) | async function getOpenAiApiKey(): Promise { function getXaiApiKey (line 59) | async function getXaiApiKey(): Promise { function getE2bApiKey (line 74) | async function getE2bApiKey(): Promise { function getWorkOSApiKey (line 92) | async function getWorkOSApiKey(): Promise { function getWorkOSClientId (line 110) | async function getWorkOSClientId(): Promise { function generateWorkOSCookiePassword (line 118) | function generateWorkOSCookiePassword(): string { function generateConvexServiceRoleKey (line 126) | function generateConvexServiceRoleKey(): string { function configureWorkOSDashboard (line 132) | async function configureWorkOSDashboard() { function configureConvexDashboard (line 145) | async function configureConvexDashboard( function writeEnvFile (line 168) | async function writeEnvFile(envVars: Record) { function setupConvex (line 287) | async function setupConvex(): Promise<{ function main (line 401) | async function main() { FILE: scripts/test-users-config.ts type TestUserTier (line 8) | type TestUserTier = "free" | "pro" | "ultra"; type TestUser (line 10) | interface TestUser { constant DEFAULTS (line 16) | const DEFAULTS = { function getTestUsers (line 34) | function getTestUsers(): TestUser[] { function getTestUsersRecord (line 57) | function getTestUsersRecord(): Record { FILE: scripts/validate-s3-security.ts type ValidationResult (line 34) | interface ValidationResult { function logResult (line 46) | function logResult(result: ValidationResult): void { function validateEnvironmentVariables (line 59) | function validateEnvironmentVariables(): ValidationResult { function validateS3Client (line 96) | async function validateS3Client(): Promise { function validateBucketEncryption (line 133) | async function validateBucketEncryption(): Promise { function validatePublicAccessBlock (line 198) | async function validatePublicAccessBlock(): Promise { function validateCorsConfiguration (line 263) | async function validateCorsConfiguration(): Promise { function validatePresignedUploadUrl (line 339) | async function validatePresignedUploadUrl(): Promise { function validatePresignedDownloadUrl (line 395) | async function validatePresignedDownloadUrl(): Promise { function validateIamPermissions (line 450) | function validateIamPermissions(): ValidationResult { function main (line 465) | async function main() { FILE: scripts/verify-email.ts function verifyUserEmail (line 28) | async function verifyUserEmail(email: string) { FILE: scripts/verify-test-users.ts function verifyTestUsers (line 15) | async function verifyTestUsers() { FILE: trigger/agent-long.ts constant AGENT_LONG_MAX_DURATION_MS (line 101) | const AGENT_LONG_MAX_DURATION_MS = 58 * 60 * 1000; type AgentLongUiStreamPart (line 103) | type AgentLongUiStreamPart = Parameters[0]; constant MAX_TRIGGER_ERROR_MESSAGE_LENGTH (line 105) | const MAX_TRIGGER_ERROR_MESSAGE_LENGTH = 500; constant OPERATIONAL_RATE_LIMIT_CAUSE_PATTERNS (line 131) | const OPERATIONAL_RATE_LIMIT_CAUSE_PATTERNS = [ type AgentLongErrorSummary (line 137) | type AgentLongErrorSummary = { method start (line 319) | start(controller) { method cancel (line 385) | cancel(reason) { type RunCleanupState (line 393) | type RunCleanupState = { type AgentLongPayload (line 400) | type AgentLongPayload = { FILE: trigger/stream-ids.ts constant AGENT_UI_STREAM_ID (line 3) | const AGENT_UI_STREAM_ID = "ui" as const; FILE: types/agent.ts type AnySandbox (line 13) | type AnySandbox = Sandbox | CentrifugoSandbox; type IsE2BSandboxFn (line 16) | type IsE2BSandboxFn = (s: AnySandbox | null) => s is Sandbox; type SandboxType (line 18) | type SandboxType = "e2b" | "desktop" | "remote-connection"; type SandboxInfo (line 20) | interface SandboxInfo { type SandboxManager (line 25) | interface SandboxManager { type SandboxBootInfo (line 42) | interface SandboxBootInfo { type CaidoErrorKind (line 53) | type CaidoErrorKind = type CaidoReadyInfo (line 61) | interface CaidoReadyInfo { type SandboxContext (line 85) | interface SandboxContext { type AppendMetadataStreamFn (line 93) | type AppendMetadataStreamFn = (event: { type ToolContext (line 98) | interface ToolContext { FILE: types/chat.ts type ChatMode (line 6) | type ChatMode = "agent" | "ask"; constant CHAT_MODES (line 8) | const CHAT_MODES: readonly ChatMode[] = ["agent", "ask"]; function isChatMode (line 10) | function isChatMode(value: string | null): value is ChatMode { type SelectedModel (line 14) | type SelectedModel = constant SELECTABLE_MODELS (line 20) | const SELECTABLE_MODELS: readonly SelectedModel[] = [ constant LEGACY_MODEL_ID_MAP (line 35) | const LEGACY_MODEL_ID_MAP: Record = { function coerceSelectedModel (line 53) | function coerceSelectedModel( function isSelectedModel (line 69) | function isSelectedModel(value: string | null): value is SelectedModel { type SubscriptionTier (line 75) | type SubscriptionTier = "free" | "pro" | "pro-plus" | "ultra" | "team"; constant SUBSCRIPTION_TIERS (line 77) | const SUBSCRIPTION_TIERS: readonly SubscriptionTier[] = [ function isSubscriptionTier (line 85) | function isSubscriptionTier(value: unknown): value is SubscriptionTier { type SidebarFile (line 92) | interface SidebarFile { type SidebarTerminal (line 118) | interface SidebarTerminal { type SidebarProxy (line 137) | interface SidebarProxy { type WebSearchResult (line 146) | interface WebSearchResult { type SidebarWebSearch (line 154) | interface SidebarWebSearch { constant VALID_NOTE_CATEGORIES (line 161) | const VALID_NOTE_CATEGORIES = [ type NoteCategory (line 169) | type NoteCategory = (typeof VALID_NOTE_CATEGORIES)[number]; type SidebarNote (line 171) | interface SidebarNote { type SidebarNotes (line 180) | interface SidebarNotes { type SidebarSharedFiles (line 206) | interface SidebarSharedFiles { type SidebarContent (line 219) | type SidebarContent = type Todo (line 263) | interface Todo { type TodoBlockProps (line 270) | interface TodoBlockProps { type TodoWriteInput (line 277) | interface TodoWriteInput { type ChatStatus (line 282) | type ChatStatus = "submitted" | "streaming" | "ready" | "error"; type MessageMetadata (line 292) | type MessageMetadata = z.infer; type ChatMessage (line 294) | type ChatMessage = UIMessage & { type RateLimitInfo (line 299) | type RateLimitInfo = { type ExtraUsageConfig (line 313) | interface ExtraUsageConfig { type QueuedMessage (line 323) | interface QueuedMessage { type QueueBehavior (line 330) | type QueueBehavior = "queue" | "stop-and-send"; type SandboxPreference (line 334) | type SandboxPreference = "e2b" | "desktop" | (string & {}); type PreviewMessage (line 339) | interface PreviewMessage { type SharedChat (line 350) | interface SharedChat { FILE: types/file.ts type FileMessagePart (line 3) | interface FileMessagePart { type LocalDesktopFile (line 21) | interface LocalDesktopFile { type UploadedFileState (line 28) | interface UploadedFileState { type FilePart (line 42) | interface FilePart { type FilePartRendererProps (line 55) | interface FilePartRendererProps { type FileUploadPreviewProps (line 63) | interface FileUploadPreviewProps { type FilePreview (line 68) | interface FilePreview { type FileProcessingResult (line 78) | type FileProcessingResult = { type FileSource (line 85) | type FileSource = "upload" | "paste" | "drop"; type FileItemChunk (line 88) | interface FileItemChunk { type SupportedFileType (line 94) | type SupportedFileType = "pdf" | "csv" | "json" | "txt" | "md" | "docx"; type ProcessFileOptions (line 96) | interface ProcessFileOptions { type FileDetails (line 103) | interface FileDetails { type FileContent (line 116) | interface FileContent { FILE: types/user.ts type UserCustomization (line 1) | interface UserCustomization { type PersonalityType (line 15) | type PersonalityType = "cynic" | "robot" | "listener" | "nerd";