|
|
@@ -9,7 +9,7 @@ import { useI18n } from "@opencode-ai/ui/context/i18n"
|
|
|
|
|
|
installLineCommentStyles()
|
|
|
|
|
|
-export type LineCommentVariant = "default" | "editor" | "add"
|
|
|
+export type LineCommentVariant = "default" | "editor"
|
|
|
|
|
|
function InlineGlyph(props: { icon: "comment" | "plus" }) {
|
|
|
return (
|
|
|
@@ -156,25 +156,6 @@ export const LineComment = (props: LineCommentProps) => {
|
|
|
)
|
|
|
}
|
|
|
|
|
|
-export type LineCommentAddProps = Omit<LineCommentAnchorProps, "children" | "variant" | "open" | "icon"> & {
|
|
|
- label?: string
|
|
|
-}
|
|
|
-
|
|
|
-export const LineCommentAdd = (props: LineCommentAddProps) => {
|
|
|
- const [split, rest] = splitProps(props, ["label"])
|
|
|
- const i18n = useI18n()
|
|
|
-
|
|
|
- return (
|
|
|
- <LineCommentAnchor
|
|
|
- {...rest}
|
|
|
- open={false}
|
|
|
- variant="add"
|
|
|
- icon="plus"
|
|
|
- buttonLabel={split.label ?? i18n.t("ui.lineComment.submit")}
|
|
|
- />
|
|
|
- )
|
|
|
-}
|
|
|
-
|
|
|
export type LineCommentEditorProps = Omit<LineCommentAnchorProps, "children" | "open" | "variant" | "onClick"> & {
|
|
|
value: string
|
|
|
selection: JSX.Element
|