Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/ephemeral-planning-experiment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kilo-code": minor
---

Add `ephemeralPlanning` experiment to gate the planning tool
5 changes: 5 additions & 0 deletions .changeset/planning-doc-tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"kilo-code": minor
---

Add `create_plan` tool for creating ephemeral planning documents
3 changes: 2 additions & 1 deletion packages/types/src/experiment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { Keys, Equals, AssertEqual } from "./type-fu.js"
* ExperimentId
*/

const kilocodeExperimentIds = ["morphFastApply", "speechToText"] as const // kilocode_change
const kilocodeExperimentIds = ["morphFastApply", "speechToText", "ephemeralPlanning"] as const // kilocode_change
export const experimentIds = [
"powerSteering",
"multiFileApplyDiff",
Expand All @@ -27,6 +27,7 @@ export type ExperimentId = z.infer<typeof experimentIdsSchema>
export const experimentsSchema = z.object({
morphFastApply: z.boolean().optional(), // kilocode_change
speechToText: z.boolean().optional(), // kilocode_change
ephemeralPlanning: z.boolean().optional(), // kilocode_change
powerSteering: z.boolean().optional(),
multiFileApplyDiff: z.boolean().optional(),
preventFocusDisruption: z.boolean().optional(),
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const toolNames = [
"report_bug",
"condense",
"delete_file",
"create_plan", // kilocode_change
// kilocode_change end
"update_todo_list",
"run_slash_command",
Expand Down
12 changes: 12 additions & 0 deletions src/__tests__/extension.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ vi.mock("vscode", () => ({
},
workspace: {
registerTextDocumentContentProvider: vi.fn(),
// kilocode_change start
registerFileSystemProvider: vi.fn().mockReturnValue({
dispose: vi.fn(),
}),
getConfiguration: vi.fn().mockReturnValue({
get: vi.fn().mockReturnValue([]),
}),
Expand All @@ -50,6 +54,13 @@ vi.mock("vscode", () => ({
onDidCloseTextDocument: vi.fn().mockReturnValue({
dispose: vi.fn(),
}),
// kilocode_change start
fs: {
readFile: vi.fn(),
writeFile: vi.fn(),
stat: vi.fn(),
},
// kilocode_change end
},
languages: {
registerCodeActionsProvider: vi.fn(),
Expand All @@ -63,6 +74,7 @@ vi.mock("vscode", () => ({
env: {
language: "en",
appName: "Visual Studio Code",
version: "1.0.0", // kilocode_change
},
ExtensionMode: {
Production: 1,
Expand Down
12 changes: 12 additions & 0 deletions src/core/assistant-message/presentAssistantMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { switchModeTool } from "../tools/SwitchModeTool"
import { attemptCompletionTool, AttemptCompletionCallbacks } from "../tools/AttemptCompletionTool"
import { newTaskTool } from "../tools/NewTaskTool"

import { createPlanTool } from "../tools/CreatePlanTool" // kilocode_change
import { updateTodoListTool } from "../tools/UpdateTodoListTool"
import { runSlashCommandTool } from "../tools/RunSlashCommandTool"
import { generateImageTool } from "../tools/GenerateImageTool"
Expand Down Expand Up @@ -466,6 +467,8 @@ export async function presentAssistantMessage(cline: Task) {
return `[${block.name}]`
case "condense":
return `[${block.name}]`
case "create_plan":
return `[${block.name} for '${block.params.title}']` // kilocode_change
// kilocode_change end
case "run_slash_command":
return `[${block.name} for '${block.params.command}'${block.params.args ? ` with args: ${block.params.args}` : ""}]`
Expand Down Expand Up @@ -1099,6 +1102,15 @@ export async function presentAssistantMessage(cline: Task) {
case "condense":
await condenseTool(cline, block, askApproval, handleError, pushToolResult, removeClosingTag)
break
case "create_plan":
await createPlanTool.handle(cline, block as ToolUse<"create_plan">, {
askApproval,
handleError,
pushToolResult,
removeClosingTag,
toolProtocol,
}) // kilocode_change
break
// kilocode_change end

case "run_slash_command":
Expand Down
6 changes: 3 additions & 3 deletions src/core/kilocode/wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { JETBRAIN_PRODUCTS, KiloCodeWrapperProperties } from "../../shared/kiloc

export const getKiloCodeWrapperProperties = (): KiloCodeWrapperProperties => {
const appName = vscode.env.appName
const kiloCodeWrapped = appName.includes("wrapper")
const kiloCodeWrapped = appName?.includes("wrapper") ?? false // kilocode_change
let kiloCodeWrapper = null
let kiloCodeWrapperTitle = null
let kiloCodeWrapperCode = null
Expand Down Expand Up @@ -37,8 +37,8 @@ export const getEditorNameHeader = () => {
return (
props.kiloCodeWrapped
? [props.kiloCodeWrapperTitle, props.kiloCodeWrapperVersion]
: [vscode.env.appName, vscode.version]
)
: [vscode.env.appName || "VS Code", vscode.version]
) // kilocode_change
.filter(Boolean)
.join(" ")
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading