Let's update the task extraction logic to use Grok:
Here's how to set up your Grok API key locally:
.env.local file in the root of your project:touch .env.local.env.local file:GROK_API_KEY=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.env.local is in your .gitignore file to prevent committing sensitive information 1:.env.local
*.local.vscode/settings.json to get environment variable autocompletion:{
"files.associations": {
".env.local": "env"
}
}Important notes:
.env.local file should NEVER be committed to your repository 1.env.local is in your .gitignore file 1To verify the environment variable is working:
npm run dev.env.local file is in the root directoryGROK_API_KEYRemember: Environment variables in .env.local are only available in development. For production, you'll need to set them up in your hosting platform 2.
i got Connection Error
Failed to fetch todos. Please check your Screenpipe connection.
Try Again Failed to load resource: the server responded with a status of 500 (Internal Server Error)
app-index.tsx:25 screenpipe api error: Object
window.console.error @ app-index.tsx:25
app-index.tsx:25 error querying screenpipe: Error: http error! status: 500
at v.queryScreenpipe (index.js:1:7208)
at async eval (use-todo-extractor.tsx:29:23)
window.console.error @ app-index.tsx:25
app-index.tsx:25 Error fetching todos: Error: http error! status: 500
at v.queryScreenpipe (index.js:1:7208)
at async eval (use-todo-extractor.tsx:29:23)