Просмотр исходного кода

refactor(session-ui): remove unused exported components (#40685)

Kit Langton 1 неделя назад
Родитель
Сommit
74e3155ef0

+ 0 - 4
packages/session-ui/src/components/line-comment-styles.ts

@@ -36,10 +36,6 @@ export const lineCommentStyles = `
   border: none;
 }
 
-[data-component="line-comment"][data-variant="add"] [data-slot="line-comment-button"] {
-  background: var(--syntax-diff-add);
-}
-
 [data-component="line-comment"] [data-component="icon"] {
   color: var(--white);
 }

+ 1 - 20
packages/session-ui/src/components/line-comment.tsx

@@ -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

+ 0 - 4
packages/session-ui/src/components/message-part.tsx

@@ -948,10 +948,6 @@ function ExaOutput(props: { output?: string }) {
   )
 }
 
-export function registerPartComponent(type: string, component: PartComponent) {
-  PART_MAPPING[type] = component
-}
-
 export function Message(props: MessageProps) {
   return (
     <Switch>