-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
efactor app directories and enforce ts strict mode #201
Merged
Merged
Changes from 5 commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
c91e6b8
refactor: move Electron app to main directory and enforce ts strict mode
louis-jan a473e8e
chore: add pre-install plugins
louis-jan 2267629
remove duplicated initModel function
4a9e345
chore: correct module path
louis-jan ff7fd8a
fix: dynamic import does not work with ts
louis-jan e22bc05
chore: web should be able to run on target host browser
louis-jan bc16c05
fix: history panel, should display conversations rather just blank state
louis-jan d0510dd
chore: init default model
louis-jan fc20cae
chore: pluggin in ts
louis-jan c5e8a4d
fix: pre-pack model management
louis-jan a296be1
fix: compiled core should not include plugins
louis-jan 444b5d9
chore: refactor - invoke plugin function
louis-jan e325f48
refactor download/delete file
422baec
update prebuild lib
41be6ea
chore: yarn workspace
louis-jan 6150180
chore: update yarn workspace
louis-jan 3b6a3c4
chore: yarn workspace with nohoist
louis-jan d2d11d2
fix: llama-cpp-import
louis-jan d86e6bd
chore: fix data-plugin wrong module path
louis-jan 126bb6f
chore: correct build step
louis-jan 15f2ba4
chore: - separate inference service (#212)
namchuai 9b4ef2c
chore: update core plugins
louis-jan eae5a75
chore: hide installation prompt and fix model load - management plugin
louis-jan 32779fd
chore: remove legacy files; update readme
9f5907a
fix: refresh page lost the download state
a47a149
fix: ai prompt not passed to plugin
be13590
chore: module import fix for production
louis-jan 583577a
chore: auto updater
louis-jan 1390cf6
chore: package is public
louis-jan c811ffc
chore: fix yarn workspace config
louis-jan 7154738
update: model management uses Q4_K_M
louis-jan 9dc4593
chore: fix yarn scripts for publishing
louis-jan c8021c8
chore: app updater - progress update message
louis-jan dd834c9
chore: user confirms update action
louis-jan d2be2b0
adding some state for changing page
918c7e3
chore: refactor plugins into yarn workspace - a single command to pub…
louis-jan 7aba085
chore update readme (#218)
hiento09 2e61778
change app name and app icon
c3c367f
remove: go-to-nowhere actions
louis-jan 6aba03c
chore: bundle core plugins from root and scan default plugins
louis-jan 4951a18
fix: app crashes on different field name lookup
louis-jan 10e0932
chore: css fix
louis-jan ec15204
chore: bind download progress to app ui
louis-jan ce95440
chore: bind active model
louis-jan f6d88ee
chore: simplify app splash-screen only centered jan icon
louis-jan 54a99ea
feature: system monitoring plugin (#196)
hiro-v eac8bf5
chore: add build:plugins step to README
louis-jan 92a5b66
chore: model searching and fix model name
louis-jan 9ee7bc4
fix: plugin file selected appearance
louis-jan f8b8d93
fix: create new conversation does not work
louis-jan c1a0965
fix: delete conversation not update state - messages still exist
louis-jan 1c79b93
chore: fix asset path prefix
louis-jan 64a50e0
Add CICD for macos (#221)
hiento09 313b8a9
chore: fix production plugin path
louis-jan b0c6630
chore: add shell open url in external browser
louis-jan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,43 @@ | ||
{ | ||
"name": "jan-electron-app", | ||
"version": "1.0.0", | ||
"description": "Hello World!", | ||
"main": "./build/main.js", | ||
"author": "Jan", | ||
"license": "MIT", | ||
"build": { | ||
"appId": "jan.ai.app", | ||
"productName": "Jan Desktop App", | ||
"asarUnpack": [ | ||
"node_modules", | ||
"core" | ||
], | ||
"files": [ | ||
"out/**/*", | ||
"build/**/*", | ||
"core" | ||
], | ||
"extends": null, | ||
"mac": { | ||
"type": "distribution" | ||
} | ||
}, | ||
"scripts": { | ||
"dev": "tsc -p . && electron .", | ||
"electron:start": "concurrently \"yarn dev\" \"wait-on http://localhost:3000 && tsc -p . && electron .\"", | ||
"electron:build:all": "yarn build && electron-builder build --publish never -mwl" | ||
}, | ||
"dependencies": { | ||
"electron-is-dev": "^2.0.0", | ||
"pluggable-electron": "^0.6.0", | ||
"request": "^2.88.2", | ||
"request-progress": "^3.0.0", | ||
"node-llama-cpp": "^2.4.1" | ||
}, | ||
"devDependencies": { | ||
"concurrently": "^8.2.1", | ||
"electron": "^26.2.1", | ||
"electron-builder": "^24.6.4", | ||
"wait-on": "^7.0.1" | ||
} | ||
} |
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,31 +1,33 @@ | ||
/* eslint-disable react-hooks/rules-of-hooks */ | ||
// Make Pluggable Electron's facade available to the renderer on window.plugins | ||
//@ts-ignore | ||
const useFacade = require("pluggable-electron/facade"); | ||
useFacade(); | ||
|
||
//@ts-ignore | ||
const { contextBridge, ipcRenderer } = require("electron"); | ||
|
||
contextBridge.exposeInMainWorld("electronAPI", { | ||
invokePluginFunc: (plugin, method, ...args) => | ||
invokePluginFunc: (plugin: any, method: any, ...args: any[]) => | ||
ipcRenderer.invoke("invokePluginFunc", plugin, method, ...args), | ||
|
||
userData: () => ipcRenderer.invoke("userData"), | ||
|
||
sendInquiry: (question) => ipcRenderer.invoke("sendInquiry", question), | ||
sendInquiry: (question: string) => | ||
ipcRenderer.invoke("sendInquiry", question), | ||
|
||
initModel: (product) => ipcRenderer.invoke("initModel", product), | ||
initModel: (product: any) => ipcRenderer.invoke("initModel", product), | ||
|
||
getDownloadedModels: () => ipcRenderer.invoke("getDownloadedModels"), | ||
|
||
getAvailableModels: () => ipcRenderer.invoke("getAvailableModels"), | ||
|
||
deleteModel: (path) => ipcRenderer.invoke("deleteModel", path), | ||
deleteModel: (path: string) => ipcRenderer.invoke("deleteModel", path), | ||
|
||
downloadModel: (url) => ipcRenderer.invoke("downloadModel", url), | ||
downloadModel: (url: string) => ipcRenderer.invoke("downloadModel", url), | ||
|
||
onModelDownloadUpdate: (callback) => | ||
onModelDownloadUpdate: (callback: any) => | ||
ipcRenderer.on("model-download-update", callback), | ||
|
||
onModelDownloadError: (callback) => | ||
onModelDownloadError: (callback: any) => | ||
ipcRenderer.on("model-download-error", callback), | ||
}); |
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,13 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "commonjs", | ||
"sourceMap": true, | ||
"strict": true, | ||
"outDir": "./build", | ||
"rootDir": "./", | ||
"noEmitOnError": true, | ||
"allowJs": true, | ||
"typeRoots": ["node_modules/@types"] | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
..._components/SidebarEmptyHistory/index.tsx → ..._components/SidebarEmptyHistory/index.tsx
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
microsoft/TypeScript#43329