summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src
diff options
context:
space:
mode:
authorAdam <[email protected]>2025-10-30 10:33:45 -0500
committerAdam <[email protected]>2025-10-30 12:02:50 -0500
commitdce287a42d5b4bb965ee74707bf7b0b0709d61f1 (patch)
treea79a19cc6a109108a2ce55780d576a9199a12b82 /packages/ui/src
parent19974daa67b034062e991cff6611477741c0a09d (diff)
downloadopencode-dce287a42d5b4bb965ee74707bf7b0b0709d61f1.tar.gz
opencode-dce287a42d5b4bb965ee74707bf7b0b0709d61f1.zip
wip: desktop work
Diffstat (limited to 'packages/ui/src')
-rw-r--r--packages/ui/src/components/diff.tsx10
-rw-r--r--packages/ui/src/components/message-part.tsx6
2 files changed, 4 insertions, 12 deletions
diff --git a/packages/ui/src/components/diff.tsx b/packages/ui/src/components/diff.tsx
index 731b1bfe0..36b57c56a 100644
--- a/packages/ui/src/components/diff.tsx
+++ b/packages/ui/src/components/diff.tsx
@@ -3,12 +3,12 @@ import {
FileDiff,
type DiffLineAnnotation,
type HunkData,
- DiffFileRendererOptions,
+ FileDiffOptions,
// registerCustomTheme,
} from "@pierre/precision-diffs"
import { ComponentProps, createEffect, splitProps } from "solid-js"
-export type DiffProps<T = {}> = Omit<DiffFileRendererOptions<T>, "themes"> & {
+export type DiffProps<T = {}> = FileDiffOptions<T> & {
before: FileContents
after: FileContents
annotations?: DiffLineAnnotation<T>[]
@@ -54,13 +54,9 @@ export function Diff<T>(props: DiffProps<T>) {
// When ready to render, simply call .render with old/new file, optional
// annotations and a container element to hold the diff
createEffect(() => {
- // @ts-expect-error
const instance = new FileDiff<T>({
// theme: "pierre-light",
- // theme: "pierre-light",
- // Or can also provide a 'themes' prop, which allows the code to adapt
- // to your OS light or dark theme
- themes: { dark: "pierre-dark", light: "pierre-light" },
+ theme: { dark: "pierre-dark", light: "pierre-light" },
// When using the 'themes' prop, 'themeType' allows you to force 'dark'
// or 'light' theme, or inherit from the OS ('system') theme.
themeType: "system",
diff --git a/packages/ui/src/components/message-part.tsx b/packages/ui/src/components/message-part.tsx
index eddd796e7..06f5046dc 100644
--- a/packages/ui/src/components/message-part.tsx
+++ b/packages/ui/src/components/message-part.tsx
@@ -55,11 +55,7 @@ export function AssistantMessageDisplay(props: { message: AssistantMessage; part
return x.type !== "tool" || (x as ToolPart).tool !== "todoread"
})
})
- return (
- <div data-component="assistant-message">
- <For each={filteredParts()}>{(part) => <Part part={part} message={props.message} />}</For>
- </div>
- )
+ return <For each={filteredParts()}>{(part) => <Part part={part} message={props.message} />}</For>
}
export function UserMessageDisplay(props: { message: UserMessage; parts: PartType[] }) {