@neurocode-ai/web 1.18.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -0
- package/astro.config.mjs +324 -0
- package/config.mjs +14 -0
- package/package.json +44 -0
- package/public/apple-touch-icon-v3.png +1 -0
- package/public/apple-touch-icon.png +1 -0
- package/public/favicon-96x96-v3.png +1 -0
- package/public/favicon-96x96.png +1 -0
- package/public/favicon-v3.ico +1 -0
- package/public/favicon-v3.svg +1 -0
- package/public/favicon.ico +1 -0
- package/public/favicon.svg +1 -0
- package/public/robots.txt +6 -0
- package/public/site.webmanifest +1 -0
- package/public/social-share-zen.png +1 -0
- package/public/social-share.png +1 -0
- package/public/theme.json +183 -0
- package/public/web-app-manifest-192x192.png +1 -0
- package/public/web-app-manifest-512x512.png +1 -0
- package/src/assets/lander/check.svg +2 -0
- package/src/assets/lander/copy.svg +2 -0
- package/src/assets/lander/screenshot-github.png +0 -0
- package/src/assets/lander/screenshot-splash.png +0 -0
- package/src/assets/lander/screenshot-vscode.png +0 -0
- package/src/assets/lander/screenshot.png +0 -0
- package/src/assets/logo-dark.svg +18 -0
- package/src/assets/logo-light.svg +18 -0
- package/src/assets/logo-ornate-dark.svg +18 -0
- package/src/assets/logo-ornate-light.svg +18 -0
- package/src/assets/web/web-homepage-active-session.png +0 -0
- package/src/assets/web/web-homepage-new-session.png +0 -0
- package/src/assets/web/web-homepage-see-servers.png +0 -0
- package/src/components/Footer.astro +125 -0
- package/src/components/Head.astro +54 -0
- package/src/components/Header.astro +136 -0
- package/src/components/Hero.astro +11 -0
- package/src/components/Lander.astro +721 -0
- package/src/components/LanguageSelect.astro +29 -0
- package/src/components/Share.tsx +644 -0
- package/src/components/SiteTitle.astro +59 -0
- package/src/components/icons/custom.tsx +87 -0
- package/src/components/icons/index.tsx +4454 -0
- package/src/components/share/common.tsx +128 -0
- package/src/components/share/content-bash.module.css +85 -0
- package/src/components/share/content-bash.tsx +67 -0
- package/src/components/share/content-code.module.css +26 -0
- package/src/components/share/content-code.tsx +30 -0
- package/src/components/share/content-diff.module.css +153 -0
- package/src/components/share/content-diff.tsx +240 -0
- package/src/components/share/content-error.module.css +64 -0
- package/src/components/share/content-error.tsx +25 -0
- package/src/components/share/content-markdown.module.css +154 -0
- package/src/components/share/content-markdown.tsx +74 -0
- package/src/components/share/content-text.module.css +63 -0
- package/src/components/share/content-text.tsx +38 -0
- package/src/components/share/copy-button.module.css +30 -0
- package/src/components/share/copy-button.tsx +36 -0
- package/src/components/share/part.module.css +428 -0
- package/src/components/share/part.tsx +816 -0
- package/src/components/share.module.css +832 -0
- package/src/content/docs/acp.mdx +156 -0
- package/src/content/docs/agents.mdx +781 -0
- package/src/content/docs/ar/acp.mdx +156 -0
- package/src/content/docs/ar/agents.mdx +754 -0
- package/src/content/docs/ar/cli.mdx +616 -0
- package/src/content/docs/ar/commands.mdx +322 -0
- package/src/content/docs/ar/config.mdx +685 -0
- package/src/content/docs/ar/custom-tools.mdx +196 -0
- package/src/content/docs/ar/ecosystem.mdx +78 -0
- package/src/content/docs/ar/enterprise.mdx +165 -0
- package/src/content/docs/ar/formatters.mdx +131 -0
- package/src/content/docs/ar/github.mdx +321 -0
- package/src/content/docs/ar/gitlab.mdx +195 -0
- package/src/content/docs/ar/go.mdx +224 -0
- package/src/content/docs/ar/ide.mdx +48 -0
- package/src/content/docs/ar/index.mdx +344 -0
- package/src/content/docs/ar/keybinds.mdx +194 -0
- package/src/content/docs/ar/lsp.mdx +207 -0
- package/src/content/docs/ar/mcp-servers.mdx +511 -0
- package/src/content/docs/ar/models.mdx +222 -0
- package/src/content/docs/ar/network.mdx +57 -0
- package/src/content/docs/ar/permissions.mdx +235 -0
- package/src/content/docs/ar/plugins.mdx +385 -0
- package/src/content/docs/ar/providers.mdx +1983 -0
- package/src/content/docs/ar/rules.mdx +180 -0
- package/src/content/docs/ar/sdk.mdx +463 -0
- package/src/content/docs/ar/server.mdx +287 -0
- package/src/content/docs/ar/share.mdx +127 -0
- package/src/content/docs/ar/skills.mdx +222 -0
- package/src/content/docs/ar/themes.mdx +369 -0
- package/src/content/docs/ar/tools.mdx +341 -0
- package/src/content/docs/ar/troubleshooting.mdx +299 -0
- package/src/content/docs/ar/tui.mdx +426 -0
- package/src/content/docs/ar/web.mdx +142 -0
- package/src/content/docs/ar/windows-wsl.mdx +113 -0
- package/src/content/docs/ar/zen.mdx +332 -0
- package/src/content/docs/bs/acp.mdx +156 -0
- package/src/content/docs/bs/agents.mdx +754 -0
- package/src/content/docs/bs/cli.mdx +614 -0
- package/src/content/docs/bs/commands.mdx +316 -0
- package/src/content/docs/bs/config.mdx +685 -0
- package/src/content/docs/bs/custom-tools.mdx +195 -0
- package/src/content/docs/bs/ecosystem.mdx +78 -0
- package/src/content/docs/bs/enterprise.mdx +165 -0
- package/src/content/docs/bs/formatters.mdx +124 -0
- package/src/content/docs/bs/github.mdx +311 -0
- package/src/content/docs/bs/gitlab.mdx +188 -0
- package/src/content/docs/bs/go.mdx +238 -0
- package/src/content/docs/bs/ide.mdx +47 -0
- package/src/content/docs/bs/index.mdx +323 -0
- package/src/content/docs/bs/keybinds.mdx +194 -0
- package/src/content/docs/bs/lsp.mdx +204 -0
- package/src/content/docs/bs/mcp-servers.mdx +482 -0
- package/src/content/docs/bs/models.mdx +201 -0
- package/src/content/docs/bs/network.mdx +51 -0
- package/src/content/docs/bs/permissions.mdx +228 -0
- package/src/content/docs/bs/plugins.mdx +371 -0
- package/src/content/docs/bs/providers.mdx +1993 -0
- package/src/content/docs/bs/rules.mdx +180 -0
- package/src/content/docs/bs/sdk.mdx +463 -0
- package/src/content/docs/bs/server.mdx +284 -0
- package/src/content/docs/bs/share.mdx +127 -0
- package/src/content/docs/bs/skills.mdx +222 -0
- package/src/content/docs/bs/themes.mdx +369 -0
- package/src/content/docs/bs/tools.mdx +341 -0
- package/src/content/docs/bs/troubleshooting.mdx +300 -0
- package/src/content/docs/bs/tui.mdx +432 -0
- package/src/content/docs/bs/web.mdx +142 -0
- package/src/content/docs/bs/windows-wsl.mdx +113 -0
- package/src/content/docs/bs/zen.mdx +350 -0
- package/src/content/docs/cli.mdx +733 -0
- package/src/content/docs/commands.mdx +323 -0
- package/src/content/docs/config.mdx +941 -0
- package/src/content/docs/custom-tools.mdx +196 -0
- package/src/content/docs/da/acp.mdx +156 -0
- package/src/content/docs/da/agents.mdx +755 -0
- package/src/content/docs/da/cli.mdx +617 -0
- package/src/content/docs/da/commands.mdx +323 -0
- package/src/content/docs/da/config.mdx +688 -0
- package/src/content/docs/da/custom-tools.mdx +196 -0
- package/src/content/docs/da/ecosystem.mdx +78 -0
- package/src/content/docs/da/enterprise.mdx +170 -0
- package/src/content/docs/da/formatters.mdx +131 -0
- package/src/content/docs/da/github.mdx +321 -0
- package/src/content/docs/da/gitlab.mdx +195 -0
- package/src/content/docs/da/go.mdx +238 -0
- package/src/content/docs/da/ide.mdx +48 -0
- package/src/content/docs/da/index.mdx +360 -0
- package/src/content/docs/da/keybinds.mdx +194 -0
- package/src/content/docs/da/lsp.mdx +208 -0
- package/src/content/docs/da/mcp-servers.mdx +511 -0
- package/src/content/docs/da/models.mdx +223 -0
- package/src/content/docs/da/network.mdx +57 -0
- package/src/content/docs/da/permissions.mdx +235 -0
- package/src/content/docs/da/plugins.mdx +389 -0
- package/src/content/docs/da/providers.mdx +1981 -0
- package/src/content/docs/da/rules.mdx +180 -0
- package/src/content/docs/da/sdk.mdx +463 -0
- package/src/content/docs/da/server.mdx +287 -0
- package/src/content/docs/da/share.mdx +128 -0
- package/src/content/docs/da/skills.mdx +222 -0
- package/src/content/docs/da/themes.mdx +369 -0
- package/src/content/docs/da/tools.mdx +341 -0
- package/src/content/docs/da/troubleshooting.mdx +300 -0
- package/src/content/docs/da/tui.mdx +426 -0
- package/src/content/docs/da/web.mdx +142 -0
- package/src/content/docs/da/windows-wsl.mdx +113 -0
- package/src/content/docs/da/zen.mdx +345 -0
- package/src/content/docs/de/acp.mdx +156 -0
- package/src/content/docs/de/agents.mdx +741 -0
- package/src/content/docs/de/cli.mdx +616 -0
- package/src/content/docs/de/commands.mdx +323 -0
- package/src/content/docs/de/config.mdx +684 -0
- package/src/content/docs/de/custom-tools.mdx +170 -0
- package/src/content/docs/de/ecosystem.mdx +78 -0
- package/src/content/docs/de/enterprise.mdx +170 -0
- package/src/content/docs/de/formatters.mdx +131 -0
- package/src/content/docs/de/github.mdx +321 -0
- package/src/content/docs/de/gitlab.mdx +195 -0
- package/src/content/docs/de/go.mdx +226 -0
- package/src/content/docs/de/ide.mdx +48 -0
- package/src/content/docs/de/index.mdx +356 -0
- package/src/content/docs/de/keybinds.mdx +194 -0
- package/src/content/docs/de/lsp.mdx +207 -0
- package/src/content/docs/de/mcp-servers.mdx +511 -0
- package/src/content/docs/de/models.mdx +223 -0
- package/src/content/docs/de/network.mdx +57 -0
- package/src/content/docs/de/permissions.mdx +235 -0
- package/src/content/docs/de/plugins.mdx +384 -0
- package/src/content/docs/de/providers.mdx +1987 -0
- package/src/content/docs/de/rules.mdx +190 -0
- package/src/content/docs/de/sdk.mdx +465 -0
- package/src/content/docs/de/server.mdx +291 -0
- package/src/content/docs/de/share.mdx +130 -0
- package/src/content/docs/de/skills.mdx +222 -0
- package/src/content/docs/de/themes.mdx +372 -0
- package/src/content/docs/de/tools.mdx +352 -0
- package/src/content/docs/de/troubleshooting.mdx +300 -0
- package/src/content/docs/de/tui.mdx +429 -0
- package/src/content/docs/de/web.mdx +142 -0
- package/src/content/docs/de/windows-wsl.mdx +115 -0
- package/src/content/docs/de/zen.mdx +327 -0
- package/src/content/docs/ecosystem.mdx +83 -0
- package/src/content/docs/enterprise.mdx +169 -0
- package/src/content/docs/es/acp.mdx +156 -0
- package/src/content/docs/es/agents.mdx +755 -0
- package/src/content/docs/es/cli.mdx +616 -0
- package/src/content/docs/es/commands.mdx +323 -0
- package/src/content/docs/es/config.mdx +685 -0
- package/src/content/docs/es/custom-tools.mdx +196 -0
- package/src/content/docs/es/ecosystem.mdx +78 -0
- package/src/content/docs/es/enterprise.mdx +170 -0
- package/src/content/docs/es/formatters.mdx +131 -0
- package/src/content/docs/es/github.mdx +321 -0
- package/src/content/docs/es/gitlab.mdx +195 -0
- package/src/content/docs/es/go.mdx +238 -0
- package/src/content/docs/es/ide.mdx +48 -0
- package/src/content/docs/es/index.mdx +345 -0
- package/src/content/docs/es/keybinds.mdx +194 -0
- package/src/content/docs/es/lsp.mdx +208 -0
- package/src/content/docs/es/mcp-servers.mdx +511 -0
- package/src/content/docs/es/models.mdx +223 -0
- package/src/content/docs/es/network.mdx +57 -0
- package/src/content/docs/es/permissions.mdx +235 -0
- package/src/content/docs/es/plugins.mdx +389 -0
- package/src/content/docs/es/providers.mdx +1989 -0
- package/src/content/docs/es/rules.mdx +180 -0
- package/src/content/docs/es/sdk.mdx +463 -0
- package/src/content/docs/es/server.mdx +287 -0
- package/src/content/docs/es/share.mdx +128 -0
- package/src/content/docs/es/skills.mdx +222 -0
- package/src/content/docs/es/themes.mdx +369 -0
- package/src/content/docs/es/tools.mdx +341 -0
- package/src/content/docs/es/troubleshooting.mdx +300 -0
- package/src/content/docs/es/tui.mdx +429 -0
- package/src/content/docs/es/web.mdx +142 -0
- package/src/content/docs/es/windows-wsl.mdx +113 -0
- package/src/content/docs/es/zen.mdx +345 -0
- package/src/content/docs/formatters.mdx +143 -0
- package/src/content/docs/fr/acp.mdx +156 -0
- package/src/content/docs/fr/agents.mdx +755 -0
- package/src/content/docs/fr/cli.mdx +617 -0
- package/src/content/docs/fr/commands.mdx +322 -0
- package/src/content/docs/fr/config.mdx +686 -0
- package/src/content/docs/fr/custom-tools.mdx +170 -0
- package/src/content/docs/fr/ecosystem.mdx +78 -0
- package/src/content/docs/fr/enterprise.mdx +165 -0
- package/src/content/docs/fr/formatters.mdx +131 -0
- package/src/content/docs/fr/github.mdx +322 -0
- package/src/content/docs/fr/gitlab.mdx +195 -0
- package/src/content/docs/fr/go.mdx +224 -0
- package/src/content/docs/fr/ide.mdx +48 -0
- package/src/content/docs/fr/index.mdx +344 -0
- package/src/content/docs/fr/keybinds.mdx +194 -0
- package/src/content/docs/fr/lsp.mdx +208 -0
- package/src/content/docs/fr/mcp-servers.mdx +511 -0
- package/src/content/docs/fr/models.mdx +222 -0
- package/src/content/docs/fr/network.mdx +57 -0
- package/src/content/docs/fr/permissions.mdx +235 -0
- package/src/content/docs/fr/plugins.mdx +384 -0
- package/src/content/docs/fr/providers.mdx +1996 -0
- package/src/content/docs/fr/rules.mdx +180 -0
- package/src/content/docs/fr/sdk.mdx +463 -0
- package/src/content/docs/fr/server.mdx +287 -0
- package/src/content/docs/fr/share.mdx +128 -0
- package/src/content/docs/fr/skills.mdx +222 -0
- package/src/content/docs/fr/themes.mdx +369 -0
- package/src/content/docs/fr/tools.mdx +341 -0
- package/src/content/docs/fr/troubleshooting.mdx +300 -0
- package/src/content/docs/fr/tui.mdx +429 -0
- package/src/content/docs/fr/web.mdx +142 -0
- package/src/content/docs/fr/windows-wsl.mdx +113 -0
- package/src/content/docs/fr/zen.mdx +327 -0
- package/src/content/docs/github.mdx +321 -0
- package/src/content/docs/gitlab.mdx +195 -0
- package/src/content/docs/go.mdx +238 -0
- package/src/content/docs/ide.mdx +48 -0
- package/src/content/docs/index.mdx +360 -0
- package/src/content/docs/it/acp.mdx +155 -0
- package/src/content/docs/it/agents.mdx +753 -0
- package/src/content/docs/it/cli.mdx +617 -0
- package/src/content/docs/it/commands.mdx +322 -0
- package/src/content/docs/it/config.mdx +685 -0
- package/src/content/docs/it/custom-tools.mdx +196 -0
- package/src/content/docs/it/ecosystem.mdx +78 -0
- package/src/content/docs/it/enterprise.mdx +165 -0
- package/src/content/docs/it/formatters.mdx +132 -0
- package/src/content/docs/it/github.mdx +321 -0
- package/src/content/docs/it/gitlab.mdx +195 -0
- package/src/content/docs/it/go.mdx +236 -0
- package/src/content/docs/it/ide.mdx +48 -0
- package/src/content/docs/it/index.mdx +344 -0
- package/src/content/docs/it/keybinds.mdx +194 -0
- package/src/content/docs/it/lsp.mdx +208 -0
- package/src/content/docs/it/mcp-servers.mdx +511 -0
- package/src/content/docs/it/models.mdx +222 -0
- package/src/content/docs/it/network.mdx +57 -0
- package/src/content/docs/it/permissions.mdx +235 -0
- package/src/content/docs/it/plugins.mdx +388 -0
- package/src/content/docs/it/providers.mdx +1964 -0
- package/src/content/docs/it/rules.mdx +180 -0
- package/src/content/docs/it/sdk.mdx +463 -0
- package/src/content/docs/it/server.mdx +284 -0
- package/src/content/docs/it/share.mdx +127 -0
- package/src/content/docs/it/skills.mdx +222 -0
- package/src/content/docs/it/themes.mdx +369 -0
- package/src/content/docs/it/tools.mdx +341 -0
- package/src/content/docs/it/troubleshooting.mdx +299 -0
- package/src/content/docs/it/tui.mdx +426 -0
- package/src/content/docs/it/web.mdx +142 -0
- package/src/content/docs/it/windows-wsl.mdx +113 -0
- package/src/content/docs/it/zen.mdx +345 -0
- package/src/content/docs/ja/acp.mdx +155 -0
- package/src/content/docs/ja/agents.mdx +751 -0
- package/src/content/docs/ja/cli.mdx +616 -0
- package/src/content/docs/ja/commands.mdx +322 -0
- package/src/content/docs/ja/config.mdx +684 -0
- package/src/content/docs/ja/custom-tools.mdx +196 -0
- package/src/content/docs/ja/ecosystem.mdx +78 -0
- package/src/content/docs/ja/enterprise.mdx +166 -0
- package/src/content/docs/ja/formatters.mdx +132 -0
- package/src/content/docs/ja/github.mdx +322 -0
- package/src/content/docs/ja/gitlab.mdx +195 -0
- package/src/content/docs/ja/go.mdx +224 -0
- package/src/content/docs/ja/ide.mdx +48 -0
- package/src/content/docs/ja/index.mdx +350 -0
- package/src/content/docs/ja/keybinds.mdx +194 -0
- package/src/content/docs/ja/lsp.mdx +208 -0
- package/src/content/docs/ja/mcp-servers.mdx +511 -0
- package/src/content/docs/ja/models.mdx +221 -0
- package/src/content/docs/ja/network.mdx +55 -0
- package/src/content/docs/ja/permissions.mdx +282 -0
- package/src/content/docs/ja/plugins.mdx +461 -0
- package/src/content/docs/ja/providers.mdx +1998 -0
- package/src/content/docs/ja/rules.mdx +179 -0
- package/src/content/docs/ja/sdk.mdx +463 -0
- package/src/content/docs/ja/server.mdx +282 -0
- package/src/content/docs/ja/share.mdx +128 -0
- package/src/content/docs/ja/skills.mdx +222 -0
- package/src/content/docs/ja/themes.mdx +667 -0
- package/src/content/docs/ja/tools.mdx +341 -0
- package/src/content/docs/ja/troubleshooting.mdx +300 -0
- package/src/content/docs/ja/tui.mdx +423 -0
- package/src/content/docs/ja/web.mdx +143 -0
- package/src/content/docs/ja/windows-wsl.mdx +116 -0
- package/src/content/docs/ja/zen.mdx +327 -0
- package/src/content/docs/keybinds.mdx +299 -0
- package/src/content/docs/ko/acp.mdx +156 -0
- package/src/content/docs/ko/agents.mdx +754 -0
- package/src/content/docs/ko/cli.mdx +616 -0
- package/src/content/docs/ko/commands.mdx +323 -0
- package/src/content/docs/ko/config.mdx +685 -0
- package/src/content/docs/ko/custom-tools.mdx +196 -0
- package/src/content/docs/ko/ecosystem.mdx +78 -0
- package/src/content/docs/ko/enterprise.mdx +165 -0
- package/src/content/docs/ko/formatters.mdx +132 -0
- package/src/content/docs/ko/github.mdx +321 -0
- package/src/content/docs/ko/gitlab.mdx +195 -0
- package/src/content/docs/ko/go.mdx +224 -0
- package/src/content/docs/ko/ide.mdx +48 -0
- package/src/content/docs/ko/index.mdx +344 -0
- package/src/content/docs/ko/keybinds.mdx +194 -0
- package/src/content/docs/ko/lsp.mdx +208 -0
- package/src/content/docs/ko/mcp-servers.mdx +511 -0
- package/src/content/docs/ko/models.mdx +223 -0
- package/src/content/docs/ko/network.mdx +57 -0
- package/src/content/docs/ko/permissions.mdx +235 -0
- package/src/content/docs/ko/plugins.mdx +388 -0
- package/src/content/docs/ko/providers.mdx +1984 -0
- package/src/content/docs/ko/rules.mdx +179 -0
- package/src/content/docs/ko/sdk.mdx +463 -0
- package/src/content/docs/ko/server.mdx +287 -0
- package/src/content/docs/ko/share.mdx +128 -0
- package/src/content/docs/ko/skills.mdx +222 -0
- package/src/content/docs/ko/themes.mdx +369 -0
- package/src/content/docs/ko/tools.mdx +341 -0
- package/src/content/docs/ko/troubleshooting.mdx +303 -0
- package/src/content/docs/ko/tui.mdx +425 -0
- package/src/content/docs/ko/web.mdx +142 -0
- package/src/content/docs/ko/windows-wsl.mdx +119 -0
- package/src/content/docs/ko/zen.mdx +327 -0
- package/src/content/docs/lsp.mdx +214 -0
- package/src/content/docs/mcp-servers.mdx +512 -0
- package/src/content/docs/models.mdx +223 -0
- package/src/content/docs/nb/acp.mdx +156 -0
- package/src/content/docs/nb/agents.mdx +754 -0
- package/src/content/docs/nb/cli.mdx +617 -0
- package/src/content/docs/nb/commands.mdx +323 -0
- package/src/content/docs/nb/config.mdx +688 -0
- package/src/content/docs/nb/custom-tools.mdx +196 -0
- package/src/content/docs/nb/ecosystem.mdx +78 -0
- package/src/content/docs/nb/enterprise.mdx +170 -0
- package/src/content/docs/nb/formatters.mdx +131 -0
- package/src/content/docs/nb/github.mdx +325 -0
- package/src/content/docs/nb/gitlab.mdx +195 -0
- package/src/content/docs/nb/go.mdx +238 -0
- package/src/content/docs/nb/ide.mdx +48 -0
- package/src/content/docs/nb/index.mdx +359 -0
- package/src/content/docs/nb/keybinds.mdx +194 -0
- package/src/content/docs/nb/lsp.mdx +208 -0
- package/src/content/docs/nb/mcp-servers.mdx +624 -0
- package/src/content/docs/nb/models.mdx +223 -0
- package/src/content/docs/nb/network.mdx +57 -0
- package/src/content/docs/nb/permissions.mdx +235 -0
- package/src/content/docs/nb/plugins.mdx +389 -0
- package/src/content/docs/nb/providers.mdx +1956 -0
- package/src/content/docs/nb/rules.mdx +180 -0
- package/src/content/docs/nb/sdk.mdx +463 -0
- package/src/content/docs/nb/server.mdx +287 -0
- package/src/content/docs/nb/share.mdx +128 -0
- package/src/content/docs/nb/skills.mdx +222 -0
- package/src/content/docs/nb/themes.mdx +369 -0
- package/src/content/docs/nb/tools.mdx +341 -0
- package/src/content/docs/nb/troubleshooting.mdx +225 -0
- package/src/content/docs/nb/tui.mdx +429 -0
- package/src/content/docs/nb/web.mdx +105 -0
- package/src/content/docs/nb/windows-wsl.mdx +113 -0
- package/src/content/docs/nb/zen.mdx +345 -0
- package/src/content/docs/network.mdx +57 -0
- package/src/content/docs/permissions.mdx +256 -0
- package/src/content/docs/pl/acp.mdx +158 -0
- package/src/content/docs/pl/agents.mdx +754 -0
- package/src/content/docs/pl/cli.mdx +617 -0
- package/src/content/docs/pl/commands.mdx +323 -0
- package/src/content/docs/pl/config.mdx +680 -0
- package/src/content/docs/pl/custom-tools.mdx +196 -0
- package/src/content/docs/pl/ecosystem.mdx +78 -0
- package/src/content/docs/pl/enterprise.mdx +170 -0
- package/src/content/docs/pl/formatters.mdx +131 -0
- package/src/content/docs/pl/github.mdx +321 -0
- package/src/content/docs/pl/gitlab.mdx +195 -0
- package/src/content/docs/pl/go.mdx +230 -0
- package/src/content/docs/pl/ide.mdx +48 -0
- package/src/content/docs/pl/index.mdx +347 -0
- package/src/content/docs/pl/keybinds.mdx +194 -0
- package/src/content/docs/pl/lsp.mdx +208 -0
- package/src/content/docs/pl/mcp-servers.mdx +511 -0
- package/src/content/docs/pl/models.mdx +223 -0
- package/src/content/docs/pl/network.mdx +57 -0
- package/src/content/docs/pl/permissions.mdx +235 -0
- package/src/content/docs/pl/plugins.mdx +385 -0
- package/src/content/docs/pl/providers.mdx +1986 -0
- package/src/content/docs/pl/rules.mdx +180 -0
- package/src/content/docs/pl/sdk.mdx +463 -0
- package/src/content/docs/pl/server.mdx +287 -0
- package/src/content/docs/pl/share.mdx +128 -0
- package/src/content/docs/pl/skills.mdx +222 -0
- package/src/content/docs/pl/themes.mdx +369 -0
- package/src/content/docs/pl/tools.mdx +341 -0
- package/src/content/docs/pl/troubleshooting.mdx +300 -0
- package/src/content/docs/pl/tui.mdx +429 -0
- package/src/content/docs/pl/web.mdx +142 -0
- package/src/content/docs/pl/windows-wsl.mdx +113 -0
- package/src/content/docs/pl/zen.mdx +344 -0
- package/src/content/docs/plugins.mdx +389 -0
- package/src/content/docs/policies.mdx +137 -0
- package/src/content/docs/providers.mdx +2501 -0
- package/src/content/docs/pt-br/acp.mdx +156 -0
- package/src/content/docs/pt-br/agents.mdx +755 -0
- package/src/content/docs/pt-br/cli.mdx +616 -0
- package/src/content/docs/pt-br/commands.mdx +322 -0
- package/src/content/docs/pt-br/config.mdx +687 -0
- package/src/content/docs/pt-br/custom-tools.mdx +196 -0
- package/src/content/docs/pt-br/ecosystem.mdx +78 -0
- package/src/content/docs/pt-br/enterprise.mdx +166 -0
- package/src/content/docs/pt-br/formatters.mdx +131 -0
- package/src/content/docs/pt-br/github.mdx +321 -0
- package/src/content/docs/pt-br/gitlab.mdx +195 -0
- package/src/content/docs/pt-br/go.mdx +238 -0
- package/src/content/docs/pt-br/ide.mdx +48 -0
- package/src/content/docs/pt-br/index.mdx +344 -0
- package/src/content/docs/pt-br/keybinds.mdx +194 -0
- package/src/content/docs/pt-br/lsp.mdx +208 -0
- package/src/content/docs/pt-br/mcp-servers.mdx +511 -0
- package/src/content/docs/pt-br/models.mdx +222 -0
- package/src/content/docs/pt-br/network.mdx +57 -0
- package/src/content/docs/pt-br/permissions.mdx +235 -0
- package/src/content/docs/pt-br/plugins.mdx +388 -0
- package/src/content/docs/pt-br/providers.mdx +1989 -0
- package/src/content/docs/pt-br/rules.mdx +180 -0
- package/src/content/docs/pt-br/sdk.mdx +463 -0
- package/src/content/docs/pt-br/server.mdx +284 -0
- package/src/content/docs/pt-br/share.mdx +127 -0
- package/src/content/docs/pt-br/skills.mdx +222 -0
- package/src/content/docs/pt-br/themes.mdx +369 -0
- package/src/content/docs/pt-br/tools.mdx +341 -0
- package/src/content/docs/pt-br/troubleshooting.mdx +299 -0
- package/src/content/docs/pt-br/tui.mdx +426 -0
- package/src/content/docs/pt-br/web.mdx +142 -0
- package/src/content/docs/pt-br/windows-wsl.mdx +113 -0
- package/src/content/docs/pt-br/zen.mdx +327 -0
- package/src/content/docs/references.mdx +157 -0
- package/src/content/docs/ru/acp.mdx +156 -0
- package/src/content/docs/ru/agents.mdx +754 -0
- package/src/content/docs/ru/cli.mdx +617 -0
- package/src/content/docs/ru/commands.mdx +323 -0
- package/src/content/docs/ru/config.mdx +685 -0
- package/src/content/docs/ru/custom-tools.mdx +170 -0
- package/src/content/docs/ru/ecosystem.mdx +78 -0
- package/src/content/docs/ru/enterprise.mdx +168 -0
- package/src/content/docs/ru/formatters.mdx +119 -0
- package/src/content/docs/ru/github.mdx +321 -0
- package/src/content/docs/ru/gitlab.mdx +195 -0
- package/src/content/docs/ru/go.mdx +238 -0
- package/src/content/docs/ru/ide.mdx +48 -0
- package/src/content/docs/ru/index.mdx +356 -0
- package/src/content/docs/ru/keybinds.mdx +194 -0
- package/src/content/docs/ru/lsp.mdx +207 -0
- package/src/content/docs/ru/mcp-servers.mdx +511 -0
- package/src/content/docs/ru/models.mdx +223 -0
- package/src/content/docs/ru/network.mdx +57 -0
- package/src/content/docs/ru/permissions.mdx +235 -0
- package/src/content/docs/ru/plugins.mdx +385 -0
- package/src/content/docs/ru/providers.mdx +1987 -0
- package/src/content/docs/ru/rules.mdx +180 -0
- package/src/content/docs/ru/sdk.mdx +463 -0
- package/src/content/docs/ru/server.mdx +287 -0
- package/src/content/docs/ru/share.mdx +128 -0
- package/src/content/docs/ru/skills.mdx +222 -0
- package/src/content/docs/ru/themes.mdx +369 -0
- package/src/content/docs/ru/tools.mdx +341 -0
- package/src/content/docs/ru/troubleshooting.mdx +300 -0
- package/src/content/docs/ru/tui.mdx +429 -0
- package/src/content/docs/ru/web.mdx +142 -0
- package/src/content/docs/ru/windows-wsl.mdx +113 -0
- package/src/content/docs/ru/zen.mdx +345 -0
- package/src/content/docs/rules.mdx +188 -0
- package/src/content/docs/sdk.mdx +463 -0
- package/src/content/docs/server.mdx +287 -0
- package/src/content/docs/share.mdx +128 -0
- package/src/content/docs/skills.mdx +222 -0
- package/src/content/docs/th/acp.mdx +156 -0
- package/src/content/docs/th/agents.mdx +744 -0
- package/src/content/docs/th/cli.mdx +618 -0
- package/src/content/docs/th/commands.mdx +320 -0
- package/src/content/docs/th/config.mdx +690 -0
- package/src/content/docs/th/custom-tools.mdx +196 -0
- package/src/content/docs/th/ecosystem.mdx +78 -0
- package/src/content/docs/th/enterprise.mdx +170 -0
- package/src/content/docs/th/formatters.mdx +131 -0
- package/src/content/docs/th/github.mdx +321 -0
- package/src/content/docs/th/gitlab.mdx +195 -0
- package/src/content/docs/th/go.mdx +224 -0
- package/src/content/docs/th/ide.mdx +48 -0
- package/src/content/docs/th/index.mdx +360 -0
- package/src/content/docs/th/keybinds.mdx +194 -0
- package/src/content/docs/th/lsp.mdx +208 -0
- package/src/content/docs/th/mcp-servers.mdx +511 -0
- package/src/content/docs/th/models.mdx +223 -0
- package/src/content/docs/th/network.mdx +57 -0
- package/src/content/docs/th/permissions.mdx +235 -0
- package/src/content/docs/th/plugins.mdx +389 -0
- package/src/content/docs/th/providers.mdx +2532 -0
- package/src/content/docs/th/rules.mdx +180 -0
- package/src/content/docs/th/sdk.mdx +463 -0
- package/src/content/docs/th/server.mdx +287 -0
- package/src/content/docs/th/share.mdx +128 -0
- package/src/content/docs/th/skills.mdx +222 -0
- package/src/content/docs/th/themes.mdx +369 -0
- package/src/content/docs/th/tools.mdx +341 -0
- package/src/content/docs/th/troubleshooting.mdx +300 -0
- package/src/content/docs/th/tui.mdx +429 -0
- package/src/content/docs/th/web.mdx +142 -0
- package/src/content/docs/th/windows-wsl.mdx +113 -0
- package/src/content/docs/th/zen.mdx +329 -0
- package/src/content/docs/themes.mdx +369 -0
- package/src/content/docs/tools.mdx +345 -0
- package/src/content/docs/tr/acp.mdx +156 -0
- package/src/content/docs/tr/agents.mdx +754 -0
- package/src/content/docs/tr/cli.mdx +617 -0
- package/src/content/docs/tr/commands.mdx +323 -0
- package/src/content/docs/tr/config.mdx +687 -0
- package/src/content/docs/tr/custom-tools.mdx +196 -0
- package/src/content/docs/tr/ecosystem.mdx +78 -0
- package/src/content/docs/tr/enterprise.mdx +170 -0
- package/src/content/docs/tr/formatters.mdx +131 -0
- package/src/content/docs/tr/github.mdx +321 -0
- package/src/content/docs/tr/gitlab.mdx +195 -0
- package/src/content/docs/tr/go.mdx +224 -0
- package/src/content/docs/tr/ide.mdx +48 -0
- package/src/content/docs/tr/index.mdx +347 -0
- package/src/content/docs/tr/keybinds.mdx +194 -0
- package/src/content/docs/tr/lsp.mdx +208 -0
- package/src/content/docs/tr/mcp-servers.mdx +511 -0
- package/src/content/docs/tr/models.mdx +223 -0
- package/src/content/docs/tr/network.mdx +57 -0
- package/src/content/docs/tr/permissions.mdx +235 -0
- package/src/content/docs/tr/plugins.mdx +388 -0
- package/src/content/docs/tr/providers.mdx +1988 -0
- package/src/content/docs/tr/rules.mdx +180 -0
- package/src/content/docs/tr/sdk.mdx +463 -0
- package/src/content/docs/tr/server.mdx +285 -0
- package/src/content/docs/tr/share.mdx +127 -0
- package/src/content/docs/tr/skills.mdx +222 -0
- package/src/content/docs/tr/themes.mdx +369 -0
- package/src/content/docs/tr/tools.mdx +341 -0
- package/src/content/docs/tr/troubleshooting.mdx +299 -0
- package/src/content/docs/tr/tui.mdx +427 -0
- package/src/content/docs/tr/web.mdx +142 -0
- package/src/content/docs/tr/windows-wsl.mdx +113 -0
- package/src/content/docs/tr/zen.mdx +327 -0
- package/src/content/docs/troubleshooting.mdx +314 -0
- package/src/content/docs/tui.mdx +427 -0
- package/src/content/docs/web.mdx +142 -0
- package/src/content/docs/windows-wsl.mdx +112 -0
- package/src/content/docs/zen.mdx +345 -0
- package/src/content/docs/zh-cn/acp.mdx +156 -0
- package/src/content/docs/zh-cn/agents.mdx +754 -0
- package/src/content/docs/zh-cn/cli.mdx +617 -0
- package/src/content/docs/zh-cn/commands.mdx +322 -0
- package/src/content/docs/zh-cn/config.mdx +683 -0
- package/src/content/docs/zh-cn/custom-tools.mdx +196 -0
- package/src/content/docs/zh-cn/ecosystem.mdx +78 -0
- package/src/content/docs/zh-cn/enterprise.mdx +165 -0
- package/src/content/docs/zh-cn/formatters.mdx +132 -0
- package/src/content/docs/zh-cn/github.mdx +321 -0
- package/src/content/docs/zh-cn/gitlab.mdx +194 -0
- package/src/content/docs/zh-cn/go.mdx +224 -0
- package/src/content/docs/zh-cn/ide.mdx +48 -0
- package/src/content/docs/zh-cn/index.mdx +343 -0
- package/src/content/docs/zh-cn/keybinds.mdx +194 -0
- package/src/content/docs/zh-cn/lsp.mdx +208 -0
- package/src/content/docs/zh-cn/mcp-servers.mdx +511 -0
- package/src/content/docs/zh-cn/models.mdx +222 -0
- package/src/content/docs/zh-cn/network.mdx +57 -0
- package/src/content/docs/zh-cn/permissions.mdx +235 -0
- package/src/content/docs/zh-cn/plugins.mdx +388 -0
- package/src/content/docs/zh-cn/providers.mdx +1949 -0
- package/src/content/docs/zh-cn/rules.mdx +180 -0
- package/src/content/docs/zh-cn/sdk.mdx +463 -0
- package/src/content/docs/zh-cn/server.mdx +284 -0
- package/src/content/docs/zh-cn/share.mdx +127 -0
- package/src/content/docs/zh-cn/skills.mdx +222 -0
- package/src/content/docs/zh-cn/themes.mdx +369 -0
- package/src/content/docs/zh-cn/tools.mdx +341 -0
- package/src/content/docs/zh-cn/troubleshooting.mdx +299 -0
- package/src/content/docs/zh-cn/tui.mdx +426 -0
- package/src/content/docs/zh-cn/web.mdx +142 -0
- package/src/content/docs/zh-cn/windows-wsl.mdx +112 -0
- package/src/content/docs/zh-cn/zen.mdx +327 -0
- package/src/content/docs/zh-tw/acp.mdx +156 -0
- package/src/content/docs/zh-tw/agents.mdx +754 -0
- package/src/content/docs/zh-tw/cli.mdx +617 -0
- package/src/content/docs/zh-tw/commands.mdx +322 -0
- package/src/content/docs/zh-tw/config.mdx +687 -0
- package/src/content/docs/zh-tw/custom-tools.mdx +196 -0
- package/src/content/docs/zh-tw/ecosystem.mdx +78 -0
- package/src/content/docs/zh-tw/enterprise.mdx +165 -0
- package/src/content/docs/zh-tw/formatters.mdx +132 -0
- package/src/content/docs/zh-tw/github.mdx +321 -0
- package/src/content/docs/zh-tw/gitlab.mdx +194 -0
- package/src/content/docs/zh-tw/go.mdx +224 -0
- package/src/content/docs/zh-tw/ide.mdx +48 -0
- package/src/content/docs/zh-tw/index.mdx +343 -0
- package/src/content/docs/zh-tw/keybinds.mdx +194 -0
- package/src/content/docs/zh-tw/lsp.mdx +208 -0
- package/src/content/docs/zh-tw/mcp-servers.mdx +511 -0
- package/src/content/docs/zh-tw/models.mdx +222 -0
- package/src/content/docs/zh-tw/network.mdx +57 -0
- package/src/content/docs/zh-tw/permissions.mdx +235 -0
- package/src/content/docs/zh-tw/plugins.mdx +388 -0
- package/src/content/docs/zh-tw/providers.mdx +1970 -0
- package/src/content/docs/zh-tw/rules.mdx +180 -0
- package/src/content/docs/zh-tw/sdk.mdx +463 -0
- package/src/content/docs/zh-tw/server.mdx +284 -0
- package/src/content/docs/zh-tw/share.mdx +127 -0
- package/src/content/docs/zh-tw/skills.mdx +222 -0
- package/src/content/docs/zh-tw/themes.mdx +369 -0
- package/src/content/docs/zh-tw/tools.mdx +341 -0
- package/src/content/docs/zh-tw/troubleshooting.mdx +299 -0
- package/src/content/docs/zh-tw/tui.mdx +426 -0
- package/src/content/docs/zh-tw/web.mdx +142 -0
- package/src/content/docs/zh-tw/windows-wsl.mdx +112 -0
- package/src/content/docs/zh-tw/zen.mdx +333 -0
- package/src/content/i18n/ar.json +75 -0
- package/src/content/i18n/bs.json +75 -0
- package/src/content/i18n/da.json +75 -0
- package/src/content/i18n/de.json +75 -0
- package/src/content/i18n/en.json +75 -0
- package/src/content/i18n/es.json +75 -0
- package/src/content/i18n/fr.json +75 -0
- package/src/content/i18n/it.json +75 -0
- package/src/content/i18n/ja.json +75 -0
- package/src/content/i18n/ko.json +75 -0
- package/src/content/i18n/nb.json +75 -0
- package/src/content/i18n/pl.json +75 -0
- package/src/content/i18n/pt-BR.json +75 -0
- package/src/content/i18n/ru.json +75 -0
- package/src/content/i18n/th.json +75 -0
- package/src/content/i18n/tr.json +75 -0
- package/src/content/i18n/zh-CN.json +75 -0
- package/src/content/i18n/zh-TW.json +75 -0
- package/src/content.config.ts +16 -0
- package/src/i18n/locales.ts +117 -0
- package/src/middleware.ts +94 -0
- package/src/pages/[...slug].md.ts +34 -0
- package/src/pages/s/[id].astro +164 -0
- package/src/styles/custom.css +405 -0
- package/src/types/lang-map.d.ts +27 -0
- package/src/types/starlight-virtual.d.ts +14 -0
- package/sst-env.d.ts +10 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: เครื่องมือที่กำหนดเอง
|
|
3
|
+
description: สร้างเครื่องมือที่ LLM สามารถเรียกใช้ใน opencode
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
เครื่องมือแบบกำหนดเองคือฟังก์ชันที่คุณสร้างขึ้นซึ่ง LLM สามารถเรียกใช้ระหว่างการสนทนาได้ โดยทำงานร่วมกับ [เครื่องมือในตัว](/docs/tools) ของ opencode เช่น `read`, `write` และ `bash`
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## การสร้างเครื่องมือ
|
|
11
|
+
|
|
12
|
+
เครื่องมือถูกกำหนดให้เป็นไฟล์ **TypeScript** หรือ **JavaScript** อย่างไรก็ตาม คำจำกัดความของเครื่องมือสามารถเรียกใช้สคริปต์ที่เขียนใน **ภาษาใดก็ได้** — TypeScript หรือ JavaScript ใช้สำหรับคำจำกัดความของเครื่องมือเท่านั้น
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
### ที่ตั้ง
|
|
17
|
+
|
|
18
|
+
สามารถกำหนดได้:
|
|
19
|
+
|
|
20
|
+
- ภายในเครื่องโดยวางไว้ในไดเรกทอรี `.opencode/tools/` ของโครงการของคุณ
|
|
21
|
+
- หรือทั่วโลกโดยวางไว้ที่ `~/.config/opencode/tools/`
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
### โครงสร้าง
|
|
26
|
+
|
|
27
|
+
วิธีที่ง่ายที่สุดในการสร้างเครื่องมือคือการใช้ตัวช่วย `tool()` ซึ่งให้ความปลอดภัยและการตรวจสอบประเภท
|
|
28
|
+
|
|
29
|
+
```ts title=".opencode/tools/database.ts" {1}
|
|
30
|
+
import { tool } from "@opencode-ai/plugin"
|
|
31
|
+
|
|
32
|
+
export default tool({
|
|
33
|
+
description: "Query the project database",
|
|
34
|
+
args: {
|
|
35
|
+
query: tool.schema.string().describe("SQL query to execute"),
|
|
36
|
+
},
|
|
37
|
+
async execute(args) {
|
|
38
|
+
// Your database logic here
|
|
39
|
+
return `Executed query: ${args.query}`
|
|
40
|
+
},
|
|
41
|
+
})
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**ชื่อไฟล์** จะกลายเป็น **ชื่อเครื่องมือ** ข้างต้นจะสร้างเครื่องมือ `database`
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
#### เครื่องมือหลายอย่างต่อไฟล์
|
|
49
|
+
|
|
50
|
+
คุณยังสามารถส่งออกเครื่องมือหลายรายการจากไฟล์เดียวได้ การส่งออกแต่ละครั้งจะกลายเป็น **เครื่องมือแยกต่างหาก** โดยมีชื่อ **`<filename>_<exportname>`**:
|
|
51
|
+
|
|
52
|
+
```ts title=".opencode/tools/math.ts"
|
|
53
|
+
import { tool } from "@opencode-ai/plugin"
|
|
54
|
+
|
|
55
|
+
export const add = tool({
|
|
56
|
+
description: "Add two numbers",
|
|
57
|
+
args: {
|
|
58
|
+
a: tool.schema.number().describe("First number"),
|
|
59
|
+
b: tool.schema.number().describe("Second number"),
|
|
60
|
+
},
|
|
61
|
+
async execute(args) {
|
|
62
|
+
return args.a + args.b
|
|
63
|
+
},
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
export const multiply = tool({
|
|
67
|
+
description: "Multiply two numbers",
|
|
68
|
+
args: {
|
|
69
|
+
a: tool.schema.number().describe("First number"),
|
|
70
|
+
b: tool.schema.number().describe("Second number"),
|
|
71
|
+
},
|
|
72
|
+
async execute(args) {
|
|
73
|
+
return args.a * args.b
|
|
74
|
+
},
|
|
75
|
+
})
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
สิ่งนี้จะสร้างเครื่องมือสองอย่าง: `math_add` และ `math_multiply`
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
#### ชื่อซ้ำกับเครื่องมือในตัว
|
|
83
|
+
|
|
84
|
+
เครื่องมือแบบกำหนดเองจะถูกระบุด้วยชื่อเครื่องมือ หากเครื่องมือแบบกำหนดเองใช้ชื่อเดียวกับเครื่องมือในตัว เครื่องมือแบบกำหนดเองจะมีความสำคัญเหนือกว่า
|
|
85
|
+
|
|
86
|
+
ตัวอย่างเช่น ไฟล์นี้จะแทนที่เครื่องมือ `bash` ในตัว:
|
|
87
|
+
|
|
88
|
+
```ts title=".opencode/tools/bash.ts"
|
|
89
|
+
import { tool } from "@opencode-ai/plugin"
|
|
90
|
+
|
|
91
|
+
export default tool({
|
|
92
|
+
description: "Restricted bash wrapper",
|
|
93
|
+
args: {
|
|
94
|
+
command: tool.schema.string(),
|
|
95
|
+
},
|
|
96
|
+
async execute(args) {
|
|
97
|
+
return `blocked: ${args.command}`
|
|
98
|
+
},
|
|
99
|
+
})
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
:::note
|
|
103
|
+
ชอบชื่อที่ไม่ซ้ำกันเว้นแต่คุณตั้งใจจะแทนที่เครื่องมือในตัว หากคุณต้องการปิดใช้งานเครื่องมือในตัวแต่ไม่ต้องการแทนที่ ให้ใช้ [permissions](/docs/permissions)
|
|
104
|
+
:::
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
### ข้อโต้แย้ง
|
|
109
|
+
|
|
110
|
+
คุณสามารถใช้ `tool.schema` ซึ่งก็คือ [Zod](https://zod.dev) เพื่อกำหนดประเภทอาร์กิวเมนต์
|
|
111
|
+
|
|
112
|
+
```ts "tool.schema"
|
|
113
|
+
args: {
|
|
114
|
+
query: tool.schema.string().describe("SQL query to execute")
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
คุณยังสามารถนำเข้า [Zod](https://zod.dev) ได้โดยตรงและส่งคืนออบเจ็กต์ธรรมดา:
|
|
119
|
+
|
|
120
|
+
```ts {6}
|
|
121
|
+
import { z } from "zod"
|
|
122
|
+
|
|
123
|
+
export default {
|
|
124
|
+
description: "Tool description",
|
|
125
|
+
args: {
|
|
126
|
+
param: z.string().describe("Parameter description"),
|
|
127
|
+
},
|
|
128
|
+
async execute(args, context) {
|
|
129
|
+
// Tool implementation
|
|
130
|
+
return "result"
|
|
131
|
+
},
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
### บริบท
|
|
138
|
+
|
|
139
|
+
เครื่องมือได้รับบริบทเกี่ยวกับเซสชันปัจจุบัน:
|
|
140
|
+
|
|
141
|
+
```ts title=".opencode/tools/project.ts" {8}
|
|
142
|
+
import { tool } from "@opencode-ai/plugin"
|
|
143
|
+
|
|
144
|
+
export default tool({
|
|
145
|
+
description: "Get project information",
|
|
146
|
+
args: {},
|
|
147
|
+
async execute(args, context) {
|
|
148
|
+
// Access context information
|
|
149
|
+
const { agent, sessionID, messageID, directory, worktree } = context
|
|
150
|
+
return `Agent: ${agent}, Session: ${sessionID}, Message: ${messageID}, Directory: ${directory}, Worktree: ${worktree}`
|
|
151
|
+
},
|
|
152
|
+
})
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
ใช้ `context.directory` สำหรับไดเร็กทอรีการทำงานของเซสชัน
|
|
156
|
+
ใช้ `context.worktree` สำหรับรูท git worktree
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## ตัวอย่าง
|
|
161
|
+
|
|
162
|
+
### เขียนเครื่องมือใน Python
|
|
163
|
+
|
|
164
|
+
คุณสามารถเขียนเครื่องมือของคุณเป็นภาษาใดก็ได้ที่คุณต้องการ นี่คือตัวอย่างที่บวกตัวเลขสองตัวโดยใช้ Python
|
|
165
|
+
|
|
166
|
+
ขั้นแรก สร้างเครื่องมือเป็นสคริปต์ Python:
|
|
167
|
+
|
|
168
|
+
```python title=".opencode/tools/add.py"
|
|
169
|
+
import sys
|
|
170
|
+
|
|
171
|
+
a = int(sys.argv[1])
|
|
172
|
+
b = int(sys.argv[2])
|
|
173
|
+
print(a + b)
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
จากนั้นสร้างคำจำกัดความของเครื่องมือที่เรียกใช้:
|
|
177
|
+
|
|
178
|
+
```ts title=".opencode/tools/python-add.ts" {10}
|
|
179
|
+
import { tool } from "@opencode-ai/plugin"
|
|
180
|
+
import path from "path"
|
|
181
|
+
|
|
182
|
+
export default tool({
|
|
183
|
+
description: "Add two numbers using Python",
|
|
184
|
+
args: {
|
|
185
|
+
a: tool.schema.number().describe("First number"),
|
|
186
|
+
b: tool.schema.number().describe("Second number"),
|
|
187
|
+
},
|
|
188
|
+
async execute(args, context) {
|
|
189
|
+
const script = path.join(context.worktree, ".opencode/tools/add.py")
|
|
190
|
+
const result = await Bun.$`python3 ${script} ${args.a} ${args.b}`.text()
|
|
191
|
+
return result.trim()
|
|
192
|
+
},
|
|
193
|
+
})
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
ที่นี่เราใช้ยูทิลิตี้ [`Bun.$`](https://bun.com/docs/runtime/shell) เพื่อรันสคริปต์ Python
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ระบบนิเวศ
|
|
3
|
+
description: โปรเจ็กต์และการผสานรวมที่สร้างด้วย OpenCode
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
ชุดโครงการชุมชนที่สร้างขึ้นบน OpenCode
|
|
7
|
+
|
|
8
|
+
:::note
|
|
9
|
+
ต้องการเพิ่มโครงการที่เกี่ยวข้องกับ OpenCode ของคุณลงในรายการนี้หรือไม่ ส่งพีอาร์.
|
|
10
|
+
:::
|
|
11
|
+
|
|
12
|
+
คุณยังสามารถลองดู [awesome-opencode](https://github.com/awesome-opencode/awesome-opencode) และ [opencode.cafe](https://opencode.cafe) ซึ่งเป็นชุมชนที่รวบรวมระบบนิเวศและชุมชนไว้ด้วยกัน
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## ปลั๊กอิน
|
|
17
|
+
|
|
18
|
+
| ชื่อ | คำอธิบาย |
|
|
19
|
+
| -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
20
|
+
| [opencode-daytona](https://github.com/daytonaio/daytona/tree/main/libs/opencode-plugin) | เรียกใช้เซสชัน OpenCode โดยอัตโนมัติในแซนด์บ็อกซ์ Daytona ที่แยกออกมาพร้อม git sync และการแสดงตัวอย่างแบบสด |
|
|
21
|
+
| [opencode-helicone-session](https://github.com/H2Shami/opencode-helicone-session) | แทรกส่วนหัวเซสชัน Helicone โดยอัตโนมัติสำหรับการจัดกลุ่มคำขอ |
|
|
22
|
+
| [opencode-type-inject](https://github.com/nick-vi/opencode-type-inject) | ฉีดประเภท TypeScript/Svelte ลงในไฟล์ที่อ่านโดยอัตโนมัติด้วยเครื่องมือค้นหา |
|
|
23
|
+
| [opencode-openai-codex-auth](https://github.com/numman-ali/opencode-openai-codex-auth) | ใช้การสมัครสมาชิก ChatGPT Plus/Pro แทนเครดิต API |
|
|
24
|
+
| [opencode-gemini-auth](https://github.com/jenslys/opencode-gemini-auth) | ใช้แผน Gemini ที่มีอยู่ของคุณแทนการเรียกเก็บเงิน API |
|
|
25
|
+
| [opencode-antigravity-auth](https://github.com/NoeFabris/opencode-antigravity-auth) | ใช้โมเดลฟรีของ Antigravity แทนการเรียกเก็บเงิน API |
|
|
26
|
+
| [opencode-devcontainers](https://github.com/athal7/opencode-devcontainers) | การแยกคอนเทนเนอร์ Devcontainer แบบหลายสาขาพร้อมโคลนแบบตื้นและพอร์ตที่กำหนดอัตโนมัติ |
|
|
27
|
+
| [opencode-google-antigravity-auth](https://github.com/shekohex/opencode-google-antigravity-auth) | ปลั๊กอิน Google Antigravity OAuth พร้อมรองรับ Google Search และการจัดการ API ที่แข็งแกร่งยิ่งขึ้น |
|
|
28
|
+
| [opencode-dynamic-context-pruning](https://github.com/Tarquinen/opencode-dynamic-context-pruning) | ปรับการใช้โทเค็นให้เหมาะสมโดยการตัดเอาท์พุตของเครื่องมือที่ล้าสมัย |
|
|
29
|
+
| [opencode-vibeguard](https://github.com/inkdust2021/opencode-vibeguard) | ปกปิดความลับ/PII เป็นตัวยึดตำแหน่งแบบ VibeGuard ก่อนการเรียก LLM และกู้คืนในเครื่อง |
|
|
30
|
+
| [opencode-websearch-cited](https://github.com/ghoulr/opencode-websearch-cited.git) | เพิ่มการสนับสนุนการค้นหาเว็บแบบเนทีฟสำหรับผู้ให้บริการที่รองรับด้วยรูปแบบที่มีเหตุผลของ Google |
|
|
31
|
+
| [opencode-pty](https://github.com/shekohex/opencode-pty.git) | ช่วยให้ตัวแทน AI สามารถเรียกใช้กระบวนการเบื้องหลังใน PTY และส่งข้อมูลเชิงโต้ตอบให้พวกเขาได้ |
|
|
32
|
+
| [opencode-shell-strategy](https://github.com/JRedeker/opencode-shell-strategy) | คำแนะนำสำหรับคำสั่ง shell แบบไม่โต้ตอบ - ป้องกันการแฮงค์จากการดำเนินการที่ขึ้นอยู่กับ TTY |
|
|
33
|
+
| [opencode-wakatime](https://github.com/angristan/opencode-wakatime) | ติดตามการใช้งาน OpenCode ด้วย Wakatime |
|
|
34
|
+
| [opencode-md-table-formatter](https://github.com/franlol/opencode-md-table-formatter/tree/main) | ทำความสะอาดตาราง Markdown ที่ผลิตโดย LLM |
|
|
35
|
+
| [opencode-morph-plugin](https://github.com/morphllm/opencode-morph-plugin) | การแก้ไข Fast Apply, การค้นหาโค้ดเบส WarpGrep และการบีบอัดบริบทผ่าน Morph |
|
|
36
|
+
| [oh-my-opencode](https://github.com/code-yeongyu/oh-my-opencode) | ตัวแทนเบื้องหลัง, เครื่องมือ LSP/AST/MCP ที่สร้างไว้ล่วงหน้า, ตัวแทนที่ได้รับการดูแลจัดการ, เข้ากันได้กับ Claude Code |
|
|
37
|
+
| [opencode-notificator](https://github.com/panta82/opencode-notificator) | การแจ้งเตือนบนเดสก์ท็อปและเสียงเตือนสำหรับเซสชัน OpenCode |
|
|
38
|
+
| [opencode-notifier](https://github.com/mohak34/opencode-notifier) | การแจ้งเตือนบนเดสก์ท็อปและเสียงเตือนสำหรับการอนุญาต การดำเนินการเสร็จสิ้น และเหตุการณ์ข้อผิดพลาด |
|
|
39
|
+
| [opencode-zellij-namer](https://github.com/24601/opencode-zellij-namer) | การตั้งชื่อเซสชัน Zellij อัตโนมัติที่ขับเคลื่อนด้วย AI ตามบริบทของ OpenCode |
|
|
40
|
+
| [opencode-skillful](https://github.com/zenobi-us/opencode-skillful) | อนุญาตให้ตัวแทน OpenCode โหลดแบบ Lazy Load ตามความต้องการพร้อมการค้นพบทักษะและการแทรก |
|
|
41
|
+
| [opencode-supermemory](https://github.com/supermemoryai/opencode-supermemory) | หน่วยความจำถาวรตลอดเซสชันโดยใช้ Supermemory |
|
|
42
|
+
| [@plannotator/opencode](https://github.com/backnotprop/plannotator/tree/main/apps/opencode-plugin) | การตรวจสอบแผนเชิงโต้ตอบพร้อมคำอธิบายประกอบแบบภาพและการแชร์ส่วนตัว/offline |
|
|
43
|
+
| [@openspoon/subtask2](https://github.com/spoons-and-mirrors/subtask2) | ขยาย opencode /commands ไปสู่ระบบการประสานที่มีประสิทธิภาพพร้อมการควบคุมโฟลว์แบบละเอียด |
|
|
44
|
+
| [opencode-scheduler](https://github.com/different-ai/opencode-scheduler) | กำหนดเวลางานที่เกิดซ้ำโดยใช้ launchd (Mac) หรือ systemd (Linux) ด้วยไวยากรณ์ cron |
|
|
45
|
+
| [micode](https://github.com/vtemian/micode) | ระดมความคิดอย่างมีโครงสร้าง → วางแผน → นำเวิร์กโฟลว์ไปใช้ด้วยความต่อเนื่องของเซสชัน |
|
|
46
|
+
| [octto](https://github.com/vtemian/octto) | UI เบราว์เซอร์แบบโต้ตอบสำหรับการระดมความคิด AI ด้วยแบบฟอร์มคำถามหลายข้อ |
|
|
47
|
+
| [opencode-background-agents](https://github.com/kdcokenny/opencode-background-agents) | เอเจนต์พื้นหลังสไตล์ Claude Code พร้อมการมอบหมายแบบอะซิงก์และการคงอยู่ของบริบท |
|
|
48
|
+
| [opencode-notify](https://github.com/kdcokenny/opencode-notify) | การแจ้งเตือนระบบปฏิบัติการดั้งเดิมสำหรับ OpenCode – ทราบเมื่องานเสร็จสมบูรณ์ |
|
|
49
|
+
| [opencode-workspace](https://github.com/kdcokenny/opencode-workspace) | ชุดสายรัดประสานหลายเอเจนต์ที่ให้มา – ส่วนประกอบ 16 ชิ้น ติดตั้งเพียงครั้งเดียว |
|
|
50
|
+
| [opencode-worktree](https://github.com/kdcokenny/opencode-worktree) | เวิร์กทรีคอมไพล์ไร้แรงเสียดทานสำหรับ OpenCode |
|
|
51
|
+
| [opencode-sentry-monitor](https://github.com/stolinski/opencode-sentry-monitor) | ติดตามและแก้ไขข้อบกพร่องเอเจนต์ AI ของคุณด้วย Sentry AI Monitoring |
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## โครงการ
|
|
56
|
+
|
|
57
|
+
| ชื่อ | คำอธิบาย |
|
|
58
|
+
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- |
|
|
59
|
+
| [kimaki](https://github.com/remorses/kimaki) | บอท Discord เพื่อควบคุมเซสชัน OpenCode สร้างขึ้นบน SDK |
|
|
60
|
+
| [opencode.nvim](https://github.com/NickvanDyke/opencode.nvim) | ปลั๊กอิน Neovim สำหรับข้อความแจ้งที่ทราบโดยบรรณาธิการ ซึ่งสร้างขึ้นบน API |
|
|
61
|
+
| [portal](https://github.com/hosenur/portal) | UI เว็บบนมือถือเป็นครั้งแรกสำหรับ OpenCode บน Tailscale/VPN |
|
|
62
|
+
| [opencode plugin template](https://github.com/zenobi-us/opencode-plugin-template/) | เทมเพลตสำหรับสร้างปลั๊กอิน OpenCode |
|
|
63
|
+
| [opencode.nvim](https://github.com/sudo-tee/opencode.nvim) | ส่วนหน้า Neovim สำหรับ opencode - เอเจนต์การเข้ารหัส AI ที่ใช้ terminal |
|
|
64
|
+
| [ai-sdk-provider-opencode-sdk](https://github.com/ben-vargas/ai-sdk-provider-opencode-sdk) | ผู้ให้บริการ Vercel AI SDK สำหรับการใช้งาน OpenCode ผ่าน @opencode-ai/sdk |
|
|
65
|
+
| [OpenChamber](https://github.com/btriapitsyn/openchamber) | แอพเว็บ / เดสก์ท็อปและส่วนขยาย VS Code สำหรับ OpenCode |
|
|
66
|
+
| [OpenCode-Obsidian](https://github.com/mtymek/opencode-obsidian) | ปลั๊กอิน Obsidian ที่ฝัง OpenCode ไว้ใน UI ของ Obsidian |
|
|
67
|
+
| [OpenWork](https://github.com/different-ai/openwork) | ทางเลือกโอเพ่นซอร์สแทน Claude Cowork ซึ่งขับเคลื่อนโดย OpenCode |
|
|
68
|
+
| [ocx](https://github.com/kdcokenny/ocx) | ตัวจัดการส่วนขยาย OpenCode พร้อมโปรไฟล์แบบพกพาและแยกส่วน |
|
|
69
|
+
| [CodeNomad](https://github.com/NeuralNomadsAI/CodeNomad) | แอปเดสก์ท็อป เว็บ มือถือ และไคลเอ็นต์ระยะไกลสำหรับ OpenCode |
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## ตัวแทน
|
|
74
|
+
|
|
75
|
+
| ชื่อ | คำอธิบาย |
|
|
76
|
+
| ----------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
77
|
+
| [Agentic](https://github.com/Cluster444/agentic) | เอเจนต์ AI แบบแยกส่วนและคำสั่งสำหรับการพัฒนาแบบมีโครงสร้าง |
|
|
78
|
+
| [opencode-agents](https://github.com/darrenhinde/opencode-agents) | กำหนดค่า พรอมต์ เอเจนต์ และปลั๊กอินสำหรับเวิร์กโฟลว์ที่ได้รับการปรับปรุง |
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: องค์กร
|
|
3
|
+
description: การใช้ OpenCode อย่างปลอดภัยในองค์กรของคุณ
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
import config from "../../../../config.mjs"
|
|
7
|
+
export const email = `mailto:${config.email}`
|
|
8
|
+
|
|
9
|
+
OpenCode Enterprise เหมาะสำหรับองค์กรที่ต้องการให้แน่ใจว่าโค้ดและข้อมูลของตนไม่หลุดออกจากโครงสร้างพื้นฐาน ซึ่งสามารถทำได้โดยใช้การกำหนดค่าแบบรวมศูนย์ที่ทำงานร่วมกับ SSO และเกตเวย์ AI ภายในของคุณ
|
|
10
|
+
|
|
11
|
+
:::note
|
|
12
|
+
OpenCode จะไม่เก็บโค้ดหรือข้อมูลบริบทใดๆ ของคุณ
|
|
13
|
+
:::
|
|
14
|
+
|
|
15
|
+
ในการเริ่มต้นใช้งาน OpenCode Enterprise:
|
|
16
|
+
|
|
17
|
+
1. ทดลองใช้งานภายในกับทีมของคุณ
|
|
18
|
+
2. **<a href={email}>ติดต่อเรา</a>** เพื่อหารือเกี่ยวกับตัวเลือกด้านราคาและการใช้งาน
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## การทดลอง
|
|
23
|
+
|
|
24
|
+
OpenCode เป็นโอเพ่นซอร์สและไม่ได้จัดเก็บโค้ดหรือข้อมูลบริบทใดๆ ของคุณ ดังนั้นนักพัฒนาของคุณสามารถ [เริ่มต้น](/docs/) และดำเนินการทดลองใช้งานได้อย่างง่ายดาย
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
### การจัดการข้อมูล
|
|
29
|
+
|
|
30
|
+
**OpenCode จะไม่จัดเก็บโค้ดหรือข้อมูลบริบทของคุณ** การประมวลผลทั้งหมดเกิดขึ้นภายในเครื่องหรือผ่านการเรียก API โดยตรงไปยังผู้ให้บริการ AI ของคุณ
|
|
31
|
+
|
|
32
|
+
ซึ่งหมายความว่าตราบใดที่คุณใช้ผู้ให้บริการที่คุณเชื่อถือหรือผู้ให้บริการภายใน
|
|
33
|
+
เกตเวย์ AI คุณสามารถใช้ OpenCode ได้อย่างปลอดภัย
|
|
34
|
+
|
|
35
|
+
ข้อแม้เดียวที่นี่คือคุณสมบัติเสริม `/share`
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
#### การแบ่งปันการสนทนา
|
|
40
|
+
|
|
41
|
+
หากผู้ใช้เปิดใช้งานคุณสมบัติ `/share` การสนทนาและข้อมูลที่เกี่ยวข้องกับการสนทนาจะถูกส่งไปยังบริการที่เราใช้เพื่อโฮสต์เพจแชร์เหล่านี้ที่ opencode.ai
|
|
42
|
+
|
|
43
|
+
ขณะนี้ข้อมูลให้บริการผ่านเครือข่าย Edge ของ CDN ของเรา และถูกแคชไว้ที่ Edge ใกล้ผู้ใช้ของคุณ
|
|
44
|
+
|
|
45
|
+
เราขอแนะนำให้คุณปิดการใช้งานนี้สำหรับการทดลองใช้ของคุณ
|
|
46
|
+
|
|
47
|
+
```json title="opencode.json"
|
|
48
|
+
{
|
|
49
|
+
"$schema": "https://opencode.ai/config.json",
|
|
50
|
+
"share": "disabled"
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
[เรียนรู้เพิ่มเติมเกี่ยวกับการแชร์](/docs/share)
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### ความเป็นเจ้าของรหัส
|
|
59
|
+
|
|
60
|
+
**คุณเป็นเจ้าของโค้ดทั้งหมดที่สร้างโดย OpenCode** ไม่มีข้อจำกัดด้านใบอนุญาตหรือการอ้างสิทธิ์ความเป็นเจ้าของ
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## ราคา
|
|
65
|
+
|
|
66
|
+
เราใช้แบบจำลองต่อที่นั่งสำหรับ OpenCode Enterprise หากคุณมีเกตเวย์ LLM ของคุณเอง เราจะไม่เรียกเก็บเงินสำหรับtokensที่ใช้ สำหรับรายละเอียดเพิ่มเติมเกี่ยวกับตัวเลือกราคาและการใช้งาน **<a href={email}>ติดต่อเรา</a>**
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## การปรับใช้
|
|
71
|
+
|
|
72
|
+
เมื่อคุณทดลองใช้งานเสร็จแล้วและพร้อมที่จะใช้ OpenCode ที่
|
|
73
|
+
องค์กรของคุณ คุณสามารถ **<a href={email}>ติดต่อเรา</a>** เพื่อหารือเกี่ยวกับ
|
|
74
|
+
ตัวเลือกการกำหนดราคาและการใช้งาน
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
### การกำหนดค่าส่วนกลาง
|
|
79
|
+
|
|
80
|
+
เราสามารถตั้งค่า OpenCode เพื่อใช้การกำหนดค่าส่วนกลางเพียงรายการเดียวสำหรับทั้งองค์กรของคุณได้
|
|
81
|
+
|
|
82
|
+
การกำหนดค่าแบบรวมศูนย์นี้สามารถทำงานร่วมกับผู้ให้บริการ SSO ของคุณได้ และรับรองว่าผู้ใช้ทุกคนจะเข้าถึงเฉพาะเกตเวย์ AI ภายในของคุณเท่านั้น
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
### SSO บูรณาการ
|
|
87
|
+
|
|
88
|
+
ด้วยการกำหนดค่าส่วนกลาง OpenCode สามารถทำงานร่วมกับผู้ให้บริการ SSO ขององค์กรของคุณเพื่อตรวจสอบสิทธิ์ได้
|
|
89
|
+
|
|
90
|
+
ซึ่งช่วยให้ OpenCode รับข้อมูลรับรองสำหรับเกตเวย์ AI ภายในของคุณผ่านระบบการจัดการข้อมูลประจำตัวที่คุณมีอยู่
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
### เกตเวย์ AI ภายใน
|
|
95
|
+
|
|
96
|
+
ด้วยการกำหนดค่าส่วนกลาง คุณสามารถกำหนดค่า OpenCode ให้ใช้เกตเวย์ AI ภายในของคุณเท่านั้น
|
|
97
|
+
|
|
98
|
+
คุณยังสามารถปิดการใช้งานผู้ให้บริการ AI อื่นๆ ทั้งหมดได้ เพื่อให้มั่นใจว่าคำขอทั้งหมดจะผ่านโครงสร้างพื้นฐานที่ได้รับอนุมัติขององค์กรของคุณ
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
### โฮสติ้งด้วยตนเอง
|
|
103
|
+
|
|
104
|
+
ในขณะที่เราแนะนำให้ปิดการใช้งานหน้าแบ่งปันเพื่อให้แน่ใจว่าข้อมูลของคุณจะไม่หายไป
|
|
105
|
+
องค์กรของคุณ เราก็สามารถช่วยคุณโฮสต์พวกเขาเองบนโครงสร้างพื้นฐานของคุณได้
|
|
106
|
+
|
|
107
|
+
ขณะนี้อยู่ในแผนงานของเรา หากคุณสนใจ **<a href={email}>แจ้งให้เราทราบ</a>**
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## FAQ
|
|
112
|
+
|
|
113
|
+
<details>
|
|
114
|
+
<summary>OpenCode Enterprise คืออะไร?</summary>
|
|
115
|
+
|
|
116
|
+
OpenCode Enterprise เหมาะสำหรับองค์กรที่ต้องการให้แน่ใจว่าโค้ดและข้อมูลของตนไม่หลุดออกจากโครงสร้างพื้นฐาน ซึ่งสามารถทำได้โดยใช้การกำหนดค่าแบบรวมศูนย์ที่ทำงานร่วมกับ SSO และเกตเวย์ AI ภายในของคุณ
|
|
117
|
+
|
|
118
|
+
</details>
|
|
119
|
+
|
|
120
|
+
<details>
|
|
121
|
+
<summary>ฉันจะเริ่มต้นใช้งาน OpenCode Enterprise ได้อย่างไร?</summary>
|
|
122
|
+
|
|
123
|
+
เพียงเริ่มต้นด้วยการทดลองใช้ภายในกับทีมของคุณ ตามค่าเริ่มต้น OpenCode จะไม่จัดเก็บโค้ดหรือข้อมูลบริบทของคุณ ทำให้ง่ายต่อการเริ่มต้น
|
|
124
|
+
|
|
125
|
+
จากนั้น **<a href={email}>ติดต่อเรา</a>** เพื่อหารือเกี่ยวกับตัวเลือกด้านราคาและการใช้งาน
|
|
126
|
+
|
|
127
|
+
</details>
|
|
128
|
+
|
|
129
|
+
<details>
|
|
130
|
+
<summary>ราคาสำหรับองค์กรทำงานอย่างไร?</summary>
|
|
131
|
+
|
|
132
|
+
เราเสนอราคาสำหรับองค์กรต่อที่นั่ง หากคุณมีเกตเวย์ LLM ของคุณเอง เราจะไม่เรียกเก็บเงินสำหรับtokensที่ใช้ สำหรับรายละเอียดเพิ่มเติม **<a href={email}>ติดต่อเรา</a>** เพื่อขอใบเสนอราคาที่กำหนดเองตามความต้องการขององค์กรของคุณ
|
|
133
|
+
|
|
134
|
+
</details>
|
|
135
|
+
|
|
136
|
+
<details>
|
|
137
|
+
<summary>ข้อมูลของฉันปลอดภัยกับ OpenCode Enterprise หรือไม่?</summary>
|
|
138
|
+
|
|
139
|
+
ใช่. OpenCode จะไม่เก็บโค้ดหรือข้อมูลบริบทของคุณ การประมวลผลทั้งหมดเกิดขึ้นภายในเครื่องหรือผ่านการโทรศัพท์ API โดยตรงไปยังผู้ให้บริการ AI ของคุณ ด้วยการกำหนดค่าส่วนกลางและการบูรณาการ SSO ข้อมูลของคุณยังคงปลอดภัยภายในโครงสร้างพื้นฐานขององค์กรของคุณ
|
|
140
|
+
|
|
141
|
+
</details>
|
|
142
|
+
|
|
143
|
+
<details>
|
|
144
|
+
<summary>เราสามารถใช้ private NPM registry ของเราเองได้หรือไม่?</summary>
|
|
145
|
+
|
|
146
|
+
OpenCode รองรับการลงทะเบียน npm ส่วนตัวผ่านการรองรับไฟล์ `.npmrc` ดั้งเดิมของ Bun หากองค์กรของคุณใช้รีจิสทรีส่วนตัว เช่น JFrog Artifactory, Nexus หรือที่คล้ายกัน โปรดตรวจสอบให้แน่ใจว่านักพัฒนาได้รับการตรวจสอบสิทธิ์ก่อนเรียกใช้ OpenCode
|
|
147
|
+
|
|
148
|
+
วิธีตั้งค่าการตรวจสอบสิทธิ์กับรีจิสทรีส่วนตัวของคุณ:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
npm login --registry=https://your-company.jfrog.io/api/npm/npm-virtual/
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
สิ่งนี้จะสร้าง `~/.npmrc` พร้อมรายละเอียดการตรวจสอบสิทธิ์ OpenCode จะอัตโนมัติ
|
|
155
|
+
หยิบสิ่งนี้ขึ้นมา
|
|
156
|
+
|
|
157
|
+
:::caution
|
|
158
|
+
คุณต้องเข้าสู่ระบบรีจิสทรีส่วนตัวก่อนที่จะเรียกใช้ OpenCode
|
|
159
|
+
:::
|
|
160
|
+
|
|
161
|
+
หรือคุณสามารถกำหนดค่าไฟล์ `.npmrc` ด้วยตนเองได้:
|
|
162
|
+
|
|
163
|
+
```bash title="~/.npmrc"
|
|
164
|
+
registry=https://your-company.jfrog.io/api/npm/npm-virtual/
|
|
165
|
+
//your-company.jfrog.io/api/npm/npm-virtual/:_authToken=${NPM_AUTH_TOKEN}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
นักพัฒนาจะต้องลงชื่อเข้าใช้รีจิสทรีส่วนตัวก่อนที่จะเรียกใช้ OpenCode เพื่อให้แน่ใจว่าสามารถติดตั้งแพ็คเกจจากรีจิสทรีขององค์กรของคุณได้
|
|
169
|
+
|
|
170
|
+
</details>
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ฟอร์แมตเตอร์
|
|
3
|
+
description: OpenCode ใช้ตัวจัดรูปแบบเฉพาะภาษา
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
OpenCode จะจัดรูปแบบไฟล์โดยอัตโนมัติหลังจากที่เขียนหรือแก้ไขโดยใช้ตัวจัดรูปแบบเฉพาะภาษา เพื่อให้แน่ใจว่าโค้ดที่สร้างขึ้นเป็นไปตามสไตล์โค้ดของโปรเจ็กต์ของคุณ
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## บิวท์อิน
|
|
11
|
+
|
|
12
|
+
OpenCode มาพร้อมกับฟอร์แมตเตอร์ในตัวหลายตัวสำหรับภาษาและเฟรมเวิร์กยอดนิยม ด้านล่างนี้คือรายการฟอร์แมตเตอร์ นามสกุลไฟล์ที่รองรับ และคำสั่งหรือตัวเลือกการกำหนดค่าที่ต้องการ
|
|
13
|
+
|
|
14
|
+
| ฟอร์แมตเตอร์ | ส่วนขยาย | ความต้องการ |
|
|
15
|
+
| -------------- | ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |
|
|
16
|
+
| gofmt | .go | `gofmt` คำสั่งใช้ได้ |
|
|
17
|
+
| mix | .ex, .exs, .eex, .heex, .leex, .neex, .sface | `mix` คำสั่งใช้ได้ |
|
|
18
|
+
| prettier | .js, .jsx, .ts, .tsx, .html, .css, .md, .json, .yaml และ [เพิ่มเติม](https://prettier.io/docs/en/index.html) | `prettier` การพึ่งพาใน `package.json` |
|
|
19
|
+
| biome | .js, .jsx, .ts, .tsx, .html, .css, .md, .json, .yaml และ [เพิ่มเติม](https://biomejs.dev/) | `biome.json(c)` ไฟล์ปรับแต่ง |
|
|
20
|
+
| zig | .zig, .zon | `zig` คำสั่งใช้ได้ |
|
|
21
|
+
| clang-format | .c, .cpp, .h, .hpp, .ino และ [เพิ่มเติม](https://clang.llvm.org/docs/ClangFormat.html) | `.clang-format` ไฟล์ปรับแต่ง |
|
|
22
|
+
| ktlint | .kt, .kts | `ktlint` คำสั่งใช้ได้ |
|
|
23
|
+
| ruff | .py, .pyi | คำสั่ง `ruff` ใช้ได้กับ config |
|
|
24
|
+
| rust | .rs | `rustfmt` คำสั่งใช้ได้ |
|
|
25
|
+
| cargo fmt | .rs | `cargo fmt` คำสั่งใช้ได้ |
|
|
26
|
+
| uv | .py, .pyi | `uv` คำสั่งใช้ได้ |
|
|
27
|
+
| rubocop | .rb, .rake, .gemspec, .ru | `rubocop` คำสั่งใช้ได้ |
|
|
28
|
+
| standardrb | .rb, .rake, .gemspec, .ru | `standardrb` คำสั่งใช้ได้ |
|
|
29
|
+
| htmlbeautifier | .erb, .html.erb | `htmlbeautifier` คำสั่งใช้ได้ |
|
|
30
|
+
| air | .r | `air` คำสั่งใช้ได้ |
|
|
31
|
+
| dart | .dart | `dart` คำสั่งใช้ได้ |
|
|
32
|
+
| dfmt | .d | `dfmt` คำสั่งใช้ได้ |
|
|
33
|
+
| ocamlformat | .ml, .mli | มีคำสั่ง `ocamlformat` และไฟล์ปรับแต่ง `.ocamlformat` |
|
|
34
|
+
| terraform | .tf, .tfvars | `terraform` คำสั่งใช้ได้ |
|
|
35
|
+
| gleam | .gleam | `gleam` คำสั่งใช้ได้ |
|
|
36
|
+
| nix | .nix | `nixfmt` คำสั่งใช้ได้ |
|
|
37
|
+
| shfmt | .sh, .bash | `shfmt` คำสั่งใช้ได้ |
|
|
38
|
+
| pint | .php | `laravel/pint` การพึ่งพาใน `composer.json` |
|
|
39
|
+
| oxfmt (ทดลอง) | .js, .jsx, .ts, .tsx | `oxfmt` การพึ่งพาใน `package.json` และ [แฟล็กตัวแปร env ทดลอง](/docs/cli/#experimental) |
|
|
40
|
+
| ormolu | .hs | `ormolu` คำสั่งใช้ได้ |
|
|
41
|
+
|
|
42
|
+
ดังนั้นหากโปรเจ็กต์ของคุณมี `prettier` ใน `package.json` OpenCode จะใช้มันโดยอัตโนมัติ
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## มันทำงานอย่างไร
|
|
47
|
+
|
|
48
|
+
เมื่อ OpenCode เขียนหรือแก้ไขไฟล์ มันจะ:
|
|
49
|
+
|
|
50
|
+
1. ตรวจสอบนามสกุลไฟล์กับฟอร์แมตเตอร์ที่เปิดใช้งานทั้งหมด
|
|
51
|
+
2. รันคำสั่งฟอร์แมตเตอร์ที่เหมาะสมบนไฟล์
|
|
52
|
+
3. ใช้การเปลี่ยนแปลงการจัดรูปแบบโดยอัตโนมัติ
|
|
53
|
+
|
|
54
|
+
กระบวนการนี้เกิดขึ้นในเบื้องหลัง ทำให้มั่นใจได้ว่าสไตล์โค้ดของคุณจะถูกรักษาไว้โดยไม่มีขั้นตอนที่ต้องทำเอง
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## กำหนดค่า
|
|
59
|
+
|
|
60
|
+
คุณสามารถปรับแต่งฟอร์แมตเตอร์ได้ผ่านทางส่วน `formatter` ในการกำหนดค่า OpenCode ของคุณ
|
|
61
|
+
|
|
62
|
+
```json title="opencode.json"
|
|
63
|
+
{
|
|
64
|
+
"$schema": "https://opencode.ai/config.json",
|
|
65
|
+
"formatter": {}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
การกำหนดค่าฟอร์แมตเตอร์แต่ละรายการรองรับสิ่งต่อไปนี้:
|
|
70
|
+
|
|
71
|
+
| คุณสมบัติ | พิมพ์ | คำอธิบาย |
|
|
72
|
+
| ------------- | ------- | ------------------------------------------------- |
|
|
73
|
+
| `disabled` | บูลีน | ตั้งค่านี้เป็น `true` เพื่อปิดใช้งานฟอร์แมตเตอร์ |
|
|
74
|
+
| `command` | สตริง[] | คำสั่งให้เรียกใช้การจัดรูปแบบ |
|
|
75
|
+
| `environment` | วัตถุ | ตัวแปรสภาพแวดล้อมที่จะตั้งค่าเมื่อรันฟอร์แมตเตอร์ |
|
|
76
|
+
| `extensions` | สตริง[] | นามสกุลไฟล์ที่ฟอร์แมตเตอร์นี้ควรรองรับ |
|
|
77
|
+
|
|
78
|
+
ลองดูตัวอย่างบางส่วน
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### ปิดการใช้งานฟอร์แมตเตอร์
|
|
83
|
+
|
|
84
|
+
หากต้องการปิดการใช้งาน **ทั้งหมด** ฟอร์แมตเตอร์ทั่วโลก ให้ตั้งค่า `formatter` เป็น `false`:
|
|
85
|
+
|
|
86
|
+
```json title="opencode.json" {3}
|
|
87
|
+
{
|
|
88
|
+
"$schema": "https://opencode.ai/config.json",
|
|
89
|
+
"formatter": false
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
หากต้องการปิดใช้งานฟอร์แมตเตอร์ **เฉพาะ** ให้ตั้งค่า `disabled` เป็น `true`:
|
|
94
|
+
|
|
95
|
+
```json title="opencode.json" {5}
|
|
96
|
+
{
|
|
97
|
+
"$schema": "https://opencode.ai/config.json",
|
|
98
|
+
"formatter": {
|
|
99
|
+
"prettier": {
|
|
100
|
+
"disabled": true
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
### ตัวจัดรูปแบบที่กำหนดเอง
|
|
109
|
+
|
|
110
|
+
คุณสามารถแทนที่ฟอร์แมตเตอร์ที่มีอยู่แล้วภายในหรือเพิ่มฟอร์แมตใหม่ได้โดยการระบุคำสั่ง ตัวแปรสภาพแวดล้อม และนามสกุลไฟล์:
|
|
111
|
+
|
|
112
|
+
```json title="opencode.json" {4-14}
|
|
113
|
+
{
|
|
114
|
+
"$schema": "https://opencode.ai/config.json",
|
|
115
|
+
"formatter": {
|
|
116
|
+
"prettier": {
|
|
117
|
+
"command": ["npx", "prettier", "--write", "$FILE"],
|
|
118
|
+
"environment": {
|
|
119
|
+
"NODE_ENV": "development"
|
|
120
|
+
},
|
|
121
|
+
"extensions": [".js", ".ts", ".jsx", ".tsx"]
|
|
122
|
+
},
|
|
123
|
+
"custom-markdown-formatter": {
|
|
124
|
+
"command": ["deno", "fmt", "$FILE"],
|
|
125
|
+
"extensions": [".md"]
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
ตัวยึดตำแหน่ง **`$FILE`** ในคำสั่งจะถูกแทนที่ด้วยเส้นทางไปยังไฟล์ที่กำลังจัดรูปแบบ
|