Skip to content

Commit fa410a5

Browse files
authored
Merge branch 'main' into add-session-commands
2 parents 89c37d0 + 7b7174b commit fa410a5

File tree

139 files changed

+5235
-377
lines changed

Some content is hidden

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

139 files changed

+5235
-377
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# kilo-code
22

3+
## 4.130.0
4+
5+
### Minor Changes
6+
7+
- [#4131](https://github.com/Kilo-Org/kilocode/pull/4131) [`9a2ef51`](https://github.com/Kilo-Org/kilocode/commit/9a2ef512bb50143b6cff690f912f7fd8dcfa65b7) Thanks [@mcowger](https://github.com/mcowger)! - Fix tool parsing failure in write_to_file with JSON contents
8+
39
## 4.129.0
410

511
### Minor Changes

cli/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @kilocode/cli
22

3+
## 0.12.0
4+
5+
### Minor Changes
6+
7+
- [#4177](https://github.com/Kilo-Org/kilocode/pull/4177) [`8d44a94`](https://github.com/Kilo-Org/kilocode/commit/8d44a94a28f1cd84d1af9836c1822eb43fe41a1b) Thanks [@pandemicsyn](https://github.com/pandemicsyn)! - Fix: inject configuration before session restoration
8+
39
## 0.11.0
410

511
### Minor Changes

cli/package.dist.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kilocode/cli",
3-
"version": "0.11.0",
3+
"version": "0.12.0",
44
"description": "Terminal User Interface for Kilo Code",
55
"type": "module",
66
"main": "index.js",

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kilocode/cli",
3-
"version": "0.11.0",
3+
"version": "0.12.0",
44
"description": "Terminal User Interface for Kilo Code",
55
"type": "module",
66
"main": "dist/index.js",

cli/src/cli.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ export class CLI {
135135
const kiloToken = getKiloToken(config)
136136

137137
if (kiloToken) {
138+
// Inject CLI configuration into ExtensionHost
139+
// This must happen BEFORE session restoration to ensure org ID is set
140+
await this.injectConfigurationToExtension()
141+
logs.debug("CLI configuration injected into extension", "CLI")
142+
138143
const pathProvider = new KiloCodePathProvider()
139144
const extensionMessenger = new ExtensionMessengerAdapter(this.service)
140145

@@ -165,7 +170,6 @@ export class CLI {
165170
await this.sessionService.restoreSession(this.options.session)
166171
} else if (this.options.fork) {
167172
logs.info("Forking session from share ID", "CLI", { shareId: this.options.fork })
168-
169173
await this.sessionService.forkSession(this.options.fork)
170174
}
171175
}
@@ -175,6 +179,8 @@ export class CLI {
175179
logs.debug("Command history loaded", "CLI")
176180

177181
// Inject CLI configuration into ExtensionHost
182+
// This happens after session restoration (if any) to ensure CLI config takes precedence
183+
// Session restoration may have activated a saved profile that doesn't include org ID from env vars
178184
await this.injectConfigurationToExtension()
179185
logs.debug("CLI configuration injected into extension", "CLI")
180186

packages/types/src/feature-flags.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,10 @@
66
* Enable model selection for autocomplete in development mode.
77
* This allows developers to test different models for autocomplete functionality.
88
*/
9-
export const MODEL_SELECTION_ENABLED = process.env.NODE_ENV === "development"
9+
export const MODEL_SELECTION_ENABLED = process.env.NODE_ENV === "development";
10+
11+
/**
12+
* Enable the Agent Manager feature in development mode.
13+
* This allows developers to test the multi-agent orchestration functionality.
14+
*/
15+
export const AGENT_MANAGER_ENABLED = process.env.NODE_ENV === "development";

packages/types/src/vscode.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export const commandIds = [
4949
"settingsButtonClicked",
5050

5151
"openInNewTab",
52+
"agentManagerOpen", // kilocode_change
5253

5354
"showHumanRelayDialog",
5455
"registerHumanRelayCallback",

pnpm-lock.yaml

Lines changed: 14 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/activate/registerCommands.ts

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ import { CodeIndexManager } from "../services/code-index/manager"
1616
import { importSettingsWithFeedback } from "../core/config/importExport"
1717
import { MdmService } from "../services/mdm/MdmService"
1818
import { t } from "../i18n"
19-
import { getAppUrl } from "@roo-code/types" // kilocode_change
19+
import { getAppUrl, AGENT_MANAGER_ENABLED } from "@roo-code/types" // kilocode_change
2020
import { generateTerminalCommand } from "../utils/terminalCommandGenerator" // kilocode_change
21+
import { AgentManagerProvider } from "../core/kilocode/agent-manager/AgentManagerProvider" // kilocode_change
2122

2223
/**
2324
* Helper to get the visible ClineProvider instance or log if not found.
@@ -65,8 +66,27 @@ export type RegisterCommandOptions = {
6566
provider: ClineProvider
6667
}
6768

69+
// kilocode_change start - Agent Manager provider
70+
let agentManagerProvider: AgentManagerProvider | undefined
71+
72+
const registerAgentManager = (options: RegisterCommandOptions) => {
73+
const { context, outputChannel } = options
74+
75+
vscode.commands.executeCommand("setContext", "kilo-code.agentManagerEnabled", AGENT_MANAGER_ENABLED)
76+
77+
if (AGENT_MANAGER_ENABLED) {
78+
agentManagerProvider = new AgentManagerProvider(context, outputChannel)
79+
context.subscriptions.push(agentManagerProvider)
80+
}
81+
}
82+
// kilocode_change end
83+
6884
export const registerCommands = (options: RegisterCommandOptions) => {
69-
const { context } = options
85+
const { context, outputChannel } = options
86+
87+
// kilocode_change start
88+
registerAgentManager(options)
89+
// kilocode_change end
7090

7191
for (const [id, callback] of Object.entries(getCommandsMap(options))) {
7292
const command = getCommand(id as CommandId)
@@ -76,6 +96,11 @@ export const registerCommands = (options: RegisterCommandOptions) => {
7696

7797
const getCommandsMap = ({ context, outputChannel }: RegisterCommandOptions): Record<CommandId, any> => ({
7898
activationCompleted: () => {},
99+
// kilocode_change start
100+
agentManagerOpen: () => {
101+
agentManagerProvider?.openPanel()
102+
},
103+
// kilocode_change end
79104
cloudButtonClicked: () => {
80105
const visibleProvider = getVisibleProviderOrLog(outputChannel)
81106

0 commit comments

Comments
 (0)