Skip to content

Commit 1053eb9

Browse files
committed
.
1 parent 71f8ead commit 1053eb9

File tree

3 files changed

+53
-4
lines changed

3 files changed

+53
-4
lines changed

.github/workflows/archive.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,15 @@ jobs:
2525
with:
2626
version: 10
2727

28+
- name: Cache playwright executables
29+
uses: actions/cache@v4
30+
with:
31+
path: /home/runner/.cache/
32+
2833
- name: Install dependencies
2934
run: |
3035
pnpm install
31-
pnpm exec playwright install --with-deps
36+
pnpm exec playwright install chromium
3237
3338
- name: Archive Gemini conversations
3439
id: archive

src/util.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export async function getGeminiIdsFromReadme(readmePath: string): Promise<Set<st
1010
const matches = readme.matchAll(/https:\/\/(?:gemini\.google\.com|g\.co\/gemini)\/share\/(?<id>[^\/\s]+)/g)
1111

1212
const ids = new Set<string>()
13-
for (const match of matches) ids.add(match.groups!.id!)
13+
for (const match of matches) ids.add(match.groups!["id"]!)
1414
return ids
1515
}
1616

@@ -71,8 +71,8 @@ export async function archiveConversation(browser: Browser, id: string) {
7171
.replaceAll(/@font-face\s*\{[^}]*\}/g, (fontFaceRule: string) => {
7272
const fontFamilyMatch = fontFaceRule.match(/font-family:\s*(?<quote>['"]?)(?<fontFamily>[^'"]+)\k<quote>;/)
7373

74-
if (fontFamilyMatch && fontFamilyMatch.groups?.fontFamily) {
75-
const fontFamily = fontFamilyMatch.groups?.fontFamily.trim()
74+
if (fontFamilyMatch && fontFamilyMatch.groups?.["fontFamily"]) {
75+
const fontFamily = fontFamilyMatch.groups?.["fontFamily"].trim()
7676
if (fontFamily === "Google Symbols") return fontFaceRule
7777
if (pageData.content.includes(`class="katex"`) && fontFamily.startsWith("KaTeX")) return fontFaceRule
7878
}

tsconfig.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
// Visit https://aka.ms/tsconfig to read more about this file
3+
"compilerOptions": {
4+
// File Layout
5+
// "rootDir": "./src",
6+
// "outDir": "./dist",
7+
8+
// Environment Settings
9+
// See also https://aka.ms/tsconfig/module
10+
"module": "nodenext",
11+
"target": "esnext",
12+
// "types": [],
13+
// For nodejs:
14+
// "lib": ["esnext"],
15+
// "types": ["node"],
16+
// and npm install -D @types/node
17+
18+
// Other Outputs
19+
"sourceMap": true,
20+
"declaration": true,
21+
"declarationMap": true,
22+
23+
// Stricter Typechecking Options
24+
"noUncheckedIndexedAccess": true,
25+
"exactOptionalPropertyTypes": true,
26+
27+
// Style Options
28+
"noImplicitReturns": true,
29+
"noImplicitOverride": true,
30+
"noUnusedLocals": true,
31+
"noUnusedParameters": true,
32+
"noFallthroughCasesInSwitch": true,
33+
"noPropertyAccessFromIndexSignature": true,
34+
35+
// Recommended Options
36+
"strict": true,
37+
"jsx": "react-jsx",
38+
"verbatimModuleSyntax": true,
39+
"isolatedModules": true,
40+
"noUncheckedSideEffectImports": true,
41+
"moduleDetection": "force",
42+
"skipLibCheck": true,
43+
}
44+
}

0 commit comments

Comments
 (0)