Skip to content

Commit 25afd0b

Browse files
committed
deps(knip): removing unused exports and deps
1 parent 5053feb commit 25afd0b

53 files changed

Lines changed: 25 additions & 813 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/cli-release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,11 @@ jobs:
9191
type: 'module',
9292
dependencies: {
9393
'@inkjs/ui': pkg.dependencies['@inkjs/ui'],
94-
'@trpc/client': pkg.dependencies['@trpc/client'],
9594
'commander': pkg.dependencies.commander,
9695
'fuzzysort': pkg.dependencies.fuzzysort,
9796
'ink': pkg.dependencies.ink,
9897
'p-wait-for': pkg.dependencies['p-wait-for'],
9998
'react': pkg.dependencies.react,
100-
'superjson': pkg.dependencies.superjson,
10199
'zustand': pkg.dependencies.zustand
102100
}
103101
};

apps/cli/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"@roo-code/core": "workspace:^",
2727
"@roo-code/types": "workspace:^",
2828
"@roo-code/vscode-shim": "workspace:^",
29-
"@trpc/client": "^11.8.1",
3029
"@vscode/ripgrep": "^1.15.9",
3130
"commander": "^12.1.0",
3231
"cross-spawn": "^7.0.6",
@@ -35,7 +34,6 @@
3534
"ink": "^6.6.0",
3635
"p-wait-for": "^5.0.2",
3736
"react": "^19.1.0",
38-
"superjson": "^2.2.6",
3937
"zustand": "^5.0.0"
4038
},
4139
"devDependencies": {

apps/cli/scripts/build.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,11 @@ create_tarball() {
151151
type: 'module',
152152
dependencies: {
153153
'@inkjs/ui': pkg.dependencies['@inkjs/ui'],
154-
'@trpc/client': pkg.dependencies['@trpc/client'],
155154
'commander': pkg.dependencies.commander,
156155
'fuzzysort': pkg.dependencies.fuzzysort,
157156
'ink': pkg.dependencies.ink,
158157
'p-wait-for': pkg.dependencies['p-wait-for'],
159158
'react': pkg.dependencies.react,
160-
'superjson': pkg.dependencies.superjson,
161159
'zustand': pkg.dependencies.zustand
162160
}
163161
};

apps/cli/src/agent/__tests__/extension-host.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ function createTestHost({
3434
}: Partial<ExtensionHostOptions> = {}): ExtensionHost {
3535
return new ExtensionHost({
3636
mode,
37-
user: null,
3837
provider,
3938
model,
4039
workspacePath: "/test/workspace",
@@ -111,7 +110,6 @@ describe("ExtensionHost", () => {
111110
mode: "code",
112111
workspacePath: "/my/workspace",
113112
extensionPath: "/my/extension",
114-
user: null,
115113
apiKey: "test-key",
116114
provider: "openrouter",
117115
model: "test-model",

apps/cli/src/agent/agent-state.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -436,28 +436,3 @@ export function detectAgentState(messages: ClineMessage[]): AgentStateInfo {
436436
description: getStateDescription(AgentLoopState.RUNNING),
437437
}
438438
}
439-
440-
/**
441-
* Quick check: Is the agent waiting for user input?
442-
*
443-
* This is a convenience function for simple use cases where you just need
444-
* to know if user action is required.
445-
*/
446-
export function isAgentWaitingForInput(messages: ClineMessage[]): boolean {
447-
return detectAgentState(messages).isWaitingForInput
448-
}
449-
450-
/**
451-
* Quick check: Is the agent actively running (not waiting)?
452-
*/
453-
export function isAgentRunning(messages: ClineMessage[]): boolean {
454-
const state = detectAgentState(messages)
455-
return state.isRunning && !state.isWaitingForInput
456-
}
457-
458-
/**
459-
* Quick check: Is content currently streaming?
460-
*/
461-
export function isContentStreaming(messages: ClineMessage[]): boolean {
462-
return detectAgentState(messages).isStreaming
463-
}

apps/cli/src/agent/extension-client.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -539,18 +539,6 @@ export class ExtensionClient {
539539
// Factory Functions
540540
// =============================================================================
541541

542-
/**
543-
* Create a new ExtensionClient instance.
544-
*
545-
* This is a convenience function that creates a client with default settings.
546-
*
547-
* @param sendMessage - Function to send messages to the extension
548-
* @returns A new ExtensionClient instance
549-
*/
550-
export function createClient(sendMessage: (message: WebviewMessage) => void): ExtensionClient {
551-
return new ExtensionClient({ sendMessage })
552-
}
553-
554542
/**
555543
* Create a mock client for testing.
556544
*

apps/cli/src/agent/extension-host.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import { createVSCodeAPI, IExtensionHost, ExtensionHostEventMap, setRuntimeConfi
2727
import { DebugLogger, setDebugLogEnabled } from "@roo-code/core/cli"
2828

2929
import { DEFAULT_FLAGS, type SupportedProvider } from "@/types/index.js"
30-
import type { User } from "@/lib/sdk/index.js"
3130
import { getProviderSettings } from "@/lib/utils/provider.js"
3231
import { createEphemeralStorageDir } from "@/lib/storage/index.js"
3332

@@ -67,7 +66,6 @@ export interface ExtensionHostOptions {
6766
mode: string
6867
reasoningEffort?: ReasoningEffortExtended | "unspecified" | "disabled"
6968
consecutiveMistakeLimit?: number
70-
user: User | null
7169
provider: SupportedProvider
7270
apiKey?: string
7371
model: string

apps/cli/src/agent/message-processor.ts

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -404,29 +404,6 @@ export class MessageProcessor {
404404
// Message Validation Helpers
405405
// =============================================================================
406406

407-
/**
408-
* Check if a message is a valid ClineMessage.
409-
* Useful for validating messages before processing.
410-
*/
411-
export function isValidClineMessage(message: unknown): message is ClineMessage {
412-
if (!message || typeof message !== "object") {
413-
return false
414-
}
415-
416-
const msg = message as Record<string, unknown>
417-
418-
// Required fields
419-
if (typeof msg.ts !== "number") {
420-
return false
421-
}
422-
423-
if (msg.type !== "ask" && msg.type !== "say") {
424-
return false
425-
}
426-
427-
return true
428-
}
429-
430407
/**
431408
* Check if a message is a valid ExtensionMessage.
432409
*/
@@ -464,19 +441,3 @@ export function parseExtensionMessage(json: string): ExtensionMessage | undefine
464441
return undefined
465442
}
466443
}
467-
468-
/**
469-
* Parse the text field of an api_req_started message.
470-
* Returns undefined if parsing fails or text is not present.
471-
*/
472-
export function parseApiReqStartedText(message: ClineMessage): { cost?: number } | undefined {
473-
if (message.say !== "api_req_started" || !message.text) {
474-
return undefined
475-
}
476-
477-
try {
478-
return JSON.parse(message.text)
479-
} catch {
480-
return undefined
481-
}
482-
}

apps/cli/src/agent/state-store.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -387,29 +387,3 @@ export class StateStore {
387387
// =============================================================================
388388
// Singleton Store (optional convenience)
389389
// =============================================================================
390-
391-
let defaultStore: StateStore | null = null
392-
393-
/**
394-
* Get the default singleton store instance.
395-
* Useful for simple applications that don't need multiple stores.
396-
*/
397-
export function getDefaultStore(): StateStore {
398-
if (!defaultStore) {
399-
defaultStore = new StateStore()
400-
}
401-
402-
return defaultStore
403-
}
404-
405-
/**
406-
* Reset the default store instance.
407-
* Useful for testing or when you need a fresh start.
408-
*/
409-
export function resetDefaultStore(): void {
410-
if (defaultStore) {
411-
defaultStore.reset()
412-
}
413-
414-
defaultStore = null
415-
}

apps/cli/src/commands/cli/list.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ async function createListHost(options: BaseListOptions, hostOptions: ListHostOpt
110110
const extensionHostOptions: ExtensionHostOptions = {
111111
mode: "code",
112112
reasoningEffort: undefined,
113-
user: null,
114113
provider: "openrouter",
115114
model: openRouterDefaultModelId,
116115
apiKey,

0 commit comments

Comments
 (0)