GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — wip: vscode extension · siathalysedI/opencode@0e15654

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • publish-vscode.yml
    • publish.yml
  • scripts
    • release
  • sdks
    • github/script
      • release.ts
    • vscode
      • .gitignore
      • .vscode-test.mjs
      • .vscodeignore
      • README.md
      • bun.lock
      • esbuild.js
      • eslint.config.mjs
      • images
        • icon.png
      • package.json
      • script
        • publish
        • release
      • src
        • extension.ts
        • test
          • extension.test.ts
      • tsconfig.json
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/publish-vscode.yml‎

Copy file name to clipboard
+32Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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

‎.github/workflows/publish.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/publish.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
branches:
77
- dev
88
tags:
9-
- "*"
9+
- "v*.*.*"
1010

1111
concurrency: ${{ github.workflow }}-${{ github.ref }}
1212

Collapse file

‎scripts/release‎

Copy file name to clipboardExpand all lines: scripts/release
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ done
1212
git fetch --force --tags
1313

1414
# 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)
1616

1717
# If there is no tag, exit the script
1818
if [ -z "$latest_tag" ]; then
Collapse file

‎sdks/github/script/release.ts‎

Copy file name to clipboard
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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

‎sdks/vscode/.gitignore‎

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist
Collapse file

‎sdks/vscode/.vscode-test.mjs‎

Copy file name to clipboard
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineConfig } from '@vscode/test-cli';
2+
3+
export default defineConfig({
4+
files: 'out/test/**/*.test.js',
5+
});
Collapse file

‎sdks/vscode/.vscodeignore‎

Copy file name to clipboard
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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

‎sdks/vscode/README.md‎

Copy file name to clipboard
+17Lines changed: 17 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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

‎sdks/vscode/bun.lock‎

Copy file name to clipboardExpand all lines: sdks/vscode/bun.lock
+589Lines changed: 589 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎sdks/vscode/esbuild.js‎

Copy file name to clipboard
+56Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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+
});

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.