GeezerVison is showing github.com — wip: vscode extension · siathalysedI/opencode@0e15654
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboard +32Lines changed: 32 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +name: publish-vscode | | 2 | + | | 3 | +on: | | 4 | + workflow_dispatch: | | 5 | + push: | | 6 | + tags: | | 7 | + - "vscode-v*.*.*" | | 8 | + | | 9 | +concurrency: ${{ github.workflow }}-${{ github.ref }} | | 10 | + | | 11 | +permissions: | | 12 | + contents: write | | 13 | + | | 14 | +jobs: | | 15 | + publish: | | 16 | + runs-on: ubuntu-latest | | 17 | + steps: | | 18 | + - uses: actions/checkout@v3 | | 19 | + with: | | 20 | + fetch-depth: 0 | | 21 | + | | 22 | + - uses: oven-sh/setup-bun@v2 | | 23 | + with: | | 24 | + bun-version: 1.2.17 | | 25 | + | | 26 | + - run: git fetch --force --tags | | 27 | + - run: bun install | | 28 | + - run: bun install -g @vscode/vsce | | 29 | + | | 30 | + - name: Publish | | 31 | + run: ./script/publish | | 32 | + working-directory: ./packages/opencode |
Collapse file Copy file name to clipboardExpand all lines: .github/workflows/publish.yml +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 6 | 6 | branches: | 7 | 7 | - dev | 8 | 8 | tags: | 9 | | - - "*" | | 9 | + - "v*.*.*" | 10 | 10 |
| 11 | 11 | concurrency: ${{ github.workflow }}-${{ github.ref }} | 12 | 12 |
| |
Collapse file Copy file name to clipboardExpand all lines: scripts/release +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 12 | 12 | git fetch --force --tags | 13 | 13 |
| 14 | 14 | # Get the latest Git tag | 15 | | -latest_tag=$(git tag --sort=committerdate | grep -E '[0-9]' | tail -1) | | 15 | +latest_tag=$(git tag --sort=committerdate | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | tail -1) | 16 | 16 |
| 17 | 17 | # If there is no tag, exit the script | 18 | 18 | if [ -z "$latest_tag" ]; then | |
Collapse file Copy file name to clipboard +16Lines changed: 16 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +#!/usr/bin/env bun | | 2 | + | | 3 | +import { $ } from "bun" | | 4 | + | | 5 | +try { | | 6 | + await $`git tag -d github-v1` | | 7 | + await $`git push origin :refs/tags/github-v1` | | 8 | +} catch (e: any) { | | 9 | + if (e instanceof $.ShellError && e.stderr.toString().match(/tag \S+ not found/)) { | | 10 | + console.log("tag not found, continuing...") | | 11 | + } else { | | 12 | + throw e | | 13 | + } | | 14 | +} | | 15 | +await $`git tag -a github-v1 -m "Update github-v1 to latest"` | | 16 | +await $`git push origin github-v1` |
Collapse file Copy file name to clipboard +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +dist |
Collapse file Copy file name to clipboard +5Lines changed: 5 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +import { defineConfig } from '@vscode/test-cli'; | | 2 | + | | 3 | +export default defineConfig({ | | 4 | + files: 'out/test/**/*.test.js', | | 5 | +}); |
Collapse file Copy file name to clipboard +16Lines changed: 16 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +.vscode/** | | 2 | +.vscode-test/** | | 3 | +out/** | | 4 | +node_modules/** | | 5 | +src/** | | 6 | +script/** | | 7 | +.gitignore | | 8 | +.yarnrc | | 9 | +bun.lock | | 10 | +esbuild.js | | 11 | +vsc-extension-quickstart.md | | 12 | +**/tsconfig.json | | 13 | +**/eslint.config.mjs | | 14 | +**/*.map | | 15 | +**/*.ts | | 16 | +**/.vscode-test.* |
Collapse file Copy file name to clipboard +17Lines changed: 17 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# opencode VS Code Extension | | 2 | + | | 3 | +A VS Code extension that integrates [opencode](https://opencode.ai) directly into your development environment. | | 4 | + | | 5 | +## Prerequisites | | 6 | + | | 7 | +This extension requires [opencode](https://opencode.ai) to be installed on your system. Visit [opencode.ai](https://opencode.ai) for installation instructions. | | 8 | + | | 9 | +## Features | | 10 | + | | 11 | +- **Cmd+Escape**: Launch opencode in a split terminal view | | 12 | +- **Alt+Cmd+K**: Send selected code to opencode's prompt | | 13 | +- **Tab awareness**: opencode automatically detects which files you have open | | 14 | + | | 15 | +## Support | | 16 | + | | 17 | +This is an early release. If you encounter issues or have feedback, please create an issue at https://github.com/sst/opencode/issues. |
Collapse file Copy file name to clipboardExpand all lines: sdks/vscode/bun.lock +589Lines changed: 589 additions & 0 deletions Collapse file Copy file name to clipboard +56Lines changed: 56 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +const esbuild = require("esbuild"); | | 2 | + | | 3 | +const production = process.argv.includes('--production'); | | 4 | +const watch = process.argv.includes('--watch'); | | 5 | + | | 6 | +/** | | 7 | + * @type {import('esbuild').Plugin} | | 8 | + */ | | 9 | +const esbuildProblemMatcherPlugin = { | | 10 | + name: 'esbuild-problem-matcher', | | 11 | + | | 12 | + setup(build) { | | 13 | + build.onStart(() => { | | 14 | + console.log('[watch] build started'); | | 15 | + }); | | 16 | + build.onEnd((result) => { | | 17 | + result.errors.forEach(({ text, location }) => { | | 18 | + console.error(`✘ [ERROR] ${text}`); | | 19 | + console.error(` ${location.file}:${location.line}:${location.column}:`); | | 20 | + }); | | 21 | + console.log('[watch] build finished'); | | 22 | + }); | | 23 | + }, | | 24 | +}; | | 25 | + | | 26 | +async function main() { | | 27 | + const ctx = await esbuild.context({ | | 28 | + entryPoints: [ | | 29 | + 'src/extension.ts' | | 30 | + ], | | 31 | + bundle: true, | | 32 | + format: 'cjs', | | 33 | + minify: production, | | 34 | + sourcemap: !production, | | 35 | + sourcesContent: false, | | 36 | + platform: 'node', | | 37 | + outfile: 'dist/extension.js', | | 38 | + external: ['vscode'], | | 39 | + logLevel: 'silent', | | 40 | + plugins: [ | | 41 | + /* add to the end of plugins array */ | | 42 | + esbuildProblemMatcherPlugin, | | 43 | + ], | | 44 | + }); | | 45 | + if (watch) { | | 46 | + await ctx.watch(); | | 47 | + } else { | | 48 | + await ctx.rebuild(); | | 49 | + await ctx.dispose(); | | 50 | + } | | 51 | +} | | 52 | + | | 53 | +main().catch(e => { | | 54 | + console.error(e); | | 55 | + process.exit(1); | | 56 | +}); |
|