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
import "@johnlindquist/kit" | |
import { chromium } from "playwright" | |
let browser = await chromium.launch({ | |
headless: false, // Set to true if you do not need to see the browser | |
}) | |
let page = await browser.newPage() | |
await page.setViewportSize({ width: 1920, height: 1080 }) | |
await page.goto("https://scriptkit.com") |
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
// Name: Shortcuts Condition | |
import "@johnlindquist/kit" | |
let value = await arg( | |
{ | |
placeholder: `Type "one`, | |
shortcuts: [ | |
{ | |
name: "one", |
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
// Name: Dictate to Editor | |
import "@johnlindquist/kit" | |
import Deepgram from "@deepgram/sdk" | |
let DEEPGRAM_API_KEY = await env("DEEPGRAM_API_KEY") | |
let client = new Deepgram.Deepgram(DEEPGRAM_API_KEY) | |
let deepgram = client.transcription.live({ | |
punctuate: true, | |
}) |
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
import "@johnlindquist/kit" | |
// Name: Bulk Tip Draft Generator | |
// Author: Taylor Bell | |
// Description: | |
import escape from "escape-string-regexp" | |
import { ChatOpenAI } from "langchain/chat_models/openai" | |
import { ConversationChain } from "langchain/chains" | |
import { CallbackManager } from "langchain/callbacks" | |
import { |
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
// Name: Testing Loading | |
import "@johnlindquist/kit" | |
await arg({ | |
onInit: async () => { | |
setLoading(true) | |
}, | |
}) |
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
// Name: Angular Assitant | |
import "@johnlindquist/kit" | |
import OpenAI from "openai" | |
const openai = new OpenAI() | |
const assistant = await openai.beta.assistants.update("asst_vlzQCeB9XG83GqQ4369ad2dp", { | |
name: "Angular Tutor", | |
instructions: `You are an Angular Tutor. |
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
// Name: Actions Example | |
import { Action } from "@johnlindquist/kit" | |
/* | |
Using a "flag" determines where to do to custom logic: After the prompt or in the action | |
Also, "flags" are supported when running the script in the terminal with `--js` | |
*/ | |
let actions: Action[] = [ |
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
// Name: Testing Regenerate List | |
import "@johnlindquist/kit" | |
let choices = ["one", "two", "three"].map(name => ({ | |
name, | |
value: name, | |
id: uuid(), // This happens automatically behind the scenes if you don't do it manually | |
})) |
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
/* | |
# Script Hub | |
You can access this on your phone from: | |
http://kit.local | |
Run a script by going to http://kit.local/my-script-name | |
*/ |