Skip to content

Commit 3eff932

Browse files
committed
more updates from the past 🪦🧟‍♂️🧟‍♀️
1 parent 7490da3 commit 3eff932

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+105
-86
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ yarn-error.log*
77
pnpm-debug.log*
88
lerna-debug.log*
99

10+
.next/*
11+
1012
node_modules
1113
dist
1214
dist-ssr

README.md

+14-3

bun.lockb

504 Bytes
Binary file not shown.

next.config.cjs

+9-11
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
/** @type {import('next').NextConfig} */
22

33
const nextConfig = {
4-
output: 'standalone',
5-
4+
5+
reactStrictMode: true,
6+
swcMinify: true,
7+
images: {
8+
unoptimized: true,
9+
},
10+
// output: 'standalone',
11+
output: 'export', // <-- Tauri doc says we should use this?
12+
613
experimental: {
714
serverActions: {
815
bodySizeLimit: '8mb',
916
},
1017
}
1118

12-
// this is the old config used by the latent browser:
13-
// I'm not sure we still need it
14-
/*
15-
reactStrictMode: true,
16-
swcMinify: true,
17-
images: {
18-
unoptimized: true,
19-
},
20-
2119
/*
2220
EMERGENCY FIX - TEMPORARY DISABLE
2321
rewrites: async () => ({

package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44
"version": "0.0.0",
55
"type": "module",
66
"scripts": {
7-
"dev": "next dev -p 1420",
8-
"build": "next build && next export -o dist",
7+
"dev": "next dev -p 3000",
8+
"next:start": "cross-env BROWSER=none next dev",
9+
"next:dev": "next dev -p 3000",
10+
"next:build": "next build",
11+
"build": "next build && tauri build",
912
"tauri": "tauri",
1013
"tauri:dev": "tauri dev",
14+
"tauri:build": "tauri build",
1115
"ts-node": "ts-node",
1216
"storybook": "start-storybook -p 6006",
1317
"build-storybook": "build-storybook"
@@ -21,6 +25,7 @@
2125
"@types/mime-types": "^2.1.4",
2226
"autoprefixer": "^10.4.19",
2327
"clsx": "^2.1.0",
28+
"cross-env": "^7.0.3",
2429
"dangerously-set-html-content": "^1.1.0",
2530
"dompurify": "^3.0.11",
2631
"fuse.js": "^7.0.0",

public/site.webmanifest

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
1+
{"name":"The Latent Browser","short_name":"The Latent Browser","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}

src-tauri/Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "latent-browser"
3-
version = "0.0.0"
4-
description = "A Tauri App"
5-
authors = ["you"]
3+
version = "0.1.0"
4+
description = ""
5+
authors = ["Julian Bilcke"]
66
edition = "2021"
77

88
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -15,7 +15,7 @@ crate-type = ["lib", "cdylib", "staticlib"]
1515
tauri-build = { version = "2.0.0-beta", features = [] }
1616

1717
[dependencies]
18-
tauri = { version = "2.0.0-beta", features = [] }
18+
tauri = { version = "2.0.0-beta", features = ["macos-private-api"] }
1919
tauri-plugin-shell = "2.0.0-beta"
2020
serde = { version = "1", features = ["derive"] }
2121
serde_json = "1"

src-tauri/capabilities/main.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "../gen/schemas/desktop-schema.json",
3+
"identifier": "main-capability",
4+
"description": "Capability for the main window",
5+
"windows": ["main"],
6+
"permissions": [
7+
"path:default",
8+
"event:default",
9+
"window:default",
10+
"window:allow-start-dragging",
11+
"app:default",
12+
"resources:default",
13+
"menu:default",
14+
"tray:default",
15+
"window:allow-set-title"
16+
]
17+
}

src-tauri/icons/128x128.png

4.49 KB

src-tauri/icons/[email protected]

16.6 KB

src-tauri/icons/32x32.png

1.07 KB

src-tauri/icons/Square107x107Logo.png

3.7 KB

src-tauri/icons/Square142x142Logo.png

5.67 KB

src-tauri/icons/Square150x150Logo.png

6.31 KB

src-tauri/icons/Square284x284Logo.png

20.5 KB

src-tauri/icons/Square30x30Logo.png

799 Bytes

src-tauri/icons/Square310x310Logo.png

24.3 KB

src-tauri/icons/Square44x44Logo.png

981 Bytes

src-tauri/icons/Square71x71Logo.png

1.85 KB

src-tauri/icons/Square89x89Logo.png

2.65 KB
31.5 KB
85.4 KB
152 KB

src-tauri/icons/apple-touch-icon.png

28.4 KB

src-tauri/icons/favicon-16x16.png

744 Bytes

src-tauri/icons/favicon-32x32.png

1.85 KB

src-tauri/icons/favicon.ico

15 KB
Binary file not shown.

src-tauri/icons/icon.icns

-42.1 KB
Binary file not shown.

src-tauri/icons/icon.ico

-69.6 KB
Binary file not shown.

src-tauri/icons/icon.png

74.9 KB

src-tauri/icons/site.webmanifest

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}

src-tauri/tauri.conf.json

+18-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
{
2-
"productName": "latent-browser",
3-
"version": "0.0.0",
4-
"identifier": "com.tauri.dev",
2+
"productName": "The Latent Browser",
3+
"version": "0.1.0",
4+
"identifier": "com.datagica.web4",
55
"build": {
66
"beforeDevCommand": "bun run dev",
7-
"devUrl": "http://localhost:1420",
7+
"devUrl": "http://localhost:3000",
88
"beforeBuildCommand": "bun run build",
9-
"frontendDist": "../dist"
9+
"frontendDist": "../.next/server/app"
1010
},
11-
"app": {"windows": [
11+
"app": {
12+
"macOSPrivateApi": true,
13+
"windows": [
1214
{
13-
"title": "latent-browser",
15+
"title": "The Latent Browser 🔮",
16+
"decorations": false,
17+
"transparent": true,
18+
"fullscreen": false,
19+
"resizable": true,
1420
"width": 800,
1521
"height": 600
1622
}
@@ -28,6 +34,10 @@
2834
2935
"icons/icon.icns",
3036
"icons/icon.ico"
31-
]
37+
],
38+
"category": "DeveloperTool",
39+
"copyright": "Julian `flngr` Bilcke.",
40+
"shortDescription": "Browse the latent web.",
41+
"longDescription": "Browse the latent web. A project by @flngr, see https://linktr.ee/FLNGR for other projects."
3242
}
3343
}

src/app/api/mocker/[filename]/route.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import mime from 'mime-type/with-db'
33
import queryString from 'query-string'
44

55
import {
6-
mockAny,
6+
// mockAny,
77
mockImage,
88
mockJSON,
99
mockSTL,

src/app/content/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const timePerStage: Record<TaskStage, number> = {
3939
}
4040

4141
function Content() {
42-
const [storedApps, setStoredApps] = useStoredApps()
42+
const [storedApps] = useStoredApps()
4343
const [settings] = useSettings()
4444
const [openTabs, setOpenTabs] = useOpenTabs()
4545
const isLoading = !settings || !storedApps || !openTabs

src/app/search/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function Search() {
6262
)
6363
}
6464

65-
const generateSearchResults = async (pass, prompt = '') => {
65+
const generateSearchResults = async (pass: number, prompt = '') => {
6666
prompt = prompt.trim()
6767
if (!prompt.length || pass > maxNbPasses) {
6868
return

src/components/loaders/ModelProgressBar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export const ModelProgressBar = ({
33
estimatedTimeSec = 30,
44
isLoading,
55
model,
6-
provider,
6+
// provider,
77
stage,
88
}: {
99
elapsedTimeMs?: number

src/components/tabs/Tabs.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { v4 as uuidv4 } from 'uuid'
66

77
// import { v4 as uuidv4 } from 'uuid'
88
import { AppTab } from '../../types'
9-
import { useStoredApps } from '../../hooks/useStoredApps'
109
import { useOpenTabs } from '../../hooks/useOpenTabs'
1110
import { getKeyForApps } from '../../utils/getKeyForApps'
1211

@@ -40,7 +39,7 @@ export const getEmptyTab = (app?: Partial<AppTab>) =>
4039

4140
const Tabs = () => {
4241

43-
const [storedApps, setStoredApps] = useStoredApps()
42+
// const [storedApps, setStoredApps] = useStoredApps()
4443
const [openTabs, setOpenTabs] = useOpenTabs([])
4544

4645
const onAdd = () => {

src/engine/prompts/crud.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const crudJSON = (
2-
query: string,
2+
_query: string,
33
entity: string,
44
param: string,
55
mode: 'create' | 'read' | 'update' | 'delete' = 'read'

src/engine/prompts/script.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import DOMPurify from 'dompurify'
2-
import { libraries } from './libraries'
2+
33
import { Instructions } from './types'
44

55
/**
66
* Notes about this prompt:
77
* GPT-3 can add more libraries if needed
88
*/
99
export const genericScript =
10-
(id: string) => (instructions: Instructions, html: string) =>
10+
(_id: string) => (instructions: Instructions, html: string) =>
1111
`${instructions.summary}
1212
${instructions.script.map((instruction) => `- ${instruction}`).join('\n')}
1313
Code formatting rules:

src/engine/prompts/tasks.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Brief: ${query}
6666
Spec: {`
6767

6868
export const tasksValues = (tasks: Tasks): string[] =>
69-
Object.entries(tasks).map(([type, value]) => value.toLowerCase())
69+
Object.entries(tasks).map(([_type, value]) => value.toLowerCase())
7070

7171
export const getTaskCategory = (task: string): TaskCategory =>
7272
task.match(/(?:summary)/i)

src/engine/prompts/templates.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { CommonConfig, Tasks } from './types'
2-
import { libraries } from './libraries'
32

43
export const genericJSDoc = (
54
title: string,

src/engine/resolvers/image.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// import { imagineImage } from '../../providers/stabilityai'
44

55
import spinner from '../../assets/spinner.gif'
6-
import { DalleError, DalleImage } from '../../providers/openai/types'
6+
import { DalleImage } from '../../providers/openai/types'
77

88
export async function resolveImages(
99
model: string,
@@ -42,7 +42,13 @@ export async function resolveImages(
4242
)}`
4343
)
4444

45-
const { url, prompt, width, height, error } =
45+
const {
46+
url,
47+
// prompt,
48+
// width,
49+
// height,
50+
error
51+
} =
4652
(await response.json()) as DalleImage
4753

4854
if (error) {

src/engine/templates/contents/content1.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
JSXTemplate,
33
Paragraph,
4-
P,
4+
// P,
55
T,
66
Link,
77
Icon,

src/engine/templates/contents/content3.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
JSXTemplate,
33
Div,
4-
H2,
4+
// H2,
55
P,
66
T,
77
Span,

src/engine/templates/headers/header1.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import {
22
JSXTemplate,
3-
Paragraph,
3+
// Paragraph,
44
P,
55
T,
66
Link,
77
Icon,
8-
Image,
8+
// Image,
99
Title1,
1010
Title2,
1111
} from '../ai-design-system'

src/engine/templates/headers/header2.tsx

-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
import {
22
JSXTemplate,
3-
Paragraph,
43
P,
54
T,
65
Link,
76
Icon,
8-
Image,
9-
Title1,
10-
Title2,
117
t,
128
} from '../ai-design-system'
139

src/engine/templates/headers/header3.tsx

-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
import {
22
JSXTemplate,
3-
Paragraph,
43
P,
54
T,
6-
Link,
75
Icon,
86
Image,
9-
Title1,
10-
Title2,
117
} from '../ai-design-system'
128

139
// kitwind.io/products/kometa/components/headers

src/engine/templates/layouts/app.tsx

-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
import {
22
JSXTemplate,
3-
Paragraph,
4-
P,
5-
T,
63
Div,
7-
H5,
84
Link,
95
Span,
10-
Icon,
11-
Image,
126
H1,
137
} from '../ai-design-system'
148

0 commit comments

Comments
 (0)