Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/FrankChen021/datastoria
/ functions
Functions
1,973 in github.com/FrankChen021/datastoria
⨍
Functions
1,973
◇
Types & classes
637
↓ 419 callers
Method
push
(item: T)
src/lib/stack.ts:4
↓ 311 callers
Function
cn
(...inputs: ClassValue[])
src/lib/utils.ts:4
↓ 161 callers
Method
set
(key: string, value: string)
src/lib/host-name-manager.ts:23
↓ 135 callers
Method
get
* Get a single dashboard by ID
src/components/dashboard-tab/custom-dashboard-storage.ts:55
↓ 100 callers
Method
render
(id: string, text: string)
src/types/mermaid.d.ts:15
↓ 89 callers
Method
replace
* Replace a custom variable in the SQL query. * Replaces: {variableName} with the provided value * * @param variableName The name of the vari
src/components/shared/dashboard/sql-query-builder.ts:135
↓ 79 callers
Method
get
(key: string)
src/lib/host-name-manager.ts:13
↓ 62 callers
Method
query
( sql: string, params?: Record<string, unknown>, headers?: Record<string, string> )
src/lib/connection/connection.ts:287
↓ 61 callers
Function
createNode
* Helper function to create a tree node
src/lib/tree-search.test.ts:8
↓ 56 callers
Method
parse
(token: string)
src/components/chat/message/file-link.ts:29
↓ 55 callers
Method
add
( entry: Omit<QueryHistoryEntry, "id"> & { id?: string; } )
src/components/query-tab/query-history/query-history-manager.ts:49
↓ 49 callers
Method
delete
* Delete a dashboard by ID
src/components/dashboard-tab/custom-dashboard-storage.ts:72
↓ 49 callers
Method
getInstance
()
src/components/settings/models/model-manager.ts:61
↓ 47 callers
Function
useConnection
()
src/components/connection/connection-context.tsx:171
↓ 46 callers
Method
floor
* Floor a date to the nearest multiple of duration * @param date The date to floor * @param duration Duration in milliseconds
src/lib/datetime-utils.ts:35
↓ 45 callers
Method
indexOf
(name: string)
src/lib/connection/connection-manager.ts:197
↓ 45 callers
Method
replace
(name: string, newConnection: ConnectionConfig)
src/lib/connection/connection-manager.ts:145
↓ 43 callers
Method
escapeSqlString
* Escape single quotes in SQL strings to reduce SQL injection risk when embedding values into * single-quoted SQL literals. * * Note: Prefer
src/lib/sql-utils.ts:145
↓ 41 callers
Method
keys
* Get all sub-keys that start with this key as prefix (returns keys without the prefix)
src/lib/storage/local-storage-provider.ts:193
↓ 41 callers
Function
searchTree
( tree: TreeDataItem[] | undefined, search: string, options?: { pathSeparator?: string; highligh
src/lib/tree-search.ts:349
↓ 40 callers
Method
toString
* Get the current SQL query string without finalizing. * Useful for debugging or intermediate inspection. * * @returns The current SQL query
src/components/shared/dashboard/sql-query-builder.ts:169
↓ 36 callers
Method
getFormatter
(formatType: string)
src/lib/formatter.tsx:586
↓ 34 callers
Method
getURL
(pathname: string)
src/lib/base-path.ts:16
↓ 31 callers
Method
add
(connection: ConnectionConfig)
src/lib/connection/connection-manager.ts:125
↓ 31 callers
Method
formatISO8601
* Format date to ISO 8601 format
src/lib/datetime-utils.ts:49
↓ 31 callers
Method
remove
(id: string)
src/components/query-tab/query-history/query-history-manager.ts:66
↓ 30 callers
Method
replaceAll
* Replace multiple custom variables in the SQL query. * * @param replacements An object mapping variable names to their replacement values *
src/components/shared/dashboard/sql-query-builder.ts:147
↓ 28 callers
Method
close
* Closes the most recently opened dialog.
src/components/shared/use-dialog.tsx:263
↓ 25 callers
Method
clear
()
src/components/query-tab/query-history/query-history-storage.ts:13
↓ 24 callers
Method
openTab
* Open a tab with the specified information
src/components/tab-manager.ts:156
↓ 24 callers
Method
showDialog
(dialogProps: DialogProps)
src/components/shared/use-dialog.tsx:317
↓ 23 callers
Method
abort
* Aborts any ongoing loading request
src/components/schema-tree/schema-tree-loader.tsx:21
↓ 22 callers
Function
getStructure
* Helper function to extract the structure of search results (without React nodes) * This makes assertions easier to read and write
src/lib/tree-search.test.ts:21
↓ 21 callers
Method
contains
(name: string)
src/lib/connection/connection-manager.ts:121
↓ 20 callers
Method
show
(message: string | React.ReactNode, type: ToastType = "info")
src/lib/toast.ts:28
↓ 19 callers
Function
getAuthenticatedUserEmail
(request: Request)
src/auth.ts:16
↓ 19 callers
Function
resolveModelReasoningLevels
( model?: Pick<ModelProps, "provider" | "modelId" | "reasoningLevels"> | null )
src/lib/ai/llm/llm-provider-factory.ts:166
↓ 19 callers
Method
updateProviderSetting
* Update a specific provider setting * @param provider - The provider name to update * @param updates - Partial updates to apply
src/components/settings/models/model-manager.ts:286
↓ 18 callers
Method
getInstance
()
src/components/query-tab/snippet/query-snippet-manager.ts:10
↓ 18 callers
Function
getNum
(value: number | undefined)
src/lib/ai/token-usage-utils.ts:18
↓ 18 callers
Function
toStringValue
(value: unknown)
src/components/span-log-inspector/span-log-inspector-topo-builder.ts:57
↓ 17 callers
Function
onChange
()
src/hooks/use-mobile.tsx:10
↓ 17 callers
Method
pop
()
src/lib/stack.ts:8
↓ 16 callers
Function
createConfig
( rootDir: string, overrides?: Partial<ReturnType<typeof createCodeSearchEnabledConfig>> )
src/lib/code-search/__tests__/local-file-search.test.ts:9
↓ 16 callers
Method
getSession
(sessionId: string, options?: SessionAccessOptions)
src/components/chat/session/session-repository.ts:26
↓ 16 callers
Function
stringProp
(record: Record<string, unknown>, key: string)
src/components/query-tab/query-response/explain-plan-utils.ts:90
↓ 16 callers
Method
toExplainSQL
* Build EXPLAIN query string from SQL. Strips comments, trailing \G, comments out trailing * FORMAT clause, then prefixes with EXPLAIN <type>
src/lib/sql-utils.ts:102
↓ 15 callers
Function
createMessage
(id: string, role: "user" | "assistant", text: string)
src/components/chat/message/chat-message-list.test.tsx:23
↓ 15 callers
Method
getAsJSON
(defaultValueFactory: () => T)
src/components/settings/models/model-manager.test.ts:47
↓ 15 callers
Method
getItem
(key: string)
src/components/settings/models/model-manager.test.ts:12
↓ 15 callers
Method
getStorageProvider
()
src/lib/storage/storage-manager.ts:23
↓ 15 callers
Function
loadSectionLayout
( dashboardId: string, sectionIndex: number )
src/components/shared/dashboard/dashboard-layout-storage.ts:42
↓ 14 callers
Function
createSpan
(overrides: Record<string, unknown>)
src/components/span-log-inspector/span-log-inspector-topo-builder.test.ts:8
↓ 14 callers
Method
isAvailable
()
src/lib/storage/local-storage-provider.ts:15
↓ 14 callers
Function
quoteValue
(value: string | number | boolean)
src/lib/ai/tools/clickhouse/search-query-log.ts:180
↓ 14 callers
Function
sanitizeMessageForPersistence
(message: AppUIMessage)
src/lib/ai/session/serialization.ts:41
↓ 14 callers
Function
saveSectionLayout
( dashboardId: string, sectionIndex: number, layouts: ResponsiveLayouts )
src/components/shared/dashboard/dashboard-layout-storage.ts:25
↓ 14 callers
Method
subStorage
(subKey: string)
src/components/settings/models/model-manager.test.ts:36
↓ 13 callers
Function
getSessionRepository
()
src/components/chat/session/session-repository-factory.ts:9
↓ 13 callers
Method
observe
()
src/components/chat/input/chat-input-suggestions.test.tsx:51
↓ 13 callers
Function
pluralize
(count: number, singular: string, plural: string)
src/components/query-tab/query-response/explain-plan-utils.ts:134
↓ 13 callers
Method
refresh
(param: RefreshOptions)
src/components/shared/dashboard/dashboard-visualization-layout.tsx:25
↓ 13 callers
Function
requireScalarValue
(predicate: SearchQueryLogPredicate)
src/lib/ai/tools/clickhouse/search-query-log.ts:193
↓ 13 callers
Method
setItem
(key: string, value: string)
src/components/settings/models/model-manager.test.ts:16
↓ 13 callers
Function
useChatPanel
()
src/components/chat/view/use-chat-panel.tsx:265
↓ 12 callers
Function
createToolPart
( toolName: string, toolCallId: string, state = "output-available", output: unknown = { success: true
src/components/chat/message/chat-message-parts.test.ts:5
↓ 12 callers
Method
first
()
src/lib/connection/connection-manager.ts:204
↓ 12 callers
Method
getInstance
()
src/components/query-tab/query-input/completion/query-suggestion-manager.ts:21
↓ 12 callers
Method
getShortHostname
(hostname: string)
src/lib/host-name-manager.ts:114
↓ 12 callers
Function
isNoConnectionSessionConnectionId
(connectionId?: string | null)
src/components/chat/session/session-connection-id.ts:15
↓ 12 callers
Function
isRecord
(value: unknown)
src/components/query-tab/query-response/explain-plan-utils.ts:86
↓ 12 callers
Function
queryJsonCompact
( sql: string, connection: Parameters<ToolExecutor<GetClusterStatusInput, GetClusterStatusOutput>>[1] )
src/lib/ai/tools/clickhouse/status/collect-cluster-status.ts:144
↓ 12 callers
Method
readFile
(input: ReadFileInput)
src/lib/code-search/types.ts:86
↓ 12 callers
Method
removeChild
* Remove a child key without creating a subStorage object
src/lib/storage/local-storage-provider.ts:141
↓ 12 callers
Method
setJSON
(value: unknown)
src/components/settings/models/model-manager.test.ts:52
↓ 12 callers
Method
splitSqlStatements
* Split SQL script text into executable statements. * * Strategy: * - `semicolon`: semicolon-aware split (ignores semicolons inside quotes/co
src/lib/sql-utils.ts:53
↓ 12 callers
Method
toYYYYMMddHHmmss
(date: Date)
src/lib/datetime-utils.ts:7
↓ 11 callers
Method
alert
(dialogProps: DialogProps)
src/components/shared/use-dialog.tsx:301
↓ 11 callers
Method
formatDateTime
* Format date with custom format string
src/lib/datetime-utils.ts:26
↓ 11 callers
Method
getTimeSpan
()
src/components/shared/dashboard/timespan-selector.tsx:157
↓ 11 callers
Method
listSkills
Return catalog metadata for all skills from this source.
src/lib/ai/skills/skill-provider.ts:36
↓ 11 callers
Method
searchFile
(input: SearchFileInput)
src/lib/code-search/types.ts:85
↓ 10 callers
Function
buildTableKey
(database: string, table: string)
src/lib/ai/tools/clickhouse/collect-sql-optimization-evidence.ts:209
↓ 10 callers
Method
create
* Create or retrieve a persisted chat instance
src/components/chat/chat-factory.ts:376
↓ 10 callers
Function
createMessage
(overrides: Partial<AppUIMessage>)
src/lib/ai/session/remote-chat-request.test.ts:10
↓ 10 callers
Method
createModel
* Create a language model with the provided parameters * * Priority: * 1. If USE_MOCK_LLM=true, returns mock models * 2. Otherwise, create
src/lib/ai/llm/llm-provider-factory.ts:971
↓ 10 callers
Method
disconnect
()
src/components/chat/input/chat-input-suggestions.test.tsx:53
↓ 10 callers
Function
emitChange
()
src/components/chat/session/session-manager.ts:44
↓ 10 callers
Function
getAutoExplainState
(clickHouseErrorCode?: string | number)
src/components/query-tab/query-response/query-error-auto-explain-config.ts:15
↓ 10 callers
Method
getConfiguration
()
src/components/settings/agent/agent-manager.ts:75
↓ 10 callers
Function
getServerSessionRepository
()
src/lib/ai/session/server-session-repository-factory.ts:96
↓ 10 callers
Function
limitOutliers
(items: T[], maxOutliers: number | undefined)
src/lib/ai/tools/clickhouse/status/collect-cluster-status.ts:89
↓ 10 callers
Method
parseComparator
(name: string)
src/components/shared/selector.tsx:93
↓ 10 callers
Function
registerIssueNode
(node: string)
src/lib/ai/tools/clickhouse/status/collect-cluster-status.ts:1276
↓ 10 callers
Function
registerObservedNode
(node: string)
src/lib/ai/tools/clickhouse/status/collect-cluster-status.ts:1271
↓ 10 callers
Function
transformTree
(tree: MarkdownNode)
src/components/chat/message/remark-extensions.test.ts:12
↓ 9 callers
Function
buildSendMessagesRequestPayload
({ sessionId, connectionId, messages, trigger, messageId, body, requestContext, clickHouseConn
src/components/chat/chat-factory.ts:170
↓ 9 callers
Function
getErrorMessage
(error: unknown)
src/lib/ai/tools/clickhouse/collect-sql-optimization-evidence.ts:118
↓ 9 callers
Function
getModel
(provider: string, modelId: string)
src/lib/ai/llm/llm-provider-factory.test.ts:10
↓ 9 callers
Function
getSortIcon
(column: "key" | "value")
src/lib/formatter.tsx:54
next →
1–100 of 1,973, ranked by callers