export = createExtension((context) => { const disposals = [] return disposals}, () => { })
registerCommand('vscode-use.hello', () => { message.info('Hello World!')})
registerCommand('vscode-use.error', () => { message.error('Hello World!')}) // Register multiple instructionsregisterCommands([ 'vscode-use.error', () => { message.error('Hello World!') }])
registerCommand('vscode-use.openExternalUrl', () => { openExternalUrl('http://www.baidu.com')})
executeCommand('vscode-use.openExternalUrl', ...params) // Execute multiple instructionsexecuteCommands([ ['vscode-use.openExternalUrl', ...params]])
const isZh = getLocale().includes('zh')message.info(`当前语言:${isZh ? '中文' : '英文'}`)
addEventListener('activeText-change', (e) => {}) // Monitor multiple eventsaddEventListeners([ 'activeText-change', (e) => {}])
addEventListener('auth-change', (e) => {})
addEventListener('config-change', (e) => {})
addEventListener('editor-visible', (e) => {})
addEventListener('file-create', (e) => {})
addEventListener('file-delete', (e) => {})
addEventListener('folder-change', (e) => {})
addEventListener('rename', (e) => {})
addEventListener('selection-change', (e) => {})
addEventListener('terminal-change', (e) => {})
addEventListener('terminal-close', (e) => {})
addEventListener('terminal-open', (e) => {})
addEventListener('text-change', (e) => {})
addEventListener('text-open', (e) => {})
addEventListener('text-save', (e) => {})
addEventListener('text-visible-change', (e) => {})
addEventListener('theme-change', (e) => {})
jumpToLine(10, 'path/Uri')
onFold([ createRange([1, 0], [5, 0]), createRange([5, 0], [10, 0])])
unFold([ createRange([1, 0], [5, 0]), createRange([5, 0], [10, 0])])
updateText(edit=>{//Insert text in the first lineedit.insert(new vscode.Position(0, 0), 'Hello World!') // Delete the first 5 characters of the first lineedit.delete(new vscode.Range(new vscode.Position(0, 0), new vscode.Position(0, 5))) // Replace the first 5 characters of the first line with Hello World!edit.replace(new vscode.Range(new vscode.Position(0, 0), new vscode.Position(0, 5)), 'Hello World!')})
const activeText = getActiveText()
const lineText = getLineText(0)
const mode1 = getConfiguration('vscode-use').get('mode')const mode2 = getConfiguration('vscode-use.mode')
setConfiguration('vscode-use.mode', 'dev')
createTerminal('test')
createBottomBar({ position: 'left', text: 'I am the bottom bar', color: '#fff', backgroundColor: '#000',})
const pos = getPosition(100)
getCopyText().then(text=>{})
setCopyText('Hello World!')
const currentFileUrl = getCurrentFileUrl()
setSelection([0, 0], [0, 5])
setSelections([{ start: [0, 0], end: [0, 5], position: 'left' // Control cursor position}, { start: [1, 0], end: [1, 5], position: 'right'}])
watchFiles('filepath', (e) => {})
createProgress({ title: 'Progress Bar', async done(report) { report({ message: 'Progress bar 10% completed', increment: 10 }) setTimeout(() => { report({ message: 'Progress bar completed 50', increment: 50 }) }) }})
createSelect(['vue','react','svelte','solid']).then((res)=>{})
registerHoverProvider('vue', (e) => {})
registerDefinitionProvider('vue', (e) => {})
const { getCurrentTheme, getAllTheme, setTheme, } = useTheme()
const language = getActiveTextEditorLanguageId() // vue
rename('url', 'newUrl')
nextTick(()=>{})
setStyle(createStyle({ backgroundColor: 'yellow', border: '1px solid red'}), createRange([0, 0], [0, 10]))
createInput({ title: 'I am an input box', placeHolder: 'Please enter content', value: ''})
const activeTextEditor = getActiveTextEditor()
const keyWords = getKeyWords(position)
const md = new vscode.MarkdownString()md.isTrusted = truemd.supportHtml = trueconst commandUri = `command:a.b?${setCommandParams(['params1', 'params2'])}`md.appendMarkdown(`[🦘](${commandUri})`);
const offset = getOffsetFromPosition(position) // Get the offset of the current text and locationconst offset = getOffsetFromPosition(position,code) // Get the offset of the specified code and position