Skip to content

Commit 2882d99

Browse files
Remove 'Initial Checkpoint' terminology, use 'Checkpoint' consistently (#6643)
Co-authored-by: Roo Code <[email protected]>
1 parent a1439c1 commit 2882d99

File tree

24 files changed

+5
-29
lines changed

24 files changed

+5
-29
lines changed

src/core/checkpoints/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ async function checkGitInstallation(
134134
cline.checkpointServiceInitializing = false
135135
})
136136

137-
service.on("checkpoint", ({ isFirst, fromHash: from, toHash: to }) => {
137+
service.on("checkpoint", ({ fromHash: from, toHash: to }) => {
138138
try {
139139
provider?.postMessageToWebview({ type: "currentCheckpointUpdated", text: to })
140140

141141
cline
142-
.say("checkpoint_saved", to, undefined, undefined, { isFirst, from, to }, undefined, {
142+
.say("checkpoint_saved", to, undefined, undefined, { from, to }, undefined, {
143143
isNonInteractive: true,
144144
})
145145
.catch((err) => {

src/services/checkpoints/ShadowCheckpointService.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,13 @@ export abstract class ShadowCheckpointService extends EventEmitter {
215215
await this.stageAll(this.git)
216216
const commitArgs = options?.allowEmpty ? { "--allow-empty": null } : undefined
217217
const result = await this.git.commit(message, commitArgs)
218-
const isFirst = this._checkpoints.length === 0
219218
const fromHash = this._checkpoints[this._checkpoints.length - 1] ?? this.baseHash!
220219
const toHash = result.commit || fromHash
221220
this._checkpoints.push(toHash)
222221
const duration = Date.now() - startTime
223222

224-
if (isFirst || result.commit) {
225-
this.emit("checkpoint", { type: "checkpoint", isFirst, fromHash, toHash, duration })
223+
if (result.commit) {
224+
this.emit("checkpoint", { type: "checkpoint", fromHash, toHash, duration })
226225
}
227226

228227
if (result.commit) {

src/services/checkpoints/__tests__/ShadowCheckpointService.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,6 @@ describe.each([[RepoPerTaskCheckpointService, "RepoPerTaskCheckpointService"]])(
693693
expect(eventData.type).toBe("checkpoint")
694694
expect(eventData.toHash).toBe(result?.commit)
695695
expect(typeof eventData.duration).toBe("number")
696-
expect(typeof eventData.isFirst).toBe("boolean") // Can be true or false depending on checkpoint history
697696
})
698697

699698
it("does not emit checkpoint event when no changes and allowEmpty=false", async () => {

src/services/checkpoints/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export interface CheckpointEventMap {
2525
initialize: { type: "initialize"; workspaceDir: string; baseHash: string; created: boolean; duration: number }
2626
checkpoint: {
2727
type: "checkpoint"
28-
isFirst: boolean
2928
fromHash: string
3029
toHash: string
3130
duration: number

webview-ui/src/components/chat/checkpoints/CheckpointSaved.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ export const CheckpointSaved = ({ checkpoint, ...props }: CheckpointSavedProps)
3737
<div className="flex items-center justify-between">
3838
<div className="flex gap-2">
3939
<span className="codicon codicon-git-commit text-blue-400" />
40-
<span className="font-bold">
41-
{metadata.isFirst ? t("chat:checkpoint.initial") : t("chat:checkpoint.regular")}
42-
</span>
40+
<span className="font-bold">{t("chat:checkpoint.regular")}</span>
4341
{isCurrent && <span className="text-muted text-sm">{t("chat:checkpoint.current")}</span>}
4442
</div>
4543
<CheckpointMenu {...props} checkpoint={metadata} />

webview-ui/src/components/chat/checkpoints/schema.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { z } from "zod"
22

33
export const checkpointSchema = z.object({
4-
isFirst: z.boolean(),
54
from: z.string(),
65
to: z.string(),
76
})

webview-ui/src/i18n/locales/ca/chat.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/de/chat.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/en/chat.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@
145145
"streamingFailed": "API Streaming Failed"
146146
},
147147
"checkpoint": {
148-
"initial": "Initial Checkpoint",
149148
"regular": "Checkpoint",
150149
"initializingWarning": "Still initializing checkpoint... If this takes too long, you can disable checkpoints in <settingsLink>settings</settingsLink> and restart your task.",
151150
"menu": {

webview-ui/src/i18n/locales/es/chat.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)