Code Monkey home page Code Monkey logo

copilot-clone's Introduction

Hi 👋, I'm Hieu

A developer, a hobbyist photographer. I’m currently working on:


Connect with me:

hieussr hieunc hieunguyen.info



Gum pixels

copilot-clone's People

Contributors

clin1234 avatar dependabot[bot] avatar hieunc229 avatar kek5chen avatar kwokhou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

copilot-clone's Issues

Finished loading results but never shows them

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?

#53

Screen Shot 2022-05-16 at 12 29 18 PM

Screen Shot 2022-05-16 at 12 31 44 PM

Not showing any suggestions

I installed Captain Stack like the video said. VS Code - Insider detects some errors. Like this-
error

When I run, it doesn't show any errors in the debug section nor terminal. It opens the window. But when I ask Captain Stack to do something it doesn't just anything. Thanks and have a great day!

"binary tree" is different from "binary search"

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!

Coding Language support

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

sending a request for a custom server

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?

Support for HTML & CSS

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?

Lets on Extentions like Co-Pilot

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

Extension "enable-proposed-api" error.

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.

Showing "unsupported" when running Captain Stack

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.

screen-capture.mp4

Originally posted by @DevHunvee3 in #3 (comment)

don't make inline suggestions

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.

Installing VSIX file from Open VSX on VSCodium fails to activate extension

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)

Always get "Finished loading 0 results"

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?

Recording.2023-04-14.092359.mp4

Activating extension failed

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

Buffer() is deprecated

(node:4223) [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)
2021-08-23-142745_1920x1080_scrot

Cant See Finished and Loaded Results with Inline Suggest

CaptainStack has been find code and tells in status bar but can see inline suggest.
Screenshot from 2022-11-20 23-02-12

Also :

  • Make sure Inline Suggest is enabled from the VS Code Settings ==> Enabled

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

Errors after start debuging

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?

Support for VSCodium?

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

image
image

Github Action file to publish automatically to Open VSX

# 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

Remove generated JS files from repo

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?

Error on Capitain Slack

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.`

canvas.node was compiled against a different Node.js version

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!

FetchError

FetchError Request while push a request on visual studio code
image
image

buffer error

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.