Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MoonshotAI/kimi-code
/ functions
Functions
12,222 in github.com/MoonshotAI/kimi-code
⨍
Functions
12,222
◇
Types & classes
3,199
↓ 1,923 callers
Method
push
* Add text to the kill ring. * * @param text - The killed text to add * @param opts - Push options * @param opts.prepend - If accumulating, pr
packages/pi-tui/src/kill-ring.ts:19
↓ 1,115 callers
Method
handleInput
* Optional handler for keyboard input when component has focus
packages/pi-tui/src/tui.ts:82
↓ 748 callers
Method
push
(chunk: string)
packages/agent-core/src/mcp/client-stdio.ts:209
↓ 572 callers
Method
render
(width: number)
apps/kimi-code/test/tui/commands/goal.test.ts:133
↓ 499 callers
Method
get
( path: string, options: { schema?: Record<string, unknown> }, handler: ( req: { id: string
packages/server/src/routes/auth.ts:25
↓ 495 callers
Method
inject
()
packages/agent-core/src/agent/injection/manager.ts:33
↓ 495 callers
Method
json
(status: number, body: unknown, headers?: Record<string, string>)
packages/kosong/test/e2e/fake-provider-harness.ts:16
↓ 480 callers
Method
handleInput
(data: string)
apps/kimi-code/test/tui/commands/goal.test.ts:132
↓ 465 callers
Method
ok
(message = '', options: { readonly brief?: string } = {})
packages/agent-core/src/tools/support/result-builder.ts:100
↓ 428 callers
Method
has
(id: ServiceIdentifier<any>)
packages/agent-core/src/di/instantiation.ts:140
↓ 414 callers
Function
executeTool
( tool: ExecutableTool<Input>, context: TestExecutableToolContext<Input>, )
packages/agent-core/test/tools/fixtures/execute-tool.ts:13
↓ 399 callers
Method
add
( sessionId: string, connectionId: string, wirePaths: readonly string[], )
packages/server/src/ws/connection.ts:66
↓ 370 callers
Method
get
(key: K)
packages/agent-core/src/tools/store.ts:6
↓ 370 callers
Function
mkdir
( path: string, options?: { parents?: boolean; existOk?: boolean }, )
packages/kaos/src/current.ts:86
↓ 347 callers
Method
fg
(token: ColorToken, text: string)
apps/kimi-code/src/tui/theme/theme.ts:39
↓ 339 callers
Function
testAgent
(options: TestAgentOptions = {})
packages/agent-core/test/agent/harness/agent.ts:143
↓ 326 callers
Method
set
(key: K, value: ToolStoreData[K])
packages/agent-core/src/tools/store.ts:7
↓ 303 callers
Function
writeFile
(_path: string, _data: unknown, cb: (err: Error | null) => void)
packages/kaos/test/ssh.test.ts:486
↓ 298 callers
Function
matchesKey
(data: string, keyId: KeyId)
packages/pi-tui/src/keys.ts:820
↓ 291 callers
Function
visibleWidth
(str: string)
packages/pi-tui/src/utils.ts:216
↓ 283 callers
Method
resolve
(value: T)
packages/agent-core/src/agent/turn/tool-dedup.ts:45
↓ 275 callers
Function
createFakeKaos
( overrides?: Partial<Kaos>, envLayers: readonly Record<string, string>[] = [], )
packages/agent-core/test/tools/fixtures/fake-kaos.ts:31
↓ 268 callers
Method
configure
(config: LoggingConfig)
packages/agent-core/src/logging/types.ts:68
↓ 266 callers
Method
addChild
(component: Component)
packages/pi-tui/src/tui.ts:266
↓ 266 callers
Function
mkdtemp
()
apps/vis/server/test/fixtures/build.ts:44
↓ 254 callers
Method
toString
()
packages/agent-core/src/di/instantiation.ts:46
↓ 244 callers
Method
getText
Get the current text content
packages/pi-tui/src/editor-component.ts:17
↓ 239 callers
Method
invokeFunction
( fn: (accessor: ServicesAccessor, ...args: TS) => R, ...args: TS )
packages/agent-core/src/di/instantiation.ts:111
↓ 235 callers
Method
now
()
packages/agent-core/test/di/collection.test.ts:11
↓ 226 callers
Function
resolve
( input: string, overrides: Partial<Parameters<typeof resolveSlashCommandInput>[0]> = {}, )
apps/kimi-code/test/tui/commands/resolve.test.ts:10
↓ 219 callers
Method
prompt
(payload: { input: string })
packages/agent-core/test/rpc/create-rpc.test.ts:85
↓ 203 callers
Method
send
(payload: unknown)
packages/server/src/routes/files.ts:70
↓ 200 callers
Function
readFile
(_path: string, cb: (err: Error | null, data?: Buffer) => void)
packages/kaos/test/ssh.test.ts:479
↓ 199 callers
Method
on
(event: "data", listener: (data: Buffer) => void)
apps/kimi-code/src/tui/theme/detect.ts:55
↓ 193 callers
Method
requestRender
()
apps/kimi-code/src/tui/controllers/clipboard-image-hint.ts:13
↓ 182 callers
Function
createTestTUI
Create a TUI with a virtual terminal for testing
packages/pi-tui/test/editor.test.ts:13
↓ 178 callers
Method
getCursor
(sessionId: string)
packages/server/src/ws/connection.ts:53
↓ 172 callers
Method
createSession
(input: { title?: string; cwd?: string; model?: string; workspaceId?: string })
apps/kimi-web/src/api/types.ts:649
↓ 171 callers
Function
resolve
(value: T)
packages/node-sdk/examples/runtime-smoke-helpers.ts:184
↓ 167 callers
Method
exec
Spawn a process with the given arguments.
packages/kaos/src/kaos.ts:94
↓ 165 callers
Method
log
(m: string)
packages/agent-core/test/di/extensions.test.ts:24
↓ 161 callers
Method
keys
()
packages/agent-core/src/di/lifecycle.ts:542
↓ 160 callers
Function
createBackgroundManager
(options: { sessionDir?: string; maxRunningTasks?: number; hooks?: FakeBackgroundAgent['hooks']; } = {})
packages/agent-core/test/agent/background/helpers.ts:30
↓ 160 callers
Method
now
()
apps/kimi-code/src/cli/sub/server/kill.ts:44
↓ 158 callers
Method
clear
()
packages/server/src/services/guiStore/guiStore.ts:14
↓ 157 callers
Function
writeFile
(path: string)
packages/agent-core/src/loop/tool-access.ts:47
↓ 153 callers
Method
list
(sessionId: string, req: FsListRequest)
packages/agent-core/src/services/fs/fs.ts:79
↓ 153 callers
Function
truncateToWidth
( text: string, maxWidth: number, ellipsis: string = "...", pad: boolean = false, )
packages/pi-tui/src/utils.ts:941
↓ 149 callers
Method
once
(signal: NodeJS.Signals, listener: () => Promise<void>)
apps/kimi-code/src/cli/run-prompt.ts:85
↓ 146 callers
Method
render
* Render the component to lines for the given viewport width * @param width - Current viewport width * @returns Array of strings, each representin
packages/pi-tui/src/tui.ts:77
↓ 136 callers
Method
create
(input: SessionCreate, options?: SessionCreateOptions)
packages/agent-core/src/services/session/session.ts:45
↓ 134 callers
Function
createKimiHarness
(options: KimiHarnessOptions)
packages/node-sdk/src/sdk-rpc-client.ts:131
↓ 130 callers
Method
stop
()
packages/pi-tui/e2e/harness.ts:36
↓ 130 callers
Method
warn
(message: string, payload?: LogPayload)
packages/agent-core/src/logging/types.ts:21
↓ 130 callers
Method
write
(data: string)
packages/pi-tui/src/terminal.ts:68
↓ 129 callers
Method
close
Tear down this server and terminate any sockets opened via `authedWs`.
packages/server/test/helpers/serverHarness.ts:115
↓ 129 callers
Function
makeDriver
( session = makeSession(), harnessOverrides: Record<string, unknown> = {}, )
apps/kimi-code/test/tui/kimi-tui-message-flow.test.ts:278
↓ 128 callers
Method
generate
* Send a conversation to the LLM and return a streamed response. * * @param systemPrompt - System-level instruction prepended to the request.
packages/kosong/src/provider.ts:196
↓ 124 callers
Function
log
(label: string, value?: unknown)
packages/server-e2e/scenarios/11-terminal.ts:235
↓ 122 callers
Method
close
()
packages/server/src/start.ts:115
↓ 122 callers
Method
dispose
()
packages/agent-core/src/di/lifecycle.ts:115
↓ 121 callers
Method
beforeToolCall
( context: PermissionPolicyContext, )
packages/agent-core/src/agent/permission/index.ts:96
↓ 120 callers
Method
delete
( path: string, options: { preHandler?: unknown[]; schema?: Record<string, unknown> }, handler: (
packages/server/src/routes/oauth.ts:57
↓ 119 callers
Function
generate
( provider: ChatProvider, systemPrompt: string, tools: Tool[], history: Message[], callbacks?: Gener
packages/kosong/src/generate.ts:82
↓ 119 callers
Method
start
(onInput: (data: string) => void, onResize: () => void)
packages/pi-tui/src/terminal.ts:54
↓ 119 callers
Method
wait
Wait for the process to exit and return its exit code.
packages/kaos/src/process.ts:22
↓ 118 callers
Function
toolContentString
(result: ExecutableToolResult)
packages/agent-core/test/tools/fixtures/fake-kaos.ts:99
↓ 118 callers
Method
values
Iterate all currently-attached connections.
packages/server/src/services/gateway/connectionRegistry.ts:38
↓ 117 callers
Method
untilTurnEnd
()
packages/agent-core/test/agent/harness/agent.ts:253
↓ 116 callers
Method
handleEvent
(event: Event, sendQueued: (item: QueuedMessage) => void)
apps/kimi-code/src/tui/controllers/session-event-handler.ts:235
↓ 116 callers
Method
setText
Set the text content
packages/pi-tui/src/editor-component.ts:20
↓ 114 callers
Method
exit
(code?: number)
apps/kimi-code/src/cli/run-prompt.ts:87
↓ 114 callers
Method
withThinking
Return a shallow copy of this provider with the given thinking effort.
packages/kosong/src/provider.ts:203
↓ 112 callers
Method
update
(id: string, input: SessionUpdate)
packages/agent-core/src/services/session/session.ts:51
↓ 110 callers
Method
delete
(fileId: string)
packages/agent-core/src/services/fileStore/fileStore.ts:51
↓ 110 callers
Function
reject
(error: Error)
packages/node-sdk/examples/runtime-smoke-helpers.ts:187
↓ 109 callers
Function
createDecorator
(name: string)
packages/agent-core/src/di/instantiation.ts:65
↓ 106 callers
Method
push
(record: AgentReplayRecordPayload)
packages/agent-core/src/agent/replay/index.ts:28
↓ 105 callers
Method
boldFg
(token: ColorToken, text: string)
apps/kimi-code/src/tui/theme/theme.ts:43
↓ 104 callers
Method
error
(message: string, payload?: LogPayload)
packages/agent-core/src/logging/types.ts:20
↓ 104 callers
Function
hookContext
(input: { readonly id: string; readonly toolName?: string | undefined; readonly args?: Record<string, un
packages/agent-core/test/agent/permission.test.ts:3974
↓ 104 callers
Function
parseKey
(data: string)
packages/pi-tui/src/keys.ts:1251
↓ 102 callers
Function
makePermissionManager
( handleApproval: (request: unknown) => Promise<ApprovalResponse>, options: { readonly parent?: Permis
packages/agent-core/test/agent/permission.test.ts:3859
↓ 102 callers
Function
stripSgr
(text: string)
apps/kimi-code/test/tui/kimi-tui-message-flow.test.ts:76
↓ 101 callers
Method
close
()
packages/agent-core/src/logging/sinks.ts:23
↓ 100 callers
Method
showOverlay
* Show an overlay component with configurable positioning and sizing. * Returns a handle to control the overlay's visibility.
packages/pi-tui/src/tui.ts:503
↓ 99 callers
Method
writeText
Write text to `path`, returning the number of characters written.
packages/kaos/src/kaos.ts:83
↓ 97 callers
Function
makeEndTurnResponse
( text: string, usage: Partial<TokenUsage> = {}, )
packages/agent-core/test/loop/fixtures/fake-llm.ts:124
↓ 96 callers
Function
test
(val)
packages/agent-core/test/agent/harness/snapshots.ts:99
↓ 95 callers
Function
makeToolCall
(name: string, args: unknown, id?: string)
packages/agent-core/test/loop/fixtures/fake-llm.ts:198
↓ 95 callers
Method
publish
* Publish a fully-formed `Event` to all subscribers. Synchronous; the * adapter does not await delivery.
packages/agent-core/src/services/event/event.ts:62
↓ 94 callers
Function
runTurn
(opts: RunTurnOptions)
packages/agent-core/test/loop/fixtures/helpers.ts:43
↓ 92 callers
Method
showError
(msg: string)
apps/kimi-code/src/tui/commands/dispatch.ts:107
↓ 91 callers
Method
describe
()
packages/agent-core/test/di/delayed.test.ts:49
↓ 91 callers
Method
getViewport
* Get the visible viewport (what's currently on screen) * Note: You should use getViewportAfterWrite() for testing after writing data
packages/pi-tui/test/virtual-terminal.ts:171
↓ 90 callers
Method
setFocus
(component: Component | null)
packages/pi-tui/src/tui.ts:376
↓ 89 callers
Method
handleUserInput
(text: string)
apps/kimi-code/test/tui/kimi-tui-message-flow.test.ts:90
↓ 88 callers
Function
okEnvelope
(data: T, requestId: string)
packages/protocol/src/envelope.ts:20
↓ 85 callers
Method
dispose
()
packages/server/src/services/auth/tokenStore.ts:10
↓ 85 callers
Method
expectResumeMatches
()
packages/agent-core/test/agent/harness/agent.ts:738
next →
1–100 of 12,222, ranked by callers