Skip to content

Commit

Permalink
stripe integration etc. (#909) #913 #894
Browse files Browse the repository at this point in the history
* bulldozer mode

* release-app - speaker id, linkedin agent v2 in preview, loom free temporarily

* docs: add changelog for 0.16.0

* fix: clickable issue with status button on windows (#911)

Co-authored-by: tribhuwan-kumar <[email protected]>

* release-app fix windows status button cannot be clicked

* docs: add changelog for 0.16.1

* [migration] Add UPDATE and DELETE triggers for FTS tables (#906)

* feat: avoid double server running (#900)

* feat: avoid double server running

* chore: install `port_check`

* #894 (#898)

* fix

* fix worker

* fix no api key deepgram - and ui stuff

* fix

---------

Co-authored-by: GitHub Actions Bot <github-actions[bot]@users.noreply.github.com>
Co-authored-by: tribhuwan <[email protected]>
Co-authored-by: tribhuwan-kumar <[email protected]>
Co-authored-by: Yashashwini2003 <[email protected]>
Co-authored-by: ologbonowiwi <[email protected]>
  • Loading branch information
6 people authored Dec 12, 2024
1 parent 5e2f8f7 commit 7b9ae36
Show file tree
Hide file tree
Showing 26 changed files with 1,073 additions and 350 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,4 @@ onnxruntime-win-x64-gpu*/
# JavaScript stuff
node_modules/

# Cloudflare workers
.dev.vars

3 changes: 1 addition & 2 deletions pipes/pipe-keyword-notification/pipe.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// import { pipe, ContentItem } from "@screenpipe/js";
import { pipe, ContentItem } from "/Users/louisbeaumont/Documents/screen-pipe/screenpipe-js/main.ts";
import { pipe, ContentItem } from "@screenpipe/js";

async function monitorScreenAndNotify(): Promise<void> {
console.log("starting screen monitor");
Expand Down
60 changes: 32 additions & 28 deletions screenpipe-actions/ai-proxy/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,20 +225,10 @@ export default {
}
}

if (path === '/v1/transcribe' && request.method === 'POST') {
const formData = await request.formData();
const audioFile = formData.get('audio') as File;
const languages = formData.get('languages')?.toString().split(',') || [];

if (!audioFile) {
return new Response(JSON.stringify({ error: 'no audio file provided' }), {
status: 400,
headers: {
...corsHeaders,
'Content-Type': 'application/json',
},
});
}
if (path === '/v1/listen' && request.method === 'POST') {
// Get the raw body instead of form data
const audioBuffer = await request.arrayBuffer();
const languages = request.headers.get('detect_language')?.split(',') || [];

try {
const deepgramResponse = await fetch(
Expand All @@ -248,9 +238,9 @@ export default {
method: 'POST',
headers: {
Authorization: `Token ${env.DEEPGRAM_API_KEY}`,
'Content-Type': audioFile.type,
'Content-Type': 'audio/wav', // Set correct content type
},
body: await audioFile.arrayBuffer(),
body: audioBuffer,
}
);

Expand All @@ -268,13 +258,19 @@ export default {
});
} catch (error) {
console.error('Error in Deepgram request:', error);
return new Response(JSON.stringify({ error: error.message }), {
status: 500,
headers: {
...corsHeaders,
'Content-Type': 'application/json',
},
});
return new Response(
JSON.stringify({
error: error.message,
details: error.stack,
}),
{
status: 500,
headers: {
...corsHeaders,
'Content-Type': 'application/json',
},
}
);
}
}

Expand Down Expand Up @@ -310,15 +306,18 @@ wrangler dev
terminal 2
HOST=https://ai-proxy.i-f9f.workers.dev
HOST=http://localhost:8787
curl http://localhost:8787/test
curl $host/test
curl -X POST http://localhost:8787/v1/transcribe \
-F "audio=@./screenpipe-audio/test_data/poetic_kapil_gupta.wav" \
-F "languages=en,fr"
curl -X POST $HOST/v1/listen \
-H "Content-Type: audio/wav" \
-H "detect_language: en" \
--data-binary "@./screenpipe-audio/test_data/poetic_kapil_gupta.wav"
curl -X POST https://ai-proxy.i-f9f.workers.dev/v1/chat/completions \
curl -X POST $HOST/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
Expand All @@ -337,4 +336,9 @@ curl -X POST https://ai-proxy.i-f9f.workers.dev/v1/chat/completions \
}' | while read -r line; do
echo "$line" | sed 's/^data: //g' | jq -r '.choices[0].delta.content // empty' 2>/dev/null
done | tr -d '\n'
deployment
wrangler deploy
*/
Binary file modified screenpipe-app-tauri/bun.lockb
Binary file not shown.
7 changes: 1 addition & 6 deletions screenpipe-app-tauri/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ import {
} from "@/components/ui/tooltip";
import { Calendar } from "lucide-react";
import { useUser } from "@/lib/hooks/use-user";
import { AuthButton } from "./auth";

export default function Header() {
const [showInbox, setShowInbox] = useState(false);
Expand Down Expand Up @@ -154,7 +153,7 @@ export default function Header() {
</div>
<div className="flex space-x-4 absolute top-4 right-4">
<HealthStatus className="mt-3 cursor-pointer" />

<Button
variant="ghost"
size="icon"
Expand All @@ -179,10 +178,6 @@ export default function Header() {
<DropdownMenuLabel>account</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuGroup>
<DropdownMenuItem className="cursor-pointer p-0">
<AuthButton />
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem
className="cursor-pointer p-0"
onClick={(e) => {
Expand Down
8 changes: 5 additions & 3 deletions screenpipe-app-tauri/components/pipe-store-markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export function PipeStoreMarkdown({

return match ? (
<div className="relative group">

<CodeBlock
key={Math.random()}
language={(match && match[1]) || ""}
Expand All @@ -44,13 +43,16 @@ export function PipeStoreMarkdown({
</div>
) : (
<span className="relative group inline-block">
<code className="py-0.5 px-1 rounded-sm font-mono text-sm text-zinc-100" {...props}>
<code
className="py-0.5 px-1 rounded-sm font-mono text-sm text-grey-900"
{...props}
>
{content}
</code>
<Button
size="icon"
variant="ghost"
className="absolute -right-8 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity h-6 w-6"
className="absolute -right-3 -top-3 opacity-0 group-hover:opacity-100 transition-opacity h-6 w-6"
onClick={() => copyToClipboard(content)}
>
{isCopied ? (
Expand Down
Loading

0 comments on commit 7b9ae36

Please sign in to comment.