-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
483 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: App Builder | ||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [macos-latest, ubuntu-latest, windows-latest] | ||
include: | ||
- os: ubuntu-latest | ||
rust_target: x86_64-unknown-linux-gnu | ||
- os: macos-latest | ||
rust_target: x86_64-apple-darwin | ||
- os: macos-latest | ||
rust_target: aarch64-apple-darwin | ||
- os: windows-latest | ||
rust_target: x86_64-pc-windows-msvc | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# for projects that use labels and PRs, | ||
# try https://github.com/mikepenz/release-changelog-builder-action instead | ||
# TODO: use API to collect commit messages | ||
- name: Build Changelog | ||
id: build_changelog | ||
run: echo "changelog=- ADD CHANGELOG" >> $GITHUB_OUTPUT | ||
|
||
- name: Node.js setup | ||
uses: actions/setup-node@v3 | ||
# NOTE: enterprise developers may hard code a version | ||
with: | ||
node-version: latest | ||
# node-version-file: '.nvmrc' | ||
|
||
- name: Install Rust (Stable) | ||
run: curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
|
||
- name: Install dependencies (ubuntu only) | ||
if: matrix.platform == 'ubuntu-latest' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf | ||
- name: Install app dependencies from lockfile and build web | ||
# NOTE: comment out && yarn build if frontend does not have build script | ||
working-directory: ./kuebiko_v | ||
run: yarn install --frozen-lockfile && yarn build | ||
|
||
- name: Build the app | ||
uses: tauri-apps/tauri-action@v0 | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
# tauri-action replaces \_\_VERSION\_\_ with the app version | ||
tagName: ${{ github.ref_name }} | ||
releaseName: "Sample Release for Modern Desktop App v__VERSION__" | ||
releaseBody: | | ||
${{steps.build_changelog.outputs.changelog}} | ||
See the assets to download this version and install. | ||
releaseDraft: true | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
node_modules | ||
/build | ||
/package | ||
/*.json | ||
/models | ||
.env | ||
__pycache__/ | ||
.env.* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter" | ||
}, | ||
"python.formatting.provider": "none" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"tabWidth": 2, | ||
"useTabs": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,36 @@ | ||
<script lang="ts"> | ||
import Home from "./lib/Home.svelte"; | ||
import Prompt from "./lib/Prompt.svelte"; | ||
import Credentials from "./lib/Credentials.svelte"; | ||
import { state } from "./store"; | ||
import { initPrefs, saveState, getState } from "./prefs"; | ||
import { onMount } from "svelte"; | ||
<title>Kuebiko</title> | ||
<script lang = "ts"> | ||
import Home from "./lib/Home.svelte"; | ||
import Prompt, {loadPrompt} from "./lib/Prompt.svelte"; | ||
import Credentials, {loadCredentials} from "./lib/Credentials.svelte"; | ||
let currentScreen = "home"; | ||
let appLoaded = false; | ||
if(!appLoaded){ | ||
loadCredentials(); | ||
loadPrompt(); | ||
appLoaded = true; | ||
} | ||
onMount(() => { | ||
initPrefs(); | ||
}); | ||
</script> | ||
<div class = "menuButtons"> | ||
<button class = "menuButton" on:click={() => currentScreen = "home"}> | ||
|
||
<title>Kuebiko</title> | ||
<div class="menuButtons"> | ||
<button class="menuButton" on:click={() => ($state.CURRENT_PAGE = "HOME")}> | ||
Home | ||
</button> | ||
<button class="menuButton" on:click={() => currentScreen = "credentials"}> | ||
<button | ||
class="menuButton" | ||
on:click={() => ($state.CURRENT_PAGE = "CREDENTIALS")} | ||
> | ||
Credentials | ||
</button> | ||
<button class="menuButton" on:click={() => currentScreen = "Prompt"}> | ||
<button class="menuButton" on:click={() => ($state.CURRENT_PAGE = "PROMPT")}> | ||
Prompt | ||
</button> | ||
</div> | ||
|
||
<section> | ||
|
||
{#if currentScreen === "home"} | ||
<Home/> | ||
{:else if currentScreen === "credentials"} | ||
<Credentials/> | ||
{:else if currentScreen = "Prompt"} | ||
<Prompt/> | ||
{/if} | ||
|
||
</section> | ||
|
||
|
||
{#if $state.CURRENT_PAGE === "HOME"} | ||
<Home /> | ||
{:else if $state.CURRENT_PAGE === "CREDENTIALS"} | ||
<Credentials /> | ||
{:else if $state.CURRENT_PAGE === "PROMPT"} | ||
<Prompt /> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
declare type Model = "DAVINCI" | "LLAMA" | "GPTTURBO" | "CUSTOMGPT"; | ||
declare type Page = "HOME" | "SETTINGS" | "ABOUT" | "CREDENTIALS" | "PROMPT"; | ||
|
||
declare interface State { | ||
CURRENT_MODEL: Model; | ||
CURRENT_PAGE: Page; | ||
TWITCH_TOKEN: string; | ||
TWITCH_CHANNEL: string; | ||
OPEN_API_KEY: string; | ||
PROMPT: string; | ||
} |
Oops, something went wrong.