Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
458 changes: 180 additions & 278 deletions bun.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@
"@types/semver": "7.7.1",
"@tsconfig/node22": "22.0.2",
"@tsconfig/bun": "1.0.9",
"@astrojs/starlight": "0.41.11",
"@cloudflare/workers-types": "4.20251008.0",
"@pierre/diffs": "1.6.1",
"@pierre/highlights": "0.2.0",
"astro": "7.3.8",
"@solid-primitives/event-listener": "2.4.6",
"@solid-primitives/media": "2.3.6",
"@solid-primitives/resize-observer": "2.2.0",
Expand Down Expand Up @@ -156,6 +158,8 @@
"bun-types": "1.4.4",
"effect": "catalog:",
"open": "11.0.4",
"astro": "catalog:",
"@astrojs/starlight": "catalog:",
"solid-js": "catalog:"
},
"patchedDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/posts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/mdx": "7.0.5",
"@fontsource/commit-mono": "5.3.0",
"astro": "7.3.8"
"astro": "catalog:"
},
"devDependencies": {
"@astrojs/cloudflare": "14.1.4",
Expand Down
2 changes: 2 additions & 0 deletions packages/web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
dist/
# generated types
.astro/
# local Cloudflare state
.wrangler/

# dependencies
node_modules/
Expand Down
14 changes: 10 additions & 4 deletions packages/web/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import solidJs from "@astrojs/solid-js"
import cloudflare from "@astrojs/cloudflare"
import theme from "toolbeam-docs-theme"
import config from "./config.mjs"
import { rehypeHeadingIds } from "@astrojs/markdown-remark"
import { rehypeHeadingIds, unified } from "@astrojs/markdown-remark"
import rehypeAutolinkHeadings from "rehype-autolink-headings"
import { copyFileSync } from "fs"
import { execFileSync } from "child_process"
Expand All @@ -16,7 +16,11 @@ export default defineConfig({
base: "/docs",
output: "server",
adapter: cloudflare({
configPath: process.env.SST_WRANGLER_PATH,
imageService: "passthrough",
// toolbeam-docs-theme passes its options to components through globalThis, which only works when pages
// prerender in the same Node process as the config.
prerenderEnvironment: "node",
}),
devToolbar: {
enabled: false,
Expand All @@ -25,7 +29,9 @@ export default defineConfig({
host: "0.0.0.0",
},
markdown: {
rehypePlugins: [rehypeHeadingIds, [rehypeAutolinkHeadings, { behavior: "wrap" }]],
processor: unified({
rehypePlugins: [rehypeHeadingIds, [rehypeAutolinkHeadings, { behavior: "wrap" }]],
}),
},
build: {},
integrations: [
Expand Down Expand Up @@ -327,9 +333,9 @@ function configSchema() {
name: "configSchema",
hooks: {
"astro:build:done": async () => {
execFileSync("bun", ["../schema/script/config-schema.ts", "./dist/config.json"], { stdio: "inherit" })
execFileSync("bun", ["../schema/script/config-schema.ts", "./dist/client/config.json"], { stdio: "inherit" })
// The V1 TUI schema is frozen in the console app since packages/opencode lives on the v1 branch.
copyFileSync("../console/app/public/tui.json", "./dist/tui.json")
copyFileSync("../console/app/public/tui.json", "./dist/client/tui.json")
},
},
}
Expand Down
12 changes: 6 additions & 6 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/cloudflare": "12.6.3",
"@astrojs/markdown-remark": "6.3.1",
"@astrojs/solid-js": "5.1.0",
"@astrojs/starlight": "0.34.3",
"@astrojs/cloudflare": "14.1.4",
"@astrojs/markdown-remark": "7.3.2",
"@astrojs/solid-js": "7.1.0",
"@astrojs/starlight": "catalog:",
"@fontsource/ibm-plex-mono": "5.2.5",
"@solid-primitives/resize-observer": "catalog:",
"@types/luxon": "catalog:",
"astro": "5.7.13",
"astro": "catalog:",
"diff": "catalog:",
"js-base64": "3.7.7",
"lang-map": "0.4.0",
Expand All @@ -34,7 +34,7 @@
},
"devDependencies": {
"@types/node": "catalog:",
"@astrojs/check": "0.9.6",
"@astrojs/check": "0.9.11",
"typescript": "catalog:"
}
}
4 changes: 2 additions & 2 deletions packages/web/src/components/Hero.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import Default from '@astrojs/starlight/components/Hero.astro';
import Lander from './Lander.astro';

const { slug } = Astro.locals.starlightRoute.entry;
const { id } = Astro.locals.starlightRoute.entry;
Comment thread
rekram1-node marked this conversation as resolved.
Resolved
---

{ slug === ""
{ id === ""
? <Lander {...Astro.props} />
: <Default {...Astro.props}><slot /></Default>
}
3 changes: 2 additions & 1 deletion packages/web/src/content.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineCollection, z } from "astro:content"
import { defineCollection } from "astro:content"
import { z } from "astro/zod"
import { docsLoader, i18nLoader } from "@astrojs/starlight/loaders"
import { docsSchema, i18nSchema } from "@astrojs/starlight/schema"
import en from "./content/i18n/en.json"
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/content/docs/da/agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ Hvis dette ikke er indstillet, vil agenten fortsætte med at iterere, indtil mod

Når grænsen er nået, modtager agenten en speciel systemprompt, der instruerer den om at svare med en opsummering af sit arbejde og anbefalede resterende opgaver.

:::caution
:::caution[Caution]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starlight 0.41 translates aside.caution to Danish as "Bemærk" (see its translations/da.json), so adding [Caution] hardcodes an English title on Danish pages just to match the old screenshots. The same applies to the other six Danish :::caution[Caution] changes. I'd keep plain :::caution and accept the localized title, like the Thai asides you already accepted.

Det gamle `maxSteps`-felt er forældet. Brug `steps` i stedet.
:::

Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/content/docs/da/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ Nøglen `experimental` indeholder muligheder, der er under aktiv udvikling.
}
```

:::caution
:::caution[Caution]
Eksperimentelle muligheder er ikke stabile. De kan ændres eller fjernes uden varsel.
:::

Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/content/docs/da/enterprise.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ npm login --registry=https://your-company.jfrog.io/api/npm/npm-virtual/
Dette opretter `~/.npmrc` med godkendelsesdetaljer. OpenCode vil automatisk
samle dette op.

:::caution
:::caution[Caution]
Du skal være logget ind i det private register, før du kører OpenCode.
:::

Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/content/docs/da/network.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export HTTP_PROXY=http://proxy.example.com:8080
export NO_PROXY=localhost,127.0.0.1
```

:::caution
:::caution[Caution]
TUI kommunikerer med en lokal HTTP-server. Du skal omgå proxyen for denne forbindelse for at forhindre routingsløjfer.
:::

Expand All @@ -38,7 +38,7 @@ Hvis din proxy kræver grundlæggende godkendelse, skal du inkludere legitimatio
export HTTPS_PROXY=http://username:password@proxy.example.com:8080
```

:::caution
:::caution[Caution]
Undgå hardkodning af adgangskoder. Brug miljøvariabler eller sikker lagring af legitimationsoplysninger.
:::

Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/content/docs/da/web.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ opencode web

Dette starter en lokal server på `127.0.0.1` med en tilfældig tilgængelig port og åbner automatisk OpenCode i din standardbrowser.

:::caution
:::caution[Caution]
Hvis `OPENCODE_SERVER_PASSWORD` ikke er indstillet, vil serveren være usikret. Dette er fint til lokal brug, men bør indstilles til netværksadgang.
:::

Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/content/docs/da/windows-wsl.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Hvis du foretrækker OpenCode Desktop-appen, men vil køre serveren i WSL:
Hvis `localhost` ikke virker i din opsætning, så forbind i stedet med WSL-IP-adressen (fra WSL: `hostname -I`) og brug `http://<wsl-ip>:4096`.
:::

:::caution
:::caution[Caution]
Når du bruger `--hostname 0.0.0.0`, skal du sætte `OPENCODE_SERVER_PASSWORD` for at sikre serveren.

```bash
Expand Down
6 changes: 3 additions & 3 deletions packages/web/src/content/docs/ru/providers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ OpenCode Go — это недорогой план подписки, обесп

2. Перейдите в [Azure AI Foundry](https://ai.azure.com/) и разверните модель.

:::примечание
:::note
Для правильной работы opencode имя развертывания должно совпадать с именем модели.
:::

Expand Down Expand Up @@ -418,7 +418,7 @@ OpenCode Go — это недорогой план подписки, обесп

2. Перейдите в [Azure AI Foundry](https://ai.azure.com/) и разверните модель.

:::примечание
:::note
Для правильной работы opencode имя развертывания должно совпадать с именем модели.
:::

Expand Down Expand Up @@ -1874,7 +1874,7 @@ Vercel AI Gateway позволяет получать доступ к модел
└
```

:::примечание
:::note
Выберите запоминающийся идентификатор, вы будете использовать его в своем файле конфигурации.
:::

Expand Down
29 changes: 16 additions & 13 deletions packages/web/src/pages/s/[id].astro
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,20 @@ const ogImage = `${config.socialCard}/opencode-share/${encodedTitle}.png?model=$
}}
>
<Share id={id} api={apiUrl} info={data.info} messages={messages} client:only="solid" />
{/* Inline so these page-wide overrides can't end up in a stylesheet shared with docs pages. */}
<style is:inline>
body > .page > .main-frame .main-pane > main > .content-panel:first-of-type {
display: none;
}
body > .page > .main-frame .main-pane > main {
padding: 0;
}
body > .page > .main-frame .main-pane > main > .content-panel + .content-panel {
border-top: none !important;
padding: 0;
}
.sl-markdown-content > astro-island > :first-child {
margin-top: 0;
}
</style>
</StarlightPage>

<style is:global>
body > .page > .main-frame .main-pane > main > .content-panel:first-of-type {
display: none;
}
body > .page > .main-frame .main-pane > main {
padding: 0;
}
body > .page > .main-frame .main-pane > main > .content-panel + .content-panel {
border-top: none !important;
padding: 0;
}
</style>
62 changes: 62 additions & 0 deletions packages/web/src/styles/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,30 @@ ol {
padding-inline-start: 1.5rem !important;
}

/* Starlight 0.41 draws the tab underline with `--sl-tab-color-border` and adds top padding with a tighter line height. */
/* Starlight 0.41 lays tabs out with flexbox and draws the underline as a box shadow. Keep the earlier border layout so tab heights, underline colors and focus rings stay the same. */
.sl-markdown-content .tab {
display: block;
margin-bottom: -2px;
}

.sl-markdown-content .tab > [role="tab"] {
padding-top: 0;
line-height: var(--sl-line-height);
box-shadow: none;
border-bottom-width: 2px;
border-bottom-style: solid;
}

.sl-markdown-content .tab > [role="tab"][aria-selected="true"] {
border-color: var(--color-text-strong);
}

/* Starlight 0.41 also spaces a nested list that ends a list item; earlier versions didn't. */
.sl-markdown-content li > :is(ul, ol):last-child {
margin-bottom: 0;
}

.social-icons a svg {
color: var(--color-text-weak) !important;
}
Expand Down Expand Up @@ -439,3 +459,45 @@ nav.sidebar ul.top-level > li > details > summary .group-label > span {
text-decoration: var(--shiki-dark-text-decoration) !important;
}
}

/* Starlight 0.41 relaxed this to `break-word`, so long inline code no longer shrinks: tables reflow and asides overflow on phones. Keep the earlier wrapping. */
p,
h1,
h2,
h3,
h4,
h5,
h6,
:not(pre) > code {
overflow-wrap: anywhere;
}

/* Starlight 0.41 adds automatic spacing between CJK and Latin characters. */
[lang] {
text-autospace: no-autospace;
}

/* Starlight 0.41 dims the language and theme picker labels. */
:is(starlight-lang-select, starlight-theme-select) label {
color: var(--sl-color-gray-1);
}

:is(starlight-lang-select, starlight-theme-select) label:hover {
color: var(--sl-color-gray-2);
}

/* Starlight 0.41 replaced the fade on mobile menu social links with a color change. */
.mobile-preferences .social-icons a:hover {
opacity: 0.66;
}

/* The CSS minifier keeps only the last of a duplicated prefixed/unprefixed pair, so the unprefixed one goes last. */
dialog[aria-label="Search"]::backdrop {
-webkit-backdrop-filter: blur(2px);
backdrop-filter: blur(2px);
}

mobile-starlight-toc nav {
-webkit-backdrop-filter: blur(8px);
backdrop-filter: blur(8px);
}
2 changes: 1 addition & 1 deletion services/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@astrojs/mdx": "7.0.5",
"astro": "7.3.8"
"astro": "catalog:"
},
"devDependencies": {
"@astrojs/cloudflare": "14.1.4",
Expand Down
Loading