mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-19 01:51:21 +08:00
feat(review): add nested suggestions and subcommands for review
This commit is contained in:
@@ -22,6 +22,10 @@ describe("review command parsing", () => {
|
||||
expect(parseReviewCommand("/review")).toBe("review")
|
||||
expect(parseReviewCommand("/review focus on tests")).toBe("review")
|
||||
expect(parseReviewCommand("/review uncommitted focus on tests")).toBe("review")
|
||||
expect(parseReviewCommand("/review staged")).toBe("review")
|
||||
expect(parseReviewCommand("/review unpushed")).toBe("review")
|
||||
expect(parseReviewCommand("/review quick")).toBe("review")
|
||||
expect(parseReviewCommand("/review --quick")).toBe("review")
|
||||
expect(parseReviewCommand("/review branch origin/main focus on auth")).toBe("review")
|
||||
expect(parseReviewCommand("/review a1b2c3d")).toBe("review")
|
||||
expect(parseReviewCommand("/review https://github.com/Kilo-Org/kilocode/pull/11084")).toBe("review")
|
||||
@@ -60,6 +64,14 @@ describe("review command", () => {
|
||||
expect(text).toContain("git ls-files --others --exclude-standard")
|
||||
})
|
||||
|
||||
test("documents explicit staged and unpushed review", () => {
|
||||
const text = cmd.template as string
|
||||
expect(text).toContain("`/review staged [guidance]`")
|
||||
expect(text).toContain("`/review unpushed [guidance]`")
|
||||
expect(text).toContain("For staged review")
|
||||
expect(text).toContain("For unpushed review")
|
||||
})
|
||||
|
||||
test("documents explicit and ref-based branch review", () => {
|
||||
const text = cmd.template as string
|
||||
expect(text).toContain("`/review branch [base] [guidance]`")
|
||||
@@ -133,6 +145,7 @@ describe("review command", () => {
|
||||
|
||||
test("applies adaptive parallel review tracks", () => {
|
||||
const text = cmd.template as string
|
||||
expect(text).toContain("Quick mode (`quick`, `--quick`, `-q`, or `--effort 1-3`)")
|
||||
expect(text).toContain("spawn the appropriate sub-agents in parallel")
|
||||
expect(text).toContain("do NOT spawn sub-agents")
|
||||
expect(text).toContain("spawn a single security sub-agent")
|
||||
@@ -144,7 +157,7 @@ describe("review command", () => {
|
||||
expect(text).toContain("NO_FINDINGS")
|
||||
})
|
||||
|
||||
it.live("lists review and deprecated review aliases", () =>
|
||||
it.live("resolves review and deprecated review aliases", () =>
|
||||
provideTmpdirInstance(
|
||||
() =>
|
||||
Effect.gen(function* () {
|
||||
@@ -156,8 +169,8 @@ describe("review command", () => {
|
||||
const uncommitted = yield* command.get("local-review-uncommitted")
|
||||
|
||||
expect(names).toContain("review")
|
||||
expect(names).toContain("local-review")
|
||||
expect(names).toContain("local-review-uncommitted")
|
||||
expect(names).not.toContain("local-review")
|
||||
expect(names).not.toContain("local-review-uncommitted")
|
||||
expect(review?.name).toBe("review")
|
||||
expect(branch?.description).toBe("deprecated; use /review branch")
|
||||
expect(branch?.template).toBe(legacyReviewMessage("local-review"))
|
||||
|
||||
Reference in New Issue
Block a user