Skip to content

Commit

Permalink
Merge pull request #12 from smallcloudai/cicl
Browse files Browse the repository at this point in the history
cicl
  • Loading branch information
reymondzzzz authored Nov 28, 2023
2 parents c6099fe + dd1241b commit 17dfadb
Show file tree
Hide file tree
Showing 7 changed files with 175 additions and 10 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ jobs:
- os: windows-latest
target: x86_64-pc-windows-msvc
code-target: win32-x64
- os: windows-latest
target: i686-pc-windows-msvc
code-target: win32-ia32
arch: x64
- os: windows-latest
target: aarch64-pc-windows-msvc
code-target: win32-arm64
arch: arm64
env:
LLM_LS_TARGET: ${{ matrix.target }}

Expand Down Expand Up @@ -55,7 +54,9 @@ jobs:
id: nbgv

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.0
uses: microsoft/setup-msbuild@v1.1
with:
msbuild-architecture: ${{ matrix.arch }}

- name: Setup NuGet.exe
uses: nuget/setup-nuget@v1
Expand All @@ -68,7 +69,7 @@ jobs:
msbuild ${{ env.refactSolution }} /p:Configuration=${{ env.config }} /p:TargetVsixContainer=${{ env.vsixContainer }} /p:DeployExtension=False /verbosity:minimal
- name: Upload VSIX artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target }}-${{ steps.nbgv.outputs.SemVer2 }}-${{ env.refactSolution }}
name: ${{ matrix.target }}
path: ${{ env.vsixContainer }}
82 changes: 82 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Publish

env:
config: Release
refactSolution: RefactExtension.sln
vsixContainer: ${{ github.workspace }}\RefactExtension.vsix
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

on:
workflow_dispatch:

jobs:
publish:
strategy:
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
code-target: win32-x64
arch: x64
- os: windows-latest
target: aarch64-pc-windows-msvc
code-target: win32-arm64
arch: arm64

env:
LLM_LS_TARGET: ${{ matrix.target }}

name: Publish in marketplace (VSCE) (${{ matrix.target }})
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: ${{ env.FETCH_DEPTH }}

- name: Install VSCE
run: |
npm install -g @vscode/vsce
- name: Download artifact
id: download-artifact
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: build.yml
repo: smallcloudai/refact-lsp
branch: ${{ inputs.branch }}
path: ./assets
name: dist-${{ matrix.target }}

- name: Nerdbank.GitVersioning
uses: aarnott/nbgv@v0.3
id: nbgv

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.1
with:
msbuild-architecture: ${{ matrix.arch }}

- name: Setup NuGet.exe
uses: nuget/setup-nuget@v1
with:
nuget-version: 'latest'
- run: nuget restore ${{ env.refactSolution }}

- name: MSBuild ${{ env.refactSolution }}
run: |
msbuild ${{ env.refactSolution }} /p:Configuration=${{ env.config }} /p:TargetVsixContainer=${{ env.vsixContainer }} /p:DeployExtension=False /verbosity:minimal
- name: Publish VSCE extension
shell: bash
run: |
vsce publish --pat ${{secrets.VSCE_PAT}} --packagePath ${{ env.vsixContainer }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target }}
path: ${{ env.vsixContainer }}
63 changes: 63 additions & 0 deletions MultilineGreyText/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Terms of use

Last update: Jan 09, 2023

## Summary

Our Services are our Intellectual Property. The code our plugin suggests in your editor is becoming your Intellectual Property.

You are responsible for the code you create with and without Refact (e.g. attribution, commercial use, etc.).

You agree not to resell, disassemble, or reverse engineer any part of the plugin, model, or anything else we provide to you.

You agree not to create multiple Refact accounts for the same person.

You agree not to use the plugin to create harmful programs, or fraud us or others.

## Full Version

Welcome to Refact coding assistant (the "Service"). By using the Service, you agree to be bound by the following terms and conditions (the "Terms"). If you do not agree to these Terms, do not use the Service.

##### 1\. Use of the Service.

You may use the Service only for lawful purposes and in accordance with these Terms. You may not use the Service to:

* transmit any unlawful, infringing, defamatory, harassing, fraudulent, or obscene material;
* transmit any material that contains software viruses or other harmful code;
* interfere with or disrupt the Service or servers or networks connected to the Service; or
* attempt to gain unauthorized access to the Service or its related systems or networks;
* create false personas, multiple identities, multiple user accounts, set up an account on behalf of someone other than yourself.

##### 2\. Intellectual Property.

The Service and all materials contained within the Service, including but not limited to text, graphics, images, and software, are the property of Small Magellanic Cloud AI Ltd. (here and after "SMC", "we" or "us") or its licensors and are protected by copyright and other intellectual property laws. You may not use any materials contained within the Service for any commercial purpose without the express written consent of Small Magellanic Cloud AI Ltd.

SMC is not granted with any rights in and to any code and/or other intellectual property developed by you while using the Services in accordance with the provisions hereof and any code suggestions accepted by you while using the Services in accordance with these Terms of Use and incorporated by you into any code you generate shall be deemed as part of the code generated by you for all purposes and SMC hereby grants you a non-exclusive, perpetual and royalty-free license to use, within the code generated by you, any such code suggestions. If such code reproduces some known works or violates some licenses of those works, it is your responsibility to identify such cases and act accordingly.

##### 3\. Disclaimer of Warranties.

The Service is provided on an "as is" and "as available" basis. SMC makes no warranties of any kind, express or implied, as to the operation of the Service or the information, content, materials, or products included on the Service. SMC will not be liable for any damages of any kind arising from the use of the Service, including but not limited to direct, indirect, incidental, punitive, and consequential damages.

##### 4\. Limitation of Liability.

SMC will not be liable for any damages of any kind arising from the use of the Service, including but not limited to direct, indirect, incidental, punitive, and consequential damages.

##### 5\. Changes to the Service.

SMC reserves the right to modify or discontinue the Service at any time, without notice, and without liability to you.

##### 6\. Governing Law.

These Terms and your use of the Service shall be governed by and construed in accordance with the laws of England and Wales, without giving effect to any principles of conflicts of law.

##### 7\. Dispute Resolution.

Any dispute arising out of or relating to these Terms or the Service will be subject to the exclusive jurisdiction of the courts of England and Wales.

##### 8\. Miscellaneous.

These Terms constitute the entire agreement between you and SMC with respect to the Service. If any provision of these Terms is found to be invalid or unenforceable, that provision shall be enforced to the maximum extent possible, and the remaining provisions shall remain in full force and effect.

##### 9\. Changes to These Terms.

SMC reserves the right to update and change these Terms at any time without notice. Any changes to these Terms will be effective immediately upon posting. Your continued use of the Service after any changes to these Terms will constitute your acceptance of those changes.
10 changes: 10 additions & 0 deletions MultilineGreyText/RefactExtension.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Content Include="LICENSE.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="icon.png">
<IncludeInVSIX>true</IncludeInVSIX>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Community.VisualStudio.Toolkit.17">
<Version>17.0.507</Version>
Expand Down
2 changes: 1 addition & 1 deletion MultilineGreyText/RefactLanguageClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ String GetArgs(){
args += "--address-url " + (String.IsNullOrWhiteSpace(General.Instance.AddressURL) ? "Refact" : General.Instance.AddressURL) + " ";
args += "--api-key " + (String.IsNullOrWhiteSpace(General.Instance.APIKey) ? "ZZZWWW" : General.Instance.APIKey) + " ";

return args + "--http-port 8001 --lsp-stdin-stdout 1 --logs-stderr";
return args + "--http-port 8001 --lsp-stdin-stdout 1";
}

//used to start loading lsp
Expand Down
Binary file added MultilineGreyText/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 12 additions & 3 deletions MultilineGreyText/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="RefactExtension.565c0987-99df-4b97-a332-9c26d2e5fd00" Version="1.0" Language="en-US" Publisher="James Brownlee" />
<DisplayName>Refact Extension</DisplayName>
<Description>Empty VSIX Project.</Description>
<Identity Id="codify.565c0987-99df-4b97-a332-9c26d2e5fd00" Version="0.1" Language="en-US" Publisher="smallcloud" />
<DisplayName>Refact</DisplayName>
<Description>Refact.ai: The AI Assistant for Code Writing and Refactoring</Description>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0, 18.0)">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[17.0,18.0)">
<ProductArchitecture>arm64</ProductArchitecture>
</InstallationTarget>
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[17.0, 18.0)">
<ProductArchitecture>amd64</ProductArchitecture>
</InstallationTarget>
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[17.0,18.0)">
<ProductArchitecture>arm64</ProductArchitecture>
</InstallationTarget>
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
Expand Down

0 comments on commit 17dfadb

Please sign in to comment.