Skip to content

Commit 9bbc90f

Browse files
koki-developclaude
andcommitted
refactor: Update type definitions for structured file editing
- Add Action, EditAction, FileDiff, and Diff types - Replace simple diff string with structured Diff[] format - Add action property to Message interface - Support extensible action system for future features 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 1d24533 commit 9bbc90f

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

src/components/types.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1-
export interface Message {
1+
export type Action = EditAction;
2+
3+
export type EditAction = {
4+
type: "edit";
5+
diff: FileDiff;
6+
};
7+
8+
export type FileDiff = {
9+
fileName: string;
10+
diffs: Diff[];
11+
};
12+
13+
export type Diff = {
14+
rowNumber: number;
15+
a: string;
16+
b: string;
17+
};
18+
19+
export type Message = {
220
id: number;
321
text: string;
422
sender: "user" | "cat";
5-
}
23+
action?: Action;
24+
};

0 commit comments

Comments
 (0)