We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8f5df9 commit db4f590Copy full SHA for db4f590
extensions/cli/src/ui/EditMessageSelector.tsx
@@ -1,12 +1,15 @@
1
import { Box, Text, useInput } from "ink";
2
-import type { Key } from "ink/build/hooks/use-input.js";
3
import React, { useMemo, useState } from "react";
4
5
import type { ChatHistoryItem } from "../../../../core/index.js";
6
7
import { defaultBoxStyles } from "./styles.js";
8
import { TextBuffer } from "./TextBuffer.js";
9
+// Infer the Key type from useInput's callback parameters
10
+type UseInputHandler = Parameters<typeof useInput>[0];
11
+type Key = Parameters<UseInputHandler>[1];
12
+
13
interface EditMessageSelectorProps {
14
chatHistory: ChatHistoryItem[];
15
onEdit: (messageIndex: number, newContent: string) => void;
0 commit comments