refactor(vscode-airi): move to integrations/ as multi-package
This commit is contained in:
+2
-2
@@ -78,8 +78,8 @@ components.d.ts
|
||||
**/public/assets/fonts/
|
||||
|
||||
# Code generation
|
||||
plugins/airi-plugin-vscode/src/generated/
|
||||
plugins/airi-plugin-vscode/LICENSE
|
||||
vscode-airi/src/generated/
|
||||
vscode-airi/LICENSE
|
||||
|
||||
# Make it easy for devenv users to override their local environment.
|
||||
# See: https://github.com/moeru-ai/airi/pull/110#discussion_r2024378953
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# @proj-airi/airi-plugin-vscode
|
||||
|
||||
Host-side plugin that bridges VS Code context and exposes UI contributions in AIRI.
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "@proj-airi/airi-plugin-vscode",
|
||||
"type": "module",
|
||||
"version": "0.8.4",
|
||||
"private": true,
|
||||
"description": "AIRI host plugin that bridges VS Code context and UI",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/moeru-ai/airi.git",
|
||||
"directory": "integrations/vscode/airi-plugin-vscode"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.mts",
|
||||
"files": [
|
||||
"README.md",
|
||||
"dist",
|
||||
"package.json"
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "pnpm run build",
|
||||
"build": "tsdown",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@proj-airi/plugin-sdk": "workspace:*"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export function activate() {
|
||||
// TODO: bind to vscode-airi bridge over control plane
|
||||
}
|
||||
|
||||
export function deactivate() {
|
||||
// TODO: clean up subscriptions
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { defineConfig } from 'tsdown'
|
||||
|
||||
export default defineConfig({
|
||||
entry: ['src/index.ts'],
|
||||
dts: true,
|
||||
format: 'esm',
|
||||
})
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024-PRESENT Neko Ayaka
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"publisher": "proj-airi",
|
||||
"name": "@proj-airi/airi-plugin-vscode",
|
||||
"displayName": "AIRI",
|
||||
"name": "vscode-airi",
|
||||
"displayName": "AIRI VSCode adapter",
|
||||
"version": "0.8.4",
|
||||
"private": true,
|
||||
"description": "VSCode extension that shares your coding context with AIRI",
|
||||
"description": "Adapter that connects VSCode into Project AIRI",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/moeru-ai/airi.git",
|
||||
"directory": "plugins/airi-plugin-vscode"
|
||||
"directory": "integrations/vscode/vscode-airi"
|
||||
},
|
||||
"categories": [
|
||||
"Other"
|
||||
|
Before Width: | Height: | Size: 250 KiB After Width: | Height: | Size: 250 KiB |
@@ -0,0 +1,135 @@
|
||||
// This file is generated by `vscode-ext-gen`. Do not modify manually.
|
||||
// @see https://github.com/antfu/vscode-ext-gen
|
||||
|
||||
// Meta info
|
||||
export const publisher = 'proj-airi'
|
||||
export const name = 'airi-vscode'
|
||||
export const version = '0.8.49000'
|
||||
export const displayName = 'AIRI VS Code Bridge'
|
||||
export const description = 'VS Code bridge that shares coding context with AIRI'
|
||||
export const extensionId = `${publisher}.${name}`
|
||||
|
||||
/**
|
||||
* Type union of all commands
|
||||
*/
|
||||
export type CommandKey
|
||||
= | 'airi-vscode.enable'
|
||||
| 'airi-vscode.disable'
|
||||
| 'airi-vscode.status'
|
||||
|
||||
/**
|
||||
* Commands map registered by `proj-airi.airi-vscode`
|
||||
*/
|
||||
export const commands = {
|
||||
/**
|
||||
* AIRI: Enable
|
||||
* @value `airi-vscode.enable`
|
||||
*/
|
||||
enable: 'airi-vscode.enable',
|
||||
/**
|
||||
* AIRI: Disable
|
||||
* @value `airi-vscode.disable`
|
||||
*/
|
||||
disable: 'airi-vscode.disable',
|
||||
/**
|
||||
* AIRI: Show Status
|
||||
* @value `airi-vscode.status`
|
||||
*/
|
||||
status: 'airi-vscode.status',
|
||||
} satisfies Record<string, CommandKey>
|
||||
|
||||
/**
|
||||
* Type union of all configs
|
||||
*/
|
||||
export type ConfigKey
|
||||
= | 'airi-vscode.enabled'
|
||||
| 'airi-vscode.contextLines'
|
||||
| 'airi-vscode.sendInterval'
|
||||
|
||||
export interface ConfigKeyTypeMap {
|
||||
'airi-vscode.enabled': boolean
|
||||
'airi-vscode.contextLines': number
|
||||
'airi-vscode.sendInterval': number
|
||||
}
|
||||
|
||||
export interface ConfigShorthandMap {
|
||||
enabled: 'airi-vscode.enabled'
|
||||
contextLines: 'airi-vscode.contextLines'
|
||||
sendInterval: 'airi-vscode.sendInterval'
|
||||
}
|
||||
|
||||
export interface ConfigShorthandTypeMap {
|
||||
enabled: boolean
|
||||
contextLines: number
|
||||
sendInterval: number
|
||||
}
|
||||
|
||||
export interface ConfigItem<T extends keyof ConfigKeyTypeMap> {
|
||||
key: T
|
||||
default: ConfigKeyTypeMap[T]
|
||||
}
|
||||
|
||||
/**
|
||||
* Configs map registered by `proj-airi.airi-vscode`
|
||||
*/
|
||||
export const configs = {
|
||||
/**
|
||||
* Enable or disable the AIRI extension
|
||||
* @key `airi-vscode.enabled`
|
||||
* @default `true`
|
||||
* @type `boolean`
|
||||
*/
|
||||
enabled: {
|
||||
key: 'airi-vscode.enabled',
|
||||
default: true,
|
||||
} as ConfigItem<'airi-vscode.enabled'>,
|
||||
/**
|
||||
* Number of context lines to send (before and after current line)
|
||||
* @key `airi-vscode.contextLines`
|
||||
* @default `5`
|
||||
* @type `number`
|
||||
*/
|
||||
contextLines: {
|
||||
key: 'airi-vscode.contextLines',
|
||||
default: 5,
|
||||
} as ConfigItem<'airi-vscode.contextLines'>,
|
||||
/**
|
||||
* Interval in milliseconds to send updates (0 for real-time)
|
||||
* @key `airi-vscode.sendInterval`
|
||||
* @default `3000`
|
||||
* @type `number`
|
||||
*/
|
||||
sendInterval: {
|
||||
key: 'airi-vscode.sendInterval',
|
||||
default: 3000,
|
||||
} as ConfigItem<'airi-vscode.sendInterval'>,
|
||||
}
|
||||
|
||||
export interface ScopedConfigKeyTypeMap {
|
||||
enabled: boolean
|
||||
contextLines: number
|
||||
sendInterval: number
|
||||
}
|
||||
|
||||
export const scopedConfigs = {
|
||||
scope: 'airi-vscode',
|
||||
defaults: {
|
||||
enabled: true,
|
||||
contextLines: 5,
|
||||
sendInterval: 3000,
|
||||
} satisfies ScopedConfigKeyTypeMap,
|
||||
}
|
||||
|
||||
export interface NestedConfigs {
|
||||
'airi-vscode': {
|
||||
enabled: boolean
|
||||
contextLines: number
|
||||
sendInterval: number
|
||||
}
|
||||
}
|
||||
|
||||
export interface NestedScopedConfigs {
|
||||
enabled: boolean
|
||||
contextLines: number
|
||||
sendInterval: number
|
||||
}
|
||||
@@ -4,6 +4,7 @@ shellEmulator: true
|
||||
packages:
|
||||
- packages/**
|
||||
- plugins/**
|
||||
- integrations/**
|
||||
- services/**
|
||||
- examples/**
|
||||
- docs/**
|
||||
|
||||
Reference in New Issue
Block a user