summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.opencode/bun.lock6
-rw-r--r--.opencode/package.json2
-rw-r--r--packages/ui/src/components/markdown.css64
-rw-r--r--packages/ui/src/components/markdown.tsx8
-rw-r--r--packages/ui/src/components/message-part.css4
-rw-r--r--packages/ui/src/components/session-review.css2
-rw-r--r--packages/ui/src/components/session-turn.css2
-rw-r--r--packages/ui/src/styles/theme.css6
-rw-r--r--packages/web/src/components/share/content-markdown.tsx8
9 files changed, 83 insertions, 19 deletions
diff --git a/.opencode/bun.lock b/.opencode/bun.lock
index f152a1646..53bb80050 100644
--- a/.opencode/bun.lock
+++ b/.opencode/bun.lock
@@ -5,7 +5,7 @@
"": {
"dependencies": {
"@octokit/rest": "^22.0.1",
- "@opencode-ai/plugin": "0.0.0-dev-202512160508",
+ "@opencode-ai/plugin": "1.0.162",
},
},
},
@@ -34,9 +34,9 @@
"@octokit/types": ["@octokit/[email protected]", "", { "dependencies": { "@octokit/openapi-types": "^27.0.0" } }, "sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg=="],
- "@opencode-ai/plugin": ["@opencode-ai/[email protected]", "", { "dependencies": { "@opencode-ai/sdk": "0.0.0-dev-202512160508", "zod": "4.1.8" } }, "sha512-GLnvMQhEWRHG9E84FyyQKPKi54bGUkytXPfZYjwNy9W6djw8zAW/kpeYPrdIJHPdTHk4OjIHEwoB1SXZzGaLFQ=="],
+ "@opencode-ai/plugin": ["@opencode-ai/[email protected]", "", { "dependencies": { "@opencode-ai/sdk": "1.0.162", "zod": "4.1.8" } }, "sha512-tiJw7SCfSlG/3tY2O0J2UT06OLuazOzsv1zYlFbLxLy/EVedtW0pzxYalO20a4e//vInvOXFkhd2jLyB5vNEVA=="],
- "@opencode-ai/sdk": ["@opencode-ai/[email protected]", "", {}, "sha512-ICpZ1bX528yQKqYGGyUJQMu3RY0F1pQ6RCoTJ4ESLiYmcXUY1EldgIidiwPA+A/zpEXLu2lPwPZ1LYn/bX6aFA=="],
+ "@opencode-ai/sdk": ["@opencode-ai/[email protected]", "", {}, "sha512-+XqRErBUt9eb1m3i/7WkZc/QCKCCjTaGV3MvhLhs/CUwbUn767D/ugzcG/i2ec8j/4nQmjJbjPDRmrQfvF1Qjw=="],
"before-after-hook": ["[email protected]", "", {}, "sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ=="],
diff --git a/.opencode/package.json b/.opencode/package.json
index 88fd8e891..3b93206b8 100644
--- a/.opencode/package.json
+++ b/.opencode/package.json
@@ -1,6 +1,6 @@
{
"dependencies": {
"@octokit/rest": "^22.0.1",
- "@opencode-ai/plugin": "0.0.0-dev-202512160508"
+ "@opencode-ai/plugin": "1.0.162"
}
}
diff --git a/packages/ui/src/components/markdown.css b/packages/ui/src/components/markdown.css
index f9cf3d7c0..892402478 100644
--- a/packages/ui/src/components/markdown.css
+++ b/packages/ui/src/components/markdown.css
@@ -5,30 +5,70 @@
color: var(--text-base);
text-wrap: pretty;
+ strong {
+ font-weight: var(--font-weight-medium);
+ }
+
/* text-12-regular */
font-family: var(--font-family-sans);
- font-size: var(--font-size-small);
+ font-size: var(--font-size-base);
font-style: normal;
font-weight: var(--font-weight-regular);
- line-height: var(--line-height-large); /* 166.667% */
+ line-height: var(--line-height-large);
letter-spacing: var(--letter-spacing-normal);
- h1,
- h2,
+ h1 {
+ margin-top: 40px;
+ font-weight: var(--font-weight-medium);
+ color: var(--text-strong);
+
+ strong {
+ font-weight: var(--font-weight-medium);
+ }
+ }
+
+ h2 {
+ margin-top: 32px;
+ font-weight: var(--font-weight-medium);
+ color: var(--text-strong);
+
+ strong {
+ font-weight: var(--font-weight-medium);
+ }
+ }
+
h3 {
- margin-top: 16px;
- margin-bottom: 8px;
+ margin-top: 24px;
font-weight: var(--font-weight-medium);
+ color: var(--text-strong);
+
+
+ strong {
+ font-weight: var(--font-weight-medium);
+ }
+ }
+
+ h1 {
+ font-size: 15px;
}
p {
+ margin-top: 16px;
margin-bottom: 8px;
}
ul,
ol {
margin-top: 16px;
- margin-bottom: 16px;
+
+ li {
+ margin-bottom: 12px;
+ line-height: var(--line-height-large);
+ }
+
+ li:last-child {
+ margin-bottom: 0;
+ }
}
hr {
@@ -37,6 +77,14 @@
border-color: var(--border-weaker-base);
}
+ .shiki {
+ font-size: 13px;
+ background: var(--surface-raised-base) !important; /* temporary fix to test style */
+ padding: 8px 12px;
+ border-radius: 4px;
+ border: 0.5px solid var(--border-weak-base);
+ }
+
pre {
margin-top: 2rem;
margin-bottom: 2rem;
@@ -51,7 +99,7 @@
:not(pre) > code {
font-family: var(--font-family-mono);
font-feature-settings: var(--font-family-mono--font-feature-settings);
- font-size: 0.9em;
+ font-size: 13px;
/* background-color: var(--surface-base-strong); */
/* padding: 0.15em 0.35em; */
/* border-radius: var(--radius-sm); */
diff --git a/packages/ui/src/components/markdown.tsx b/packages/ui/src/components/markdown.tsx
index 071132e80..7524f8921 100644
--- a/packages/ui/src/components/markdown.tsx
+++ b/packages/ui/src/components/markdown.tsx
@@ -7,6 +7,12 @@ function strip(text: string): string {
return match ? match[2] : text
}
+function removeParensAroundFileRefs(text: string): string {
+ // Remove parentheses around inline code that looks like a file reference
+ // Matches: (`path/to/file.ext`) or (`path/to/file.ext:1-10`) or (`file.ext:42`)
+ return text.replace(/\(\s*(`[^`]+\.[a-zA-Z0-9]+(?::\d+(?:-\d+)?)?`)\s*\)/g, "$1")
+}
+
export function Markdown(
props: ComponentProps<"div"> & {
text: string
@@ -17,7 +23,7 @@ export function Markdown(
const [local, others] = splitProps(props, ["text", "class", "classList"])
const marked = useMarked()
const [html] = createResource(
- () => strip(local.text),
+ () => removeParensAroundFileRefs(strip(local.text)),
async (markdown) => {
return marked.parse(markdown)
},
diff --git a/packages/ui/src/components/message-part.css b/packages/ui/src/components/message-part.css
index 01f34ceff..914202c45 100644
--- a/packages/ui/src/components/message-part.css
+++ b/packages/ui/src/components/message-part.css
@@ -77,6 +77,10 @@
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
+ background: var(--surface-inset-base);
+ padding: 2px 6px;
+ border-radius: 4px;
+ border: 0.5px solid var(--border-weak-base);
}
.text-text-strong {
diff --git a/packages/ui/src/components/session-review.css b/packages/ui/src/components/session-review.css
index ba195b9f2..0cd228592 100644
--- a/packages/ui/src/components/session-review.css
+++ b/packages/ui/src/components/session-review.css
@@ -28,7 +28,7 @@
[data-slot="session-review-title"] {
font-family: var(--font-family-sans);
- font-size: var(--font-size-base);
+ font-size: var(--font-size-large);
font-weight: var(--font-weight-medium);
line-height: var(--line-height-large);
color: var(--text-strong);
diff --git a/packages/ui/src/components/session-turn.css b/packages/ui/src/components/session-turn.css
index 3f0042ddc..4b8a44723 100644
--- a/packages/ui/src/components/session-turn.css
+++ b/packages/ui/src/components/session-turn.css
@@ -64,7 +64,7 @@
[data-slot="session-turn-message-title"] {
width: 100%;
- font-size: 15px; /* text-14-medium */
+ font-size: var(--font-size-large);
font-weight: 500;
color: var(--text-strong);
overflow: hidden;
diff --git a/packages/ui/src/styles/theme.css b/packages/ui/src/styles/theme.css
index 2a095b436..47032f0b4 100644
--- a/packages/ui/src/styles/theme.css
+++ b/packages/ui/src/styles/theme.css
@@ -10,9 +10,9 @@
--font-size-x-large: 20px;
--font-weight-regular: 400;
--font-weight-medium: 500;
- --line-height-large: 20px;
- --line-height-x-large: 24px;
- --line-height-2x-large: 30px;
+ --line-height-large: 150%;
+ --line-height-x-large: 180%;
+ --line-height-2x-large: 200%;
--letter-spacing-normal: 0;
--letter-spacing-tight: -0.1599999964237213;
--letter-spacing-tightest: -0.3199999928474426;
diff --git a/packages/web/src/components/share/content-markdown.tsx b/packages/web/src/components/share/content-markdown.tsx
index 69cde82b2..db3f4a516 100644
--- a/packages/web/src/components/share/content-markdown.tsx
+++ b/packages/web/src/components/share/content-markdown.tsx
@@ -29,7 +29,7 @@ interface Props {
}
export function ContentMarkdown(props: Props) {
const [html] = createResource(
- () => strip(props.text),
+ () => removeParensAroundFileRefs(strip(props.text)),
async (markdown) => {
return markedWithShiki.parse(markdown)
},
@@ -65,3 +65,9 @@ function strip(text: string): string {
const match = text.match(wrappedRe)
return match ? match[2] : text
}
+
+function removeParensAroundFileRefs(text: string): string {
+ // Remove parentheses around inline code that looks like a file reference
+ // Matches: (`path/to/file.ext`) or (`path/to/file.ext:1-10`) or (`file.ext:42`)
+ return text.replace(/\(\s*(`[^`]+\.[a-zA-Z0-9]+(?::\d+(?:-\d+)?)?`)\s*\)/g, "$1")
+}