Skip to content
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

Update docs 14th mar #2362

Merged
merged 45 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f5bd865
docs: update slogan
henryh0x1 Mar 8, 2024
3e04514
docs: update website-docs content
henryh0x1 Mar 10, 2024
7cd2a76
docs: update README.md
henryh0x1 Mar 10, 2024
6c9fa25
delete docs/docs/.gitignore
henryh0x1 Mar 10, 2024
7026d2d
feat: update changelog configuration
henryh0x1 Mar 10, 2024
90d208a
feat: fetching changelogs
henryh0x1 Mar 10, 2024
86af902
fix: message from quick ask not get the selected model (#2307)
namchuai Mar 11, 2024
c8ea16e
fix: quick ask blocks app update (#2310)
louis-jan Mar 11, 2024
bbfc686
fix: quick ask not show (#2315)
louis-jan Mar 11, 2024
6f899eb
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 11, 2024
de433bb
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 11, 2024
c2c1793
Merge branch 'dev' into docs-update-changelog-configuration
aindrajaya Mar 12, 2024
ad7e483
fix: jan app tray blocks app update (#2319)
louis-jan Mar 12, 2024
259698e
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 12, 2024
facfaa1
feat: quick ask support darkmode (#2316)
urmauur Mar 12, 2024
9dfb7a6
docs: update slogan (#2282)
henryh0x1 Mar 12, 2024
468322a
docs: update website-docs content (#2287)
henryh0x1 Mar 12, 2024
f4f1888
docs: enhance autogenerate changelog configuration (#2289)
henryh0x1 Mar 12, 2024
b9b421a
fix: quick app bugs (#2327)
louis-jan Mar 12, 2024
32b7649
fix: existing-changelog
henryh0x1 Mar 12, 2024
af5bcea
fix: gate quick ask with feature toggle (#2331)
louis-jan Mar 12, 2024
0747c15
fix: not fetch existing changelog (#2330)
henryh0x1 Mar 12, 2024
2082b81
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 12, 2024
e5369ed
fix: do not migrate extensions from quick ask window (#2336)
louis-jan Mar 12, 2024
fb893b8
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 12, 2024
bff20ab
fix: put quick ask feature toggle under experimental feature (#2338)
louis-jan Mar 13, 2024
f1db7a4
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 13, 2024
7048c85
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 13, 2024
24c6dd0
Add icon file contain image size in file name to fix linux icon (#2344)
hiento09 Mar 14, 2024
d85d026
feat: Nitro-Tensorrt-LLM Extension (#2280)
louis-jan Mar 14, 2024
561b1dd
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 14, 2024
03a0978
fix: some costmetic issues: badges corner, recommended for tensorrt m…
namchuai Mar 14, 2024
d9c3852
fix: ts error when declar var in case (#2348)
namchuai Mar 14, 2024
8120ad2
fix: badge or progress tensorRtExtensionItem (#2349)
urmauur Mar 14, 2024
aab8ee8
fix: disable rag & stream settings from tensorrt model.json (#2351)
louis-jan Mar 14, 2024
0415786
fix: app does not recognize GPU first launch (#2350)
louis-jan Mar 14, 2024
f878555
docs: trt-llm extension guides
0xSage Mar 14, 2024
b4eff9a
docs: fix slugs
0xSage Mar 14, 2024
ab73941
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 14, 2024
1fe3dff
docs: update slugs again
0xSage Mar 14, 2024
70fc24f
docs: nits
0xSage Mar 14, 2024
4b6f218
docs: nits
0xSage Mar 14, 2024
7686377
Merge branch 'dev' into fix2345
dan-homebrew Mar 14, 2024
441af9d
Merge pull request #2353 from janhq/fix2345
dan-homebrew Mar 14, 2024
f3ca508
Merge branch 'dev' into docs
dan-homebrew Mar 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: quick app bugs (#2327)
  • Loading branch information
louis-jan committed Mar 12, 2024
commit b9b421a495876a58465710da872425a8e045dd57
20 changes: 12 additions & 8 deletions electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ const gotTheLock = app.requestSingleInstanceLock()

app
.whenReady()
.then(() => {
if (!gotTheLock) {
app.quit()
throw new Error('Another instance of the app is already running')
}
})
.then(setupReactDevTool)
.then(setupCore)
.then(createUserSpace)
Expand All @@ -63,22 +69,20 @@ app
log(`Version: ${app.getVersion()}`)
})
.then(() => {
if (!gotTheLock) {
app.quit()
} else {
app.on('second-instance', (_event, _commandLine, _workingDirectory) => {
// Someone tried to run a second instance, we should focus our window.
windowManager.showMainWindow()
})
}
app.on('activate', () => {
if (!BrowserWindow.getAllWindows().length) {
createMainWindow()
} else {
windowManager.showMainWindow()
}
})
})
.then(() => cleanLogs())

app.on('second-instance', (_event, _commandLine, _workingDirectory) => {
windowManager.showMainWindow()
})

app.on('ready', () => {
registerGlobalShortcuts()
})
Expand Down
2 changes: 1 addition & 1 deletion electron/managers/mainWindowConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const mainWindowConfig: Electron.BrowserWindowConstructorOptions = {
width: DEFAULT_WIDTH,
minWidth: DEFAULT_WIDTH,
height: DEFAULT_HEIGHT,
skipTaskbar: true,
skipTaskbar: false,
show: true,
trafficLightPosition: {
x: 10,
Expand Down
36 changes: 22 additions & 14 deletions electron/managers/tray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,28 @@ class TrayManager {
const tray = new Tray(iconPath)
tray.setToolTip(app.getName())

const contextMenu = Menu.buildFromTemplate([
{
label: 'Open Jan',
type: 'normal',
click: () => windowManager.showMainWindow(),
},
{
label: 'Open Quick Ask',
type: 'normal',
click: () => windowManager.showQuickAskWindow(),
},
{ label: 'Quit', type: 'normal', click: () => app.quit() },
])
tray.setContextMenu(contextMenu)
tray.on('click', () => {
windowManager.showQuickAskWindow()
})

// Add context menu for windows only
if (process.platform === 'win32') {
const contextMenu = Menu.buildFromTemplate([
{
label: 'Open Jan',
type: 'normal',
click: () => windowManager.showMainWindow(),
},
{
label: 'Open Quick Ask',
type: 'normal',
click: () => windowManager.showQuickAskWindow(),
},
{ label: 'Quit', type: 'normal', click: () => app.quit() },
])

tray.setContextMenu(contextMenu)
}
this.currentTray = tray
}

Expand Down
4 changes: 0 additions & 4 deletions electron/managers/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,11 @@ class WindowManager {
hideMainWindow(): void {
this.mainWindow?.hide()
this._mainWindowVisible = false
// Only macos
if (process.platform === 'darwin') app.dock.hide()
}

showMainWindow(): void {
this.mainWindow?.show()
this._mainWindowVisible = true
// Only macos
if (process.platform === 'darwin') app.dock.show()
}

hideQuickAskWindow(): void {
Expand Down
4 changes: 0 additions & 4 deletions web/containers/Providers/KeyListener.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ export default function KeyListener({ children }: Props) {

useEffect(() => {
const onKeyDown = (e: KeyboardEvent) => {
if (e.key === 'Escape') {
window.core?.api?.hideMainWindow()
}

const prefixKey = isMac ? e.metaKey : e.ctrlKey

if (e.key === 'b' && prefixKey) {
Expand Down
Loading