Skip to content

Commit

Permalink
feat: add basic marketplace logic (blib-la#20)
Browse files Browse the repository at this point in the history
* feat: add basic marketplace logic

* feat: adjust downloading to handle multiple files

* feat: adjust gpt logic

* feat: cleanup code base

* chore: remove unused

* fix: focus outline on overflow hidden

* feat: add lottie to feedback

* refactor: consistent use of swr for polling

* refactor: move hooks

* refactor: move functions, cleanup

* fix: add missing translations

* fix: handle GPT errors

* chore: update dependencies

* chore: integrate husky

* refactor: remove duplicate i18next config

* feat: allow downloading marketplace

* feat: improve marketplace download

* docs: update readme

* refactor: remove unused var

* fix: marketplace crash after dataset
  • Loading branch information
pixelass committed Jan 31, 2024
1 parent 060df23 commit 727d5a7
Show file tree
Hide file tree
Showing 115 changed files with 17,415 additions and 9,941 deletions.
6 changes: 6 additions & 0 deletions .browserslistrc
@@ -0,0 +1,6 @@
last 2 android versions
last 2 edge versions
last 2 chrome versions
last 2 firefox versions
last 2 ios versions
last 2 safari version
3 changes: 3 additions & 0 deletions .commitlintrc.json
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}
21 changes: 21 additions & 0 deletions .editorconfig
@@ -0,0 +1,21 @@
root = true

[*]
charset = utf-8
indent_style = tab
indent_size = 4
max_line_length = 100
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

# trailing spaces in markdown indicate word wrap
[*.md]
trim_trailing_whitespace = false


[{*.json,*.md,*.yml,.*rc,.*config,*.feature,*.prisma}]
indent_style = space

[{*.json,*.yml,.*rc,.*config,*.feature,*.prisma}]
indent_size = 2
7 changes: 7 additions & 0 deletions .eslintignore
@@ -0,0 +1,7 @@
node_modules/
public/
traces/
reports/
coverage/
.idea/
.next/
113 changes: 113 additions & 0 deletions .eslintrc.json
@@ -0,0 +1,113 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"extends": [
"typescript",
"eslint:recommended",
"xo",
"plugin:unicorn/recommended",
"plugin:prettier/recommended",
"next/core-web-vitals"
],
"env": {
"browser": true,
"es2022": true,
"jest": true,
"node": true
},
"globals": {
"BufferEncoding": "readonly"
},
"plugins": ["@typescript-eslint", "unicorn", "unused-imports", "import", "jest", "prettier"],
"ignorePatterns": ["*.d.ts"],
"rules": {
"import/order": [
"error",
{
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"newlines-between": "always"
}
],
"@typescript-eslint/no-explicit-any": "warn",
"camelcase": "off",
"no-await-in-loop": "off",
"unicorn/no-null": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"@next/next/no-html-link-for-pages": "off",
"@next/next/no-img-element": "off",
"unused-imports/no-unused-vars": [
"warn",
{ "vars": "all", "varsIgnorePattern": "^_", "args": "after-used", "argsIgnorePattern": "^_" }
],
"curly": "error",
"no-nested-ternary": "error",
"no-multiple-empty-lines": "error",
"object-curly-spacing": ["error", "always"],
"prettier/prettier": "error",
"arrow-body-style": ["error", "as-needed"],
"unicorn/prefer-node-protocol": "off",
"@typescript-eslint/consistent-type-imports": "error",
"react/jsx-curly-brace-presence": "error",
"react/self-closing-comp": "error",
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "@mui/joy",
"message": "Please use Component from @mui/joy/Component instead."
},
{
"name": "@mui/icons-material",
"message": "Please use FooIcon from @mui/icons-material/Foo instead."
}
]
}
],
"func-style": ["error", "declaration"],
"prefer-arrow-callback": "error",
"unicorn/filename-case": [
"error",
{
"case": "kebabCase",
"ignore": ["^\\[.*\\]\\.tsx?$"]
}
],
"react/jsx-sort-props": [
"error",
{
"callbacksLast": true,
"shorthandFirst": true,
"multiline": "last",
"reservedFirst": true,
"noSortAlphabetically": true
}
]
},
"overrides": [
{
"files": ["sanity.cli.ts", "next-i18next.config.js"],
"rules": {
"unicorn/prefer-module": "off",
"unicorn/no-null": "off"
}
},
{
"files": "types.ts",
"rules": {
"no-unused-vars": "off"
}
},
{
"files": "cucumber/**/*.ts",
"rules": {
"new-cap": "off"
}
}
]
}
4 changes: 4 additions & 0 deletions .husky/commit-msg
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged && npm run tsc:noEmit
28 changes: 28 additions & 0 deletions .lintstagedrc.json
@@ -0,0 +1,28 @@
{
"*.ts": [
"npx eslint --fix"
],
"*.tsx": [
"npx eslint --fix"
],
"*.js": [
"npx eslint --fix"
],
"*.cjs": [
"npx eslint --fix"
],
"*.mjs": [
"npx eslint --fix"
],
"package.json": [
"npx sort-package-json",
"npx prettier --write"
],
"*.md": [
"npx prettier --write"
],
"README.md": [
"npx markdown-toc -i",
"npx prettier --write"
]
}
2 changes: 1 addition & 1 deletion .ncurc.json
@@ -1,4 +1,4 @@
{
"upgrade": true,
"reject": ["@types/node"]
"reject": ["@types/node", "codemirror", "next", "sharp"]
}
1 change: 1 addition & 0 deletions .nvmrc
@@ -0,0 +1 @@
v18.17.1
1 change: 1 addition & 0 deletions .prettierignore
@@ -0,0 +1 @@
CHANGELOG.md
10 changes: 10 additions & 0 deletions .prettierrc.json
@@ -0,0 +1,10 @@
{
"trailingComma": "es5",
"semi": true,
"singleQuote": false,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"bracketSpacing": true,
"arrowParens": "avoid",
"proseWrap": "always"
}
21 changes: 13 additions & 8 deletions README.md
Expand Up @@ -2,14 +2,14 @@

Captain simplifies AI on your desktop. It's a free, open-source application that requires no complex setup — just a single .exe file. It provides a variety of AI tools and features a multi-language UI.

Captain currently supports English, German, Spanish, French, Hebrew, Italian, Japanese, Dutch, Polish, Portuguese, Russian, and Chinese.
Captain currently supports English, German, Spanish, French, Italian, Japanese, Dutch, Polish, Portuguese, Russian, and Chinese.

<p align="center">
<img src="./docs/logo.png" alt="Download Captain" width="300">
</p>

<p align="center">
<a href="https://github.com/blib-la/captain/releases/download/v1.0.0-beta.4/Captain.Setup.1.0.0-beta.4.exe">
<a href="https://github.com/blib-la/captain/releases/download/v1.0.0-beta.5/Captain.Setup.1.0.0-beta.5.exe">
<img src="./docs/download.svg" alt="Download Captain" width="300">
</a>
</p>
Expand All @@ -20,7 +20,6 @@ https://github.com/blib-la/captain/assets/1148334/eecac351-ec1e-4cca-aaf7-89891c
<!-- toc -->

- [Key Features](#key-features)
- [What's New](#whats-new)
- [Planned Features](#planned-features)
- [Getting Started](#getting-started)
* [Installation](#installation)
Expand All @@ -33,23 +32,29 @@ https://github.com/blib-la/captain/assets/1148334/eecac351-ec1e-4cca-aaf7-89891c

<!-- tocstop -->

Certainly! Here's an updated section for your README, incorporating the new marketplace feature and the enhancements to live reporting:

---

## Key Features

- **Versatile AI Tool Integration** ✅: Seamlessly connect with various AI tools and models for diverse functionalities.
- **Local and Online Modes** ✅: Operate fully offline after initial model downloads or connect with online AI services like OpenAI's GPT and RunPod.
- **Self-Contained Application** ✅: Enjoy the simplicity of a single `.exe` file with no need for installing Python dependencies or other software.
- **Open Source and Free** ✅: Accessible AI for everyone, with the full source code available for modification and extension.

## What's New

- **Dynamic AI Model Marketplace** ✅: Easily download and update Stable Diffusion checkpoints directly through the in-app marketplace.
- **Image Captioning** 🖼️: Start with state-of-the-art automatic captioning powered by multiple AI methods.
- **AI-Assisted Creativity** 🎨: Future updates will introduce live painting with AI and training custom models, like LoRA for Stable Diffusion.
- **Expanded Local Models** 🧠: Look forward to local models like CLIP for context-aware captions and Llava, offering multi-modal capabilities akin to GPT-Vision.

## Planned Features

- **Training and Fine-Tuning** ⏳: Personalize and train AI models directly within Captain.
- **Cross-Platform Compatibility** ⏳: We're steering towards supporting Linux and macOS users soon.
- **Expanded Local Models** 🧠: Look forward to local models like CLIP for context-aware captions and Llava, offering multi-modal capabilities akin to GPT-Vision.
- **AI-Assisted Creativity** 🎨: Future updates will introduce live painting with AI and training custom models, like LoRA for Stable Diffusion.

---

This update keeps the format consistent with your existing style while incorporating the new marketplace feature and the improved live reporting for caption generation.

## Getting Started

Expand Down
5 changes: 4 additions & 1 deletion electron-builder.yml
Expand Up @@ -12,7 +12,10 @@ files:
- resources/python/**/*
- resources/python-embeded/**/*
publish: null
nsis:
oneClick: false
allowToChangeInstallationDirectory: true
asar: true
asarUnpack:
- "resources/python/**/*"
- "resources/python-embeded/**/*"
- "resources/python-embeded/**/*"

0 comments on commit 727d5a7

Please sign in to comment.