refactor(coding-agent): renamed todo_write tool to todo
- Renamed `TodoWriteTool` to `TodoTool` and its source/prompt files. - Updated tool registration, schema, renderers, and gating to `todo`. - Adjusted cursor provider native tool names and tests to match. - Renamed strike-animation constants and `todo-error-reminder` type.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Box, Container, Spacer, Text } from "@oh-my-pi/pi-tui";
|
||||
import { theme } from "../../modes/theme/theme";
|
||||
import type { TodoItem } from "../../tools/todo-write";
|
||||
import type { TodoItem } from "../../tools/todo";
|
||||
|
||||
/**
|
||||
* Component that renders a todo completion reminder notification.
|
||||
|
||||
@@ -32,7 +32,7 @@ import {
|
||||
} from "../../tools/json-tree";
|
||||
import { formatExpandHint, replaceTabs, resolveImageOptions, truncateToWidth } from "../../tools/render-utils";
|
||||
import { toolRenderers } from "../../tools/renderers";
|
||||
import { TODO_WRITE_STRIKE_TOTAL_FRAMES } from "../../tools/todo-write";
|
||||
import { TODO_STRIKE_TOTAL_FRAMES } from "../../tools/todo";
|
||||
import { renderStatusLine } from "../../tui";
|
||||
import { sanitizeWithOptionalSixelPassthrough } from "../../utils/sixel";
|
||||
import { renderDiff } from "./diff";
|
||||
@@ -452,7 +452,7 @@ export class ToolExecutionComponent extends Container {
|
||||
}
|
||||
|
||||
#updateTodoStrikeAnimation(): void {
|
||||
if (this.#toolName !== "todo_write" || this.#isPartial || this.#result?.isError) {
|
||||
if (this.#toolName !== "todo" || this.#isPartial || this.#result?.isError) {
|
||||
this.#stopTodoStrikeAnimation();
|
||||
return;
|
||||
}
|
||||
@@ -467,7 +467,7 @@ export class ToolExecutionComponent extends Container {
|
||||
this.#renderState.spinnerFrame = 0;
|
||||
this.#todoStrikeInterval = setInterval(() => {
|
||||
const nextFrame = (this.#spinnerFrame ?? 0) + 1;
|
||||
if (nextFrame > TODO_WRITE_STRIKE_TOTAL_FRAMES) {
|
||||
if (nextFrame > TODO_STRIKE_TOTAL_FRAMES) {
|
||||
this.#stopTodoStrikeAnimation();
|
||||
} else {
|
||||
this.#spinnerFrame = nextFrame;
|
||||
|
||||
Reference in New Issue
Block a user