feat(plugin-sdk): init
This commit is contained in:
@@ -1,135 +0,0 @@
|
||||
// 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
|
||||
}
|
||||
Reference in New Issue
Block a user