Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BEARER_TOKEN="..."
OPENAI_API_KEY="..."
54 changes: 54 additions & 0 deletions .github/workflows/all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Create READMEs

permissions:
checks: write
contents: read
pull-requests: write

on:
pull_request_target:
types:
- opened
- synchronize

jobs:
deploy:
runs-on: ubuntu-latest
name: Build code and release
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: |
npm install -g pnpm
pnpm install --frozen-lockfile

- name: Generate packages list
run: node scripts/generate_actions.mjs
env:
BEARER_TOKEN: ${{ secrets.BEARER_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

- name: Create READMEs
run: node scripts/write_readme.mjs
env:
BEARER_TOKEN: ${{ secrets.BEARER_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

- name: Train model from READMEs
run: node scripts/train_model.mjs
env:
BEARER_TOKEN: ${{ secrets.BEARER_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

- name: Generate tutorials
run: node scripts/generate_tutorials.mjs
env:
BEARER_TOKEN: ${{ secrets.BEARER_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# build output
dist/

# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
25 changes: 25 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# build output
dist/

# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

public/**/*
src/content/**/*
loadedVectorStore/
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": false,
"printWidth": 180,
"singleQuote": true,
"plugins": ["prettier-plugin-astro"]
}
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
2 changes: 0 additions & 2 deletions README.md

This file was deleted.

11 changes: 11 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import vue from '@astrojs/vue'
import UnoCSS from '@unocss/astro'
import config from './configs.json'
import { defineConfig } from 'astro/config'

export default defineConfig({
compressHTML: true,
site: `https://${config.base_domain.prod}`,
image: { service: { entrypoint: 'astro/assets/services/sharp' } },
integrations: [vue(), UnoCSS({ injectReset: true })],
})
7 changes: 7 additions & 0 deletions configs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"base_domain": {
"prod": "capgo.app",
"development": "development.capgo.app",
"local": "localhost:3000"
}
}
1 change: 1 addition & 0 deletions loadedVectorStore/docstore.json

Large diffs are not rendered by default.

Binary file added loadedVectorStore/faiss.index
Binary file not shown.
29 changes: 29 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[build.environment]
NODE_VERSION = "19"

[build]
publish = "dist"
command = "pnpm run build"

[[redirects]]
from = '/.well-known/*'
status = 200
to = '/deepLink/:splat'

[[headers]]
for = "/.well-known/*"
[headers.values]
Content-Type = "application/json"

[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"

[dev]
command = "pnpm dev"
autoLaunch = false
targetPort = 3336
functionsPort = 3335
port = 3000
37 changes: 37 additions & 0 deletions openai-readmes/0Charliecat_capacitor-installed-via-altstore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# capacitor-installed-via-altstore

A simple plugin to know if Capacitor.js App was installed via AltStore

It checks URL Types which begins with `altstore-`. If found then `isAltStoreInstallation()` returns `{ isAltStored: true }`.

If you know of Properties which are added in by AltStore or AltServer in `Bundle.main.infoDictionary`, please make an issue!

## Install

```bash
npm install capacitor-installed-via-altstore
npx cap sync
```

## API

<docgen-index>

- [`isAltStoreInstallation()`](#isaltstoreinstallation)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### isAltStoreInstallation()

```typescript
isAltStoreInstallation() => Promise<{ isAltStored: boolean; }>
```

**Returns:** <code>Promise&lt;{ isAltStored: boolean; }&gt;</code>

---

</docgen-api>
143 changes: 143 additions & 0 deletions openai-readmes/0xn33t_capacitor-widgetsbridge-plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# capacitor-widgetsbridge-plugin

Capacitor plugin to interact with ios widgetkit

## Demo

![Screenshot1](./demo.gif)

## Install

```bash
npm install capacitor-widgetsbridge-plugin
npx cap sync
```

## API

<docgen-index>

- [`getItem(...)`](#getitem)
- [`setItem(...)`](#setitem)
- [`removeItem(...)`](#removeitem)
- [`reloadAllTimelines()`](#reloadalltimelines)
- [`reloadTimelines(...)`](#reloadtimelines)
- [`getCurrentConfigurations()`](#getcurrentconfigurations)
- [Interfaces](#interfaces)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### getItem(...)

```typescript
getItem(options: UserDefaultsOptions) => Promise<DataResults<any>>
```

Return the value from user’s defaults database associated with the specified key

| Param | Type |
| ------------- | ------------------------------------------------------------------- |
| **`options`** | <code><a href="#userdefaultsoptions">UserDefaultsOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#dataresults">DataResults</a>&lt;any&gt;&gt;</code>

---

### setItem(...)

```typescript
setItem(options: UserDefaultsOptions) => Promise<DataResults<boolean>>
```

Set the value to user’s defaults database associated with the specified key

| Param | Type |
| ------------- | ------------------------------------------------------------------- |
| **`options`** | <code><a href="#userdefaultsoptions">UserDefaultsOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#dataresults">DataResults</a>&lt;boolean&gt;&gt;</code>

---

### removeItem(...)

```typescript
removeItem(options: UserDefaultsOptions) => Promise<DataResults<boolean>>
```

Remove the value from user’s defaults database associated with the specified key

| Param | Type |
| ------------- | ------------------------------------------------------------------- |
| **`options`** | <code><a href="#userdefaultsoptions">UserDefaultsOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#dataresults">DataResults</a>&lt;boolean&gt;&gt;</code>

---

### reloadAllTimelines()

```typescript
reloadAllTimelines() => Promise<DataResults<boolean>>
```

Reloads the timelines for all configured widgets belonging to the containing app

**Returns:** <code>Promise&lt;<a href="#dataresults">DataResults</a>&lt;boolean&gt;&gt;</code>

---

### reloadTimelines(...)

```typescript
reloadTimelines(options: TimelinesOptions) => Promise<DataResults<boolean>>
```

Reloads the timelines for all widgets of a particular kind

| Param | Type |
| ------------- | ------------------------------------------------------------- |
| **`options`** | <code><a href="#timelinesoptions">TimelinesOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#dataresults">DataResults</a>&lt;boolean&gt;&gt;</code>

---

### getCurrentConfigurations()

```typescript
getCurrentConfigurations() => Promise<DataResults<any>>
```

Get current widget configurations

**Returns:** <code>Promise&lt;<a href="#dataresults">DataResults</a>&lt;any&gt;&gt;</code>

---

### Interfaces

#### DataResults

| Prop | Type | Description |
| ------------- | -------------- | --------------------------------------- |
| **`results`** | <code>T</code> | Holds response results from native code |

#### UserDefaultsOptions

| Prop | Type | Description |
| ----------- | ------------------- | --------------------------------------------------------------------- |
| **`key`** | <code>string</code> | The key whose value to retrieve from storage. |
| **`group`** | <code>string</code> | User defaults database name which holds and organizes key/value pairs |
| **`value`** | <code>string</code> | The value to set in storage with the associated key |

#### TimelinesOptions

| Prop | Type | Description |
| ------------ | ------------------- | -------------------------------------------------------------------------------------------------------------- |
| **`ofKind`** | <code>string</code> | A string that identifies the widget and matches the value you used when you created the widget’s configuration |

</docgen-api>
Loading