Skip to content

Commit

Permalink
feat: beta double slash screenpipe action (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
m13v authored Oct 16, 2024
1 parent 8af96d2 commit 87be76d
Show file tree
Hide file tree
Showing 26 changed files with 3,049 additions and 6 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ members = [
"screenpipe-audio",
"screenpipe-server",
"screenpipe-integrations",
"screenpipe-actions",
]
exclude = [
"screenpipe-app-tauri/src-tauri",
Expand Down
23 changes: 23 additions & 0 deletions content/docs/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import nextra from 'nextra';
import withMDX from '@next/mdx';

const ContentSecurityPolicy = `
default-src 'self';
script-src 'self' 'unsafe-inline' 'unsafe-eval' https://entelligence.ai https://d345f39z3arwqc.cloudfront.net;
style-src 'self' 'unsafe-inline';
img-src * blob: data:;
media-src 'none';
connect-src *;
frame-src *;
`;

const config = withMDX({
extension: /\.mdx?$/,
});
Expand All @@ -16,6 +26,19 @@ const nextConfig = {
...config,
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdx'],
reactStrictMode: true,
async headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'Content-Security-Policy',
value: ContentSecurityPolicy.replace(/\n/g, ''),
},
],
},
];
},
...withNextra(),
};

Expand Down
23 changes: 22 additions & 1 deletion content/docs/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
import { Html, Head, Main, NextScript } from "next/document";
import Script from "next/script";

export default function Document() {
return (
<Html lang="en">
<Head />
<Head>
<Script
src="https://d345f39z3arwqc.cloudfront.net/entelligence-chat.js"
strategy="beforeInteractive"
type="module"
/>
</Head>
<body className="antialiased">
<Main />
<NextScript />
<Script id="entelligence-init" strategy="afterInteractive">
{`
if (window.EntelligenceChat) {
window.EntelligenceChat.init({
analyticsData: {
repoName: "screenpipe",
organization: "mediar-ai",
apiKey: "fdANNfYgwriDY0iADKXzgrJdNIilNdYLvWlWtvMJCoQ",
theme: "dark"
}
});
}
`}
</Script>
</body>
</Html>
);
Expand Down
3 changes: 3 additions & 0 deletions content/docs/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
:root {
--background: #ffffff;
--foreground: #171717;
--invert-logo: 1;
}

@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--foreground: #ededed;
--invert-logo: 0;
}
}

Expand Down Expand Up @@ -79,6 +81,7 @@ body {
--chart-3: 30 80% 55%;
--chart-4: 280 65% 60%;
--chart-5: 340 75% 55%;
--invert-logo: 0;
}
}

Expand Down
36 changes: 36 additions & 0 deletions screenpipe-actions/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[package]
name = "screenpipe-actions"
version.workspace = true
authors.workspace = true
description.workspace = true
repository.workspace = true
license.workspace = true
edition.workspace = true

[lib]
name = "screenpipe_actions"
path = "src/lib.rs"

[[bin]]
name = "screenpipe-actions"
path = "src/main.rs"

[dependencies]
anyhow = "1.0"
reqwest = { version = "0.11", features = ["json"] }
serde_json = "1.0"
xcap = "0.0.13"
base64 = "0.21" # Add this line
image = "0.25" # Add this line
tokio = { version = "1.26", features = ["full"] }
rdev = "0.5.3"
enigo = "0.1.3"
chrono = "0.4"
tempfile = "3.2"
url = "2.4.0"
once_cell = "1.18.0"
serde = { version = "1.0", features = ["derive"] }
log = "0.4"
env_logger = "0.10"
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
12 changes: 12 additions & 0 deletions screenpipe-actions/ai-proxy/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# http://editorconfig.org
root = true

[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_style = space
172 changes: 172 additions & 0 deletions screenpipe-actions/ai-proxy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# Logs

logs
_.log
npm-debug.log_
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)

report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json

# Runtime data

pids
_.pid
_.seed
\*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover

lib-cov

# Coverage directory used by tools like istanbul

coverage
\*.lcov

# nyc test coverage

.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)

.grunt

# Bower dependency directory (https://bower.io/)

bower_components

# node-waf configuration

.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)

build/Release

# Dependency directories

node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)

web_modules/

# TypeScript cache

\*.tsbuildinfo

# Optional npm cache directory

.npm

# Optional eslint cache

.eslintcache

# Optional stylelint cache

.stylelintcache

# Microbundle cache

.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history

.node_repl_history

# Output of 'npm pack'

\*.tgz

# Yarn Integrity file

.yarn-integrity

# dotenv environment variable files

.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)

.cache
.parcel-cache

# Next.js build output

.next
out

# Nuxt.js build / generate output

.nuxt
dist

# Gatsby files

.cache/

# Comment in the public line in if your project uses Gatsby and not Next.js

# https://nextjs.org/blog/next-9-1#public-directory-support

# public

# vuepress build output

.vuepress/dist

# vuepress v2.x temp and cache directory

.temp
.cache

# Docusaurus cache and generated files

.docusaurus

# Serverless directories

.serverless/

# FuseBox cache

.fusebox/

# DynamoDB Local files

.dynamodb/

# TernJS port file

.tern-port

# Stores VSCode versions used for testing VSCode extensions

.vscode-test

# yarn v2

.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.\*

# wrangler project

.dev.vars
.wrangler/
6 changes: 6 additions & 0 deletions screenpipe-actions/ai-proxy/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 140,
"singleQuote": true,
"semi": true,
"useTabs": true
}
Loading

0 comments on commit 87be76d

Please sign in to comment.