-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make thread screen as default screen * Blank state when user have not any model * Cleanup topbar thread screen * Improve style right panel * Add instructions right panel * Styling thread list history * Resolve conflict * Default title new thread * Fix trigger panel sidebar * Make default right panel false when no activethread * Fix CI test * chore: assistant instruction with system prompt * Fix title and blank state explore the hub * Claenup style thread screen and add buble message for assitant * Remove unused import * Styling more menus on thread list and right panel, and make max height textarea 400 pixel * Finished revamp ui thread * Finished system monitor UI * Style box running models * Make animate right panel more smooth * Add status arround textarea for starting model info * Temporary disable hide left panel * chore: system resource monitoring update * copy nits * chore: typo * Reverse icon chevron accordion * Move my models into setting page --------- Co-authored-by: Louis <[email protected]> Co-authored-by: 0xSage <[email protected]>
- Loading branch information
1 parent
e5a440f
commit 424b003
Showing
60 changed files
with
1,436 additions
and
966 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
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,41 +1,41 @@ | ||
import { _electron as electron } from "playwright"; | ||
import { ElectronApplication, Page, expect, test } from "@playwright/test"; | ||
import { _electron as electron } from 'playwright' | ||
import { ElectronApplication, Page, expect, test } from '@playwright/test' | ||
|
||
import { | ||
findLatestBuild, | ||
parseElectronApp, | ||
stubDialog, | ||
} from "electron-playwright-helpers"; | ||
} from 'electron-playwright-helpers' | ||
|
||
let electronApp: ElectronApplication; | ||
let page: Page; | ||
let electronApp: ElectronApplication | ||
let page: Page | ||
|
||
test.beforeAll(async () => { | ||
process.env.CI = "e2e"; | ||
process.env.CI = 'e2e' | ||
|
||
const latestBuild = findLatestBuild("dist"); | ||
expect(latestBuild).toBeTruthy(); | ||
const latestBuild = findLatestBuild('dist') | ||
expect(latestBuild).toBeTruthy() | ||
|
||
// parse the packaged Electron app and find paths and other info | ||
const appInfo = parseElectronApp(latestBuild); | ||
expect(appInfo).toBeTruthy(); | ||
const appInfo = parseElectronApp(latestBuild) | ||
expect(appInfo).toBeTruthy() | ||
|
||
electronApp = await electron.launch({ | ||
args: [appInfo.main], // main file from package.json | ||
executablePath: appInfo.executable, // path to the Electron executable | ||
}); | ||
await stubDialog(electronApp, "showMessageBox", { response: 1 }); | ||
}) | ||
await stubDialog(electronApp, 'showMessageBox', { response: 1 }) | ||
|
||
page = await electronApp.firstWindow(); | ||
}); | ||
page = await electronApp.firstWindow() | ||
}) | ||
|
||
test.afterAll(async () => { | ||
await electronApp.close(); | ||
await page.close(); | ||
}); | ||
await electronApp.close() | ||
await page.close() | ||
}) | ||
|
||
test("explores models", async () => { | ||
await page.getByTestId("Explore Models").first().click(); | ||
await page.getByTestId("testid-explore-models").isVisible(); | ||
test('explores models', async () => { | ||
await page.getByTestId('Hub').first().click() | ||
await page.getByTestId('testid-explore-models').isVisible() | ||
// More test cases here... | ||
}); | ||
}) |
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,55 +1,55 @@ | ||
import { _electron as electron } from "playwright"; | ||
import { ElectronApplication, Page, expect, test } from "@playwright/test"; | ||
import { _electron as electron } from 'playwright' | ||
import { ElectronApplication, Page, expect, test } from '@playwright/test' | ||
|
||
import { | ||
findLatestBuild, | ||
parseElectronApp, | ||
stubDialog, | ||
} from "electron-playwright-helpers"; | ||
} from 'electron-playwright-helpers' | ||
|
||
let electronApp: ElectronApplication; | ||
let page: Page; | ||
let electronApp: ElectronApplication | ||
let page: Page | ||
|
||
test.beforeAll(async () => { | ||
process.env.CI = "e2e"; | ||
process.env.CI = 'e2e' | ||
|
||
const latestBuild = findLatestBuild("dist"); | ||
expect(latestBuild).toBeTruthy(); | ||
const latestBuild = findLatestBuild('dist') | ||
expect(latestBuild).toBeTruthy() | ||
|
||
// parse the packaged Electron app and find paths and other info | ||
const appInfo = parseElectronApp(latestBuild); | ||
expect(appInfo).toBeTruthy(); | ||
expect(appInfo.asar).toBe(true); | ||
expect(appInfo.executable).toBeTruthy(); | ||
expect(appInfo.main).toBeTruthy(); | ||
expect(appInfo.name).toBe("jan"); | ||
expect(appInfo.packageJson).toBeTruthy(); | ||
expect(appInfo.packageJson.name).toBe("jan"); | ||
expect(appInfo.platform).toBeTruthy(); | ||
expect(appInfo.platform).toBe(process.platform); | ||
expect(appInfo.resourcesDir).toBeTruthy(); | ||
const appInfo = parseElectronApp(latestBuild) | ||
expect(appInfo).toBeTruthy() | ||
expect(appInfo.asar).toBe(true) | ||
expect(appInfo.executable).toBeTruthy() | ||
expect(appInfo.main).toBeTruthy() | ||
expect(appInfo.name).toBe('jan') | ||
expect(appInfo.packageJson).toBeTruthy() | ||
expect(appInfo.packageJson.name).toBe('jan') | ||
expect(appInfo.platform).toBeTruthy() | ||
expect(appInfo.platform).toBe(process.platform) | ||
expect(appInfo.resourcesDir).toBeTruthy() | ||
|
||
electronApp = await electron.launch({ | ||
args: [appInfo.main], // main file from package.json | ||
executablePath: appInfo.executable, // path to the Electron executable | ||
}); | ||
await stubDialog(electronApp, "showMessageBox", { response: 1 }); | ||
}) | ||
await stubDialog(electronApp, 'showMessageBox', { response: 1 }) | ||
|
||
page = await electronApp.firstWindow(); | ||
}); | ||
page = await electronApp.firstWindow() | ||
}) | ||
|
||
test.afterAll(async () => { | ||
await electronApp.close(); | ||
await page.close(); | ||
}); | ||
await electronApp.close() | ||
await page.close() | ||
}) | ||
|
||
test("renders the home page", async () => { | ||
expect(page).toBeDefined(); | ||
test('renders the home page', async () => { | ||
expect(page).toBeDefined() | ||
|
||
// Welcome text is available | ||
const welcomeText = await page | ||
.getByTestId("testid-welcome-title") | ||
.getByTestId('testid-welcome-title') | ||
.first() | ||
.isVisible(); | ||
expect(welcomeText).toBe(false); | ||
}); | ||
.isVisible() | ||
expect(welcomeText).toBe(false) | ||
}) |
This file was deleted.
Oops, something went wrong.
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,51 +1,54 @@ | ||
import { _electron as electron } from "playwright"; | ||
import { ElectronApplication, Page, expect, test } from "@playwright/test"; | ||
import { _electron as electron } from 'playwright' | ||
import { ElectronApplication, Page, expect, test } from '@playwright/test' | ||
|
||
import { | ||
findLatestBuild, | ||
parseElectronApp, | ||
stubDialog, | ||
} from "electron-playwright-helpers"; | ||
} from 'electron-playwright-helpers' | ||
|
||
let electronApp: ElectronApplication; | ||
let page: Page; | ||
let electronApp: ElectronApplication | ||
let page: Page | ||
|
||
test.beforeAll(async () => { | ||
process.env.CI = "e2e"; | ||
process.env.CI = 'e2e' | ||
|
||
const latestBuild = findLatestBuild("dist"); | ||
expect(latestBuild).toBeTruthy(); | ||
const latestBuild = findLatestBuild('dist') | ||
expect(latestBuild).toBeTruthy() | ||
|
||
// parse the packaged Electron app and find paths and other info | ||
const appInfo = parseElectronApp(latestBuild); | ||
expect(appInfo).toBeTruthy(); | ||
const appInfo = parseElectronApp(latestBuild) | ||
expect(appInfo).toBeTruthy() | ||
|
||
electronApp = await electron.launch({ | ||
args: [appInfo.main], // main file from package.json | ||
executablePath: appInfo.executable, // path to the Electron executable | ||
}); | ||
await stubDialog(electronApp, "showMessageBox", { response: 1 }); | ||
}) | ||
await stubDialog(electronApp, 'showMessageBox', { response: 1 }) | ||
|
||
page = await electronApp.firstWindow(); | ||
}); | ||
page = await electronApp.firstWindow() | ||
}) | ||
|
||
test.afterAll(async () => { | ||
await electronApp.close(); | ||
await page.close(); | ||
}); | ||
await electronApp.close() | ||
await page.close() | ||
}) | ||
|
||
test("renders left navigation panel", async () => { | ||
test('renders left navigation panel', async () => { | ||
// Chat section should be there | ||
const chatSection = await page.getByTestId("Chat").first().isVisible(); | ||
expect(chatSection).toBe(false); | ||
const chatSection = await page.getByTestId('Chat').first().isVisible() | ||
expect(chatSection).toBe(false) | ||
|
||
// Home actions | ||
/* Disable unstable feature tests | ||
** const botBtn = await page.getByTestId("Bot").first().isEnabled(); | ||
** Enable back when it is whitelisted | ||
*/ | ||
|
||
const myModelsBtn = await page.getByTestId("My Models").first().isEnabled(); | ||
const settingsBtn = await page.getByTestId("Settings").first().isEnabled(); | ||
expect([myModelsBtn, settingsBtn].filter((e) => !e).length).toBe(0); | ||
}); | ||
const systemMonitorBtn = await page | ||
.getByTestId('System Monitor') | ||
.first() | ||
.isEnabled() | ||
const settingsBtn = await page.getByTestId('Settings').first().isEnabled() | ||
expect([systemMonitorBtn, settingsBtn].filter((e) => !e).length).toBe(0) | ||
}) |
Oops, something went wrong.