package.json 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. {
  2. "name": "opencode",
  3. "displayName": "OpenCode",
  4. "description": "OpenCode for VSCode",
  5. "version": "25.11.18",
  6. "publisher": "opencode",
  7. "author": {
  8. "name": "OpenCode Team"
  9. },
  10. "license": "Apache-2.0",
  11. "homepage": "https://github.com/opencode/opencode",
  12. "repository": {
  13. "type": "git",
  14. "url": "https://github.com/opencode/opencode.git",
  15. "directory": "hosts/vscode-plugin"
  16. },
  17. "bugs": {
  18. "url": "https://github.com/opencode/opencode/issues"
  19. },
  20. "engines": {
  21. "vscode": "^1.74.0"
  22. },
  23. "categories": [
  24. "Other",
  25. "Developer Tools",
  26. "Terminal"
  27. ],
  28. "icon": "resources/icon.png",
  29. "galleryBanner": {
  30. "color": "#1e1e1e",
  31. "theme": "dark"
  32. },
  33. "keywords": [
  34. "terminal",
  35. "bridge",
  36. "cli",
  37. "development"
  38. ],
  39. "activationEvents": [
  40. "onView:opencode.main",
  41. "onCommand:opencode.openPanel",
  42. "onCommand:opencode.addFileToContext",
  43. "onCommand:opencode.addLinesToContext",
  44. "onCommand:opencode.pastePath",
  45. "onCommand:opencode.showDiagnostics"
  46. ],
  47. "main": "./out/extension.js",
  48. "contributes": {
  49. "commands": [
  50. {
  51. "command": "opencode.openPanel",
  52. "title": "Open OpenCode Panel",
  53. "category": "OpenCode",
  54. "icon": "$(terminal)"
  55. },
  56. {
  57. "command": "opencode.addFileToContext",
  58. "title": "OpenCode: Add to context",
  59. "category": "OpenCode"
  60. },
  61. {
  62. "command": "opencode.addLinesToContext",
  63. "title": "OpenCode: Add lines to context",
  64. "category": "OpenCode"
  65. },
  66. {
  67. "command": "opencode.pastePath",
  68. "title": "OpenCode: Paste path",
  69. "category": "OpenCode"
  70. },
  71. {
  72. "command": "opencode.showDiagnostics",
  73. "title": "OpenCode: Show Diagnostics",
  74. "category": "OpenCode",
  75. "icon": "$(info)"
  76. }
  77. ],
  78. "viewsContainers": {
  79. "activitybar": [
  80. {
  81. "id": "opencode",
  82. "title": "OpenCode",
  83. "icon": "resources/icon.svg"
  84. }
  85. ]
  86. },
  87. "views": {
  88. "opencode": [
  89. {
  90. "type": "webview",
  91. "id": "opencode.main",
  92. "name": "OpenCode",
  93. "icon": "resources/icon.svg",
  94. "webview": {
  95. "retainContextWhenHidden": true
  96. }
  97. }
  98. ]
  99. },
  100. "menus": {
  101. "view/title": [
  102. {
  103. "command": "opencode.openPanel",
  104. "when": "view == opencode.main",
  105. "group": "navigation@1"
  106. },
  107. {
  108. "command": "opencode.showDiagnostics",
  109. "when": "view == opencode.main",
  110. "group": "navigation@2"
  111. }
  112. ],
  113. "explorer/context": [
  114. {
  115. "command": "opencode.addFileToContext",
  116. "group": "opencode@1",
  117. "when": "resourceScheme == file && !explorerResourceIsFolder"
  118. },
  119. {
  120. "command": "opencode.addFileToContext",
  121. "group": "opencode@1",
  122. "when": "resourceScheme == file && explorerResourceIsFolder"
  123. },
  124. {
  125. "command": "opencode.pastePath",
  126. "group": "opencode@2",
  127. "when": "resourceScheme == file && explorerResourceIsFolder"
  128. }
  129. ],
  130. "editor/context": [
  131. {
  132. "command": "opencode.addFileToContext",
  133. "group": "opencode@1"
  134. },
  135. {
  136. "command": "opencode.addLinesToContext",
  137. "group": "opencode@2",
  138. "when": "editorHasSelection"
  139. }
  140. ],
  141. "editor/title/context": [
  142. {
  143. "command": "opencode.addFileToContext",
  144. "group": "opencode@9",
  145. "when": "resourceScheme == file"
  146. }
  147. ],
  148. "openEditors/context": [
  149. {
  150. "command": "opencode.addFileToContext",
  151. "group": "opencode@9",
  152. "when": "resourceScheme == file"
  153. }
  154. ]
  155. },
  156. "keybindings": [
  157. {
  158. "command": "opencode.addFileToContext",
  159. "key": "ctrl+'",
  160. "mac": "cmd+'",
  161. "when": "editorTextFocus"
  162. },
  163. {
  164. "command": "opencode.addLinesToContext",
  165. "key": "ctrl+shift+'",
  166. "mac": "cmd+shift+'",
  167. "when": "editorTextFocus && editorHasSelection"
  168. }
  169. ],
  170. "configuration": {
  171. "title": "OpenCode",
  172. "properties": {
  173. "opencode.customCommand": {
  174. "type": "string",
  175. "default": "",
  176. "description": "Custom command to run in the terminal (optional)"
  177. }
  178. }
  179. }
  180. },
  181. "scripts": {
  182. "vscode:prepublish": "npm run copy-license && npm run compile",
  183. "copy-license": "node -e \"const fs=require('fs'); const path=require('path'); const src=path.resolve(__dirname,'..','..','LICENSE'); const dest=path.resolve(__dirname,'LICENSE'); if(fs.existsSync(src)){fs.copyFileSync(src,dest); console.log('Copied LICENSE to extension root');} else { console.warn('Root LICENSE not found at '+src); }\"",
  184. "compile": "tsc -p ./ && tsc -p ./tsconfig.test.json",
  185. "compile:production": "tsc -p ./",
  186. "watch": "tsc -watch -p ./",
  187. "pretest": "pnpm run compile && pnpm run lint",
  188. "lint": "eslint src --ext ts",
  189. "test": "vscode-test",
  190. "test:script": "./scripts/test.sh",
  191. "package": "cd ../ && ./scripts/build-vscode.sh --production --skip-tests",
  192. "package:dev": "cd ../ && ./scripts/build-vscode.sh --skip-tests",
  193. "package:pre-release": "pnpm run compile:production && vsce package --pre-release --no-dependencies",
  194. "publish": "pnpm run compile:production && vsce publish --no-dependencies",
  195. "publish:pre-release": "pnpm run compile:production && vsce publish --pre-release --no-dependencies",
  196. "install:vsce": "npm install -g @vscode/vsce",
  197. "clean": "rimraf out *.vsix",
  198. "build:binaries": "cd ../ && ./scripts/build_opencode.sh",
  199. "prebuild": "pnpm run build:binaries && pnpm run compile:production"
  200. },
  201. "devDependencies": {
  202. "@types/glob": "^9.0.0",
  203. "@types/mocha": "^10.0.6",
  204. "@types/node": "18.x",
  205. "@types/sinon": "^17.0.2",
  206. "@types/vscode": "^1.74.0",
  207. "@typescript-eslint/eslint-plugin": "^6.15.0",
  208. "@typescript-eslint/parser": "^6.15.0",
  209. "@vscode/test-cli": "^0.0.4",
  210. "@vscode/test-electron": "^2.3.8",
  211. "@vscode/vsce": "^2.22.0",
  212. "eslint": "^8.56.0",
  213. "glob": "^11.0.3",
  214. "mocha": "^10.2.0",
  215. "rimraf": "^5.0.5",
  216. "sinon": "^17.0.1",
  217. "typescript": "^5.0.0"
  218. },
  219. "packageManager": "[email protected]+sha512.b4106707c7225b1748b61595953ccbebff97b54ad05d002aa3635f633b9c53cd666f7ce9b8bc44704f1fa048b9a49b55371ab2d9e9d667d1efe2ef1514bcd513"
  220. }