- GasbyAI fancy ChatGPT alternative
- rebit nocode site builder
- ishim all in one domain tools
- gumanalytics beautiful and simple analytics platform
- and more at theGums
Connect with me:
VSCode extension for code suggestion
License: MIT License
Connect with me:
EDIT: This is in an Intel Mac running OSX 11.6
Freshly downloaded Visual Studio Code Insider today, followed instructions, ran extension, opened project in extension window, confirmed inline suggestions are enabled, attempted several search strings in a blank document and the suggestions never appear. The status bar shows them loading and then shows captainstack finished loading xx results, but I never see the suggestions appear. Someone else had this issue here but it was closed with no notes; how do I fix this?
The proposed API for inline completions has now been released.
See this:
microsoft/vscode-discussions#26
The GIF in your ReadMe and on Product Hunt shows the user searching for "binary tree" but getting results for array-based binary search, which is not the same thing.
You might want to change the GIF to a more successful example. Unless you're intentionally trying to highlight the tool's shortcomings, in which case I'm impressed with your honesty!
With captainStack.settings.sites
, is there some way such that after toggling which sites to enable or disable, these changes would occur immediately after the next search query without having to reload the window?
When adding the Github Actions to publish the extension to Open VSX, here, I received the following error.
Error: SVGs are restricted in README.md; please use other file image formats, such as PNG: https://github.com/Microsoft/vscode-extension-samples/raw/HEAD/./logo.svg
hello, i would like to use in python using Pycharm IDE. Im not sure if that is already possible but if not than please implement it ;D
i want to host a ai code completion model on my local machine and i want to make the extension to send the query to that api instead of sending it to google or stackoverflow
can you please add to doc how can i customize the URL that the request will be sent to?
and for the query that has to be sent, how can i customize it?
FetchError: request to https://stackoverflow.com/questions/53355882/how-do-i-write-a-javascript-function-that-prints-hello-world-every-3rd-time-it failed, reason: certificate has expired
i got this with everything maybe your able to update it and find the debug or scanning isseu
To trigger inline completion, you'll need to type //find {your keyword}. (start with //find, end with a dot .)
but the comments in HTML & CSS don't start with //
Can you please support HTML & CSS?
Type: Feature Request
like to use more ext like co-pilot and captainStack(free). Thank You.
Extension version: 0.0.6
VS Code version: Code 1.71.2 (74b1f979648cc44d385a2286793c226e611f59e7, 2022-09-14T21:03:37.738Z)
OS version: Windows_NT x64 10.0.22000
Modes:
Sandboxed: No
Well, I decided to give this extension a try, I am using VSCodium not VS Code. And the extension keeps giving me the follwoing error message.
editor/inlineCompletions/actions is a proposed menu identifier. It requires 'package.json#enabledApiProposals: ["inlineCompletionsAdditions"]' and is only available when running out of dev or with the following command line switch: --enable-proposed-api captain-stack.captain-stack
Now, I did go looking through the closed Issues and found one that looked like they were having the same issue. Here
The issue I have is that I don't have a directory called .vscode
, but instead .vscode-oss
. There also is no "launch.json" file anywhere in this directory or any sub directories. Making one and copy/pasting the code provided in the issue I mentioned also doesn't seem to have any affect.
I was wondering if anyone had any other ideas?
Extra info.
I am using Manjaro Linux.
I installed the following from the AUR.
Issue: I have to append python to every query. it is repetitive?
I don't think it will be difficult, get full path of file https://stackoverflow.com/questions/39569993/vs-code-extension-get-full-path and then extract extension of file. I hope you can check the name of the language by extension and change the query from //find *. to //find *{language name}.
@hieunc229, do you intend to support not only the 14 branch, but also the 12 branch as well
I'm moving this issue into a new thread since it isn't related to the old one
@hieunc229 I'm on windows 10 and when I follow your video (I run npm start btw), and start the debugger, I get the new VSCode Insiders window but I also get an "unsupported" notification and obviously the extension doesn't work.
Originally posted by @DevHunvee3 in #3 (comment)
I don't think the code will be acceptable as it is , so instead of showing inline suggestions because the variable name are always different that I want from , captain stack should just show them like copilot does after ctrl + enter.
Or maybe provide a option to do that.
The idea is that we don't exactly copy the code from the stack overflow, we often do tweaks to it and most of the time we go to stack overflow is to get a idea on how a problem can be done, so it might be more suitable if we show all answer with the explanation in the side window and the suitable can be accepted from the window and it will then also don't need us to install the insider version of vs code and then we can also just make thr captain stack available in the visual studio code market place.
Probably has something to do with the packaging of the VSIX file. Do you use macOS, by any chance? (file
on Bash tells me that the node file is a Mach-O binary.
Log:
[2021-07-24 13:32:41.566] [exthost] [error] Activating extension captain-stack.captain-stack failed due to an error:
[2021-07-24 13:32:41.566] [exthost] [error] Error: node-loader:
Error: c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\1c6042846227f82725a4e8162b10019a.node is not a valid Win32 application.
c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\1c6042846227f82725a4e8162b10019a.node
at Object.19571 (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:1852305)
at n (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2555206)
at Object.30944 (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:19320)
at n (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2555206)
at Object.19520 (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:19367)
at n (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2555206)
at Object.54625 (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:7344)
at n (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2555206)
at Object.54641 (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:1662949)
at n (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2555206)
at Object.58747 (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:418416)
at n (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2555206)
at Object.89057 (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:1157007)
at n (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2555206)
at Object.98998 (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:413174)
at n (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2555206)
at Object.70462 (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:613930)
at n (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2555206)
at Object.3164 (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:1446428)
at n (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2555206)
at Object.61170 (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:323590)
at n (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2555206)
at Object.38868 (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:318485)
at n (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2555206)
at Object.16139 (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2438967)
at n (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2555206)
at Object.90321 (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2440319)
at n (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2555206)
at Object.50112 (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2437467)
at n (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2555206)
at c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2555644
at Object.<anonymous> (c:\Users\glorious_rise\.vscode-oss\extensions\captain-stack.captain-stack-0.0.2\out\extension.js:2:2555671)
at Module.u._compile (c:\Program Files\VSCodium\resources\app\out\vs\loader.js:4:1315)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
at Module.load (internal/modules/cjs/loader.js:935:32)
at Module._load (internal/modules/cjs/loader.js:776:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Function.i._load (c:\Program Files\VSCodium\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:103:27843)
at Function.b._load (c:\Program Files\VSCodium\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:103:24470)
at Function.c._load (c:\Program Files\VSCodium\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:93:59004)
at Module.require (internal/modules/cjs/loader.js:959:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Function.t [as __$__nodeRequire] (c:\Program Files\VSCodium\resources\app\out\vs\loader.js:5:101)
at u._loadCommonJSModule (c:\Program Files\VSCodium\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:103:25876)
at u._doActivateExtension (c:\Program Files\VSCodium\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:89:12556)
at u._activateExtension (c:\Program Files\VSCodium\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:89:11657)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Promise.all (index 2)
at async Promise.all (index 0)
I'm interested in trying this extension but I'm having trouble getting any results.
I'm in a PHP file and trying various queries like:
//find php generate random number.
or
//find drupal create term.
But I always get the following in the toolbar:
CaptainStack: Finished loading 0 results
Is there something I'm doing wrong? How can I help debug the problem?
I am getting the below issue while installing this extension:
"Activating extension 'hieunc229.copilot-clone' failed: Cannot find module 'c:\Users\userid\copilot-clone-1\out\extension.js' Require stack: - c:\Users\userid\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\loader.js - c:\Users\userid\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\bootstrap-amd.js - c:\Users\userid\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\bootstrap-fork.js.
please help to resolve
I cant use the extension in VSCode Insider without the debug environment.
Extension is enable and work except in normal mode.
http://cdn.haxxme.fr/404687c8-37de-4bbd-8c31-2bc8e7c75a42.png
Please make it available on Vscode stable version also!
CaptainStack has been find code and tells in status bar but can see inline suggest.
Also :
VSCODE
Version: 1.73.0
Commit: 8fa188b2b301d36553cbc9ce1b0a146ccb93351f
Date: 2022-11-03T14:04:08.642Z
Electron: 19.1.4
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 5.15.78-1-MANJARO
Sandboxed: No
Everytime i start the programm i get this errors:
The property "setStatusBarMessage " does not exist for the type "typeof window "
And
many others like getText, Range, showerrormessage, ""vscode""
how to fix this?
While VSCodium does not have an Insiders build, it does support inline-completion (editor.inlineSuggest.enabled). However, attempting to run the extension results in an error:
[hieunc229.copilot-clone]: editor/inlineCompletions/actions is a proposed menu identifier and is only available when running out of dev or with the following command line switch: --enable-proposed-api hieunc229.copilot-clone
# Controls when the workflow will run
on:
# Weekly at 00:00 UTC
schedule:
- cron: '0 0 * * 0'
name: Deploy Extension
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '16'
cache: 'npm'
check-latest: true
- run: npm install
- run: npm ci
- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v0
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }} # Assumes token is stored as OPEN_VSX_TOKEN
Since the TS files are compiled every time npm install
is run and after any modification to them, would it not make sense to include only TS files for development?
Just Running on vs code Insider on Windows 11, node.js 17 installed:
`src/config.ts:19:27 - error TS2339: Property 'workspace' does not exist on type 'typeof import("vscode")'.
19 const config = vscode.workspace.getConfiguration("captainStack");
~~~~~~~~~
src/extension.ts:6:36 - error TS2694: Namespace '"vscode"' has no exported member 'ExtensionContext'.
6 export function activate(_: vscode.ExtensionContext) {
~~~~~~~~~~~~~~~~
src/extension.ts:10:38 - error TS2339: Property 'getText' does not exist on type 'TextDocument'.
10 const textBeforeCursor = document.getText(
~~~~~~~
src/extension.ts:11:16 - error TS2339: Property 'Range' does not exist on type 'typeof import("vscode")'.
11 new vscode.Range(position.with(undefined, 0), position)
~~~~~
src/extension.ts:23:20 - error TS2339: Property 'showErrorMessage' does not exist on type 'typeof window'.
23 vscode.window.showErrorMessage(err.toString());
~~~~~~~~~~~~~~~~
src/extension.ts:23:37 - error TS2571: Object is of type 'unknown'.
23 vscode.window.showErrorMessage(err.toString());
~~~
src/extension.ts:35:25 - error TS2339: Property 'Range' does not exist on type 'typeof import("vscode")'.
35 range: new vscode.Range(position.translate(0, output.length), position)
~~~~~
src/utils/extractors/ExtractorGithubGist.ts:20:29 - error TS2345: Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.
20 votes: parseInt(doc.querySelector(".social-count")?.textContent),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/utils/search.ts:43:39 - error TS2339: Property 'setStatusBarMessage' does not exist on type 'typeof window'.
43 vscode.window.setStatusBarMessage(`${extractor.name} (${y}/${urls.length}): ${results.length} results`, 2000);
~~~~~~~~~~~~~~~~~~~
src/utils/search.ts:64:23 - error TS2339: Property 'setStatusBarMessage' does not exist on type 'typeof window'.
64 vscode.window.setStatusBarMessage(`CaptainStack: Finished loading ${results.length} results`);
~~~~~~~~~~~~~~~~~~~
src/utils/search.ts:67:19 - error TS2339: Property 'setStatusBarMessage' does not exist on type 'typeof window'.
67 vscode.window.setStatusBarMessage(`CaptainStack: Start loading snippet results...`, promise);
~~~~~~~~~~~~~~~~~~~
[11:28:56] Found 11 errors. Watching for file changes.`
error TS2339: Property 'setStatusBarMessage' does not exist on type 'typeof window'.
67 vscode.window.setStatusBarMessage(CaptainStack: Start loading snippet results...
, promise);
I get the following error: "Activating extension 'hieunc229.copilot-clone' failed: The module '/Users/[USER]/captain-stack/node_modules/canvas/build/Release/canvas.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 72. This version of Node.js requires NODE_MODULE_VERSION 89. Please try re-compiling or re-installing the module (for instance, using npm rebuild
or npm install
)"
I tried re-compiling with the latest node.js version which was NODE_MODULE_VERSION 93.
There is no NODE_MODULE_VERSION 89 on page https://nodejs.org/en/download/releases/
Which node.js version do you use that is NODE_MODULE_VERSION 89 ?
Thank you!
The concept is brilliant and very useful, it is just a little painful to wait until all 10 pages are indexed
Hi. When I choose Run > Start Debugging from the top menu, this error will appear in the debug console:
(node:8444) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use Code - Insiders --trace-deprecation ...
to show where the warning was created)
Is this possible? Especially for the JetBrains line of products?
For certain vscode themes, the suggested code is not visible until you accept it. Is there a style property that can be adjusted/overridden to change the font color?
For greater public visibility, I think we should add a GH page in a separate branch. See https://clin1234.github.io/copilot-clone as reference.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.