Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

July launch PR #55

Closed
wants to merge 90 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
f3d7f89
Add Extension Template
CodeTorso Jun 2, 2024
8ecbde0
Implemented Highlight in Extension
CodeTorso Jun 3, 2024
7ceaddf
Implement extension
CodeTorso Jun 4, 2024
004c952
Add Dynamic Island
CodeTorso Jun 8, 2024
99659df
before color edits
CodeTorso Jun 9, 2024
743976d
Add Memories, Canvas, Editor
CodeTorso Jun 9, 2024
04b6add
AI code refactored
CodeTorso Jun 11, 2024
a341908
Adding keyboard shortcuts, responsive design that 99% don't need but …
CodeTorso Jun 11, 2024
5ab5d8f
minor changes and improvements
Dhravya Jun 12, 2024
aabdef4
some documentation for backend
Dhravya Jun 12, 2024
03c9fb0
full screen mode implemented
CodeTorso Jun 12, 2024
1f6d419
Icons now in our website integrated
CodeTorso Jun 12, 2024
1619488
Merge pull request #56 from CodeTorso/codetorso
CodeTorso Jun 12, 2024
ef682da
smoothening animatio
CodeTorso Jun 12, 2024
53f0856
Merge pull request #57 from CodeTorso/codetorso
CodeTorso Jun 12, 2024
1c1d14b
Merge pull request #58 from CodeTorso/v2
CodeTorso Jun 12, 2024
d376dd1
Revert "Add code for extension"
CodeTorso Jun 13, 2024
778ddec
fix backend
Dhravya Jun 13, 2024
a711d1b
added zod validation to embedQuery
Dhravya Jun 13, 2024
f59cede
Merge branch 'codetorso' of https://github.com/Dhravya/supermemory in…
Dhravya Jun 13, 2024
5569aa2
chat UI and markdown renderer ⚡
Dhravya Jun 13, 2024
a20163d
make header and menu fixed instead of absolute to prevent movement on…
Dhravya Jun 13, 2024
d5a8117
Merge pull request #59 from Dhravya/revert-58-v2
CodeTorso Jun 13, 2024
0fb924d
small stuff
Dhravya Jun 13, 2024
80a2c6b
omg
Dhravya Jun 14, 2024
ac3b161
Merge branch 'codetorso' of https://github.com/Dhravya/supermemory in…
Dhravya Jun 14, 2024
9f0fb14
[MIGRATION REQUIRED]Data fetchers and other server actions, spaces cr…
Dhravya Jun 15, 2024
84455ad
getspaces and other features integrated with the backend
Dhravya Jun 15, 2024
e755aa7
chore: Remove unused variables and dependencies
kartikk-k Jun 15, 2024
8ecfc65
Merge branch 'codetorso' of https://github.com/Dhravya/supermemory in…
kartikk-k Jun 15, 2024
4daee14
added way to save content and vectorize them. also refactored code an…
Dhravya Jun 16, 2024
e0b83ad
Update Setup Guide
CodeTorso Jun 16, 2024
39ba654
improve: /home page
kartikk-k Jun 16, 2024
4cd16ec
ui update: /chat
kartikk-k Jun 16, 2024
375609d
form to add content [PENDING LOADING STATE]
Dhravya Jun 16, 2024
a68d7f0
Merge branch 'codetorso' of https://github.com/Dhravya/supermemory in…
Dhravya Jun 16, 2024
5cb5bcd
fixed a bug
Dhravya Jun 16, 2024
2ffb054
proper URLs
Dhravya Jun 16, 2024
a9f5ebc
include metadata in response, add type to metadata
Dhravya Jun 16, 2024
c5b31e5
use a dev vectorize database to prevent pollution
Dhravya Jun 16, 2024
62c4d88
add: animated query input
kartikk-k Jun 16, 2024
9588768
added image support in the backend
Dhravya Jun 16, 2024
a87030b
OCR try
Dhravya Jun 16, 2024
0f3d5c4
store full info
Dhravya Jun 16, 2024
a4c835e
added sources to the response
Dhravya Jun 17, 2024
76c48cc
add number of chunks to the respnose and only show unique values
Dhravya Jun 17, 2024
be71655
gpt-4o is already a default model, so no error-checking required
CodeTorso Jun 17, 2024
88289d1
add js docs
CodeTorso Jun 17, 2024
5af20f7
Merge pull request #70 from CodeTorso/codetorso
Dhravya Jun 17, 2024
957f131
vector duplication no longer an issue. support for querying with mult…
Dhravya Jun 18, 2024
066833a
include all selected spaces in the fetch call to backend
Dhravya Jun 18, 2024
6aa8dc4
Merge pull request #71 from Dhravya/vector-deduplication
Dhravya Jun 18, 2024
242cbf7
Add Editor Endpoint
CodeTorso Jun 18, 2024
251b6b4
codetorso pull remote
CodeTorso Jun 18, 2024
6cfb533
EditorAI integrated! (1/4)
CodeTorso Jun 18, 2024
c5361aa
Create Embeddings for Canvas
CodeTorso Jun 18, 2024
09af2ec
darkmode by default
Dhravya Jun 18, 2024
62054df
added logic to handle justification properly
Dhravya Jun 18, 2024
c704541
fix: Cta component background color
MaheshtheDev Jun 19, 2024
898cb32
Merge pull request #75 from MaheshtheDev/fix/cta-bg
Dhravya Jun 19, 2024
770eb99
Drag and Drop in Canvas!
CodeTorso Jun 19, 2024
28a257f
Add Drag & Drop code
CodeTorso Jun 19, 2024
f28f566
Improve code, failed attempt at Streaming text
CodeTorso Jun 19, 2024
a7cca29
Another Failed Attempt at streaming
CodeTorso Jun 19, 2024
e4c6c1a
works
Dhravya Jun 20, 2024
074ea24
added multi-turn conversations
Dhravya Jun 20, 2024
af90b96
Merge branch 'codetorso' into kartik
CodeTorso Jun 20, 2024
2b2ec6f
Merge pull request #76 from Dhravya/kartik
CodeTorso Jun 20, 2024
a5f384e
Fine tuning canvas (1/2)
CodeTorso Jun 22, 2024
2ac315c
improve canvas drag and drop make sidepanel work
CodeTorso Jun 22, 2024
becb306
Unreadable Canvas code, jk 😂
CodeTorso Jun 22, 2024
3a97c2a
delete packagelock
CodeTorso Jun 22, 2024
a2f8a27
addeed chathistory functionality
Dhravya Jun 22, 2024
02d7f08
merged code
Dhravya Jun 22, 2024
5140a4d
deleted chatpage
Dhravya Jun 22, 2024
445acf7
cleanup
Dhravya Jun 22, 2024
47e7528
Merge pull request #79 from Dhravya/chathistory
Dhravya Jun 23, 2024
4b6a932
fix interactive canvas (2/2)
CodeTorso Jun 23, 2024
4bdc819
centered layout
CodeTorso Jun 23, 2024
86e2f2a
clean code+ user canvas (1/2)
CodeTorso Jun 23, 2024
9df975e
added indexes and stuff
Dhravya Jun 23, 2024
557c7b8
Add Extension (1/2)
CodeTorso Jun 23, 2024
9f751ba
feat: vector lookup and chat is twice as fast now
Dhravya Jun 23, 2024
0d069e8
Merge branch 'codetorso' of https://github.com/Dhravya/supermemory in…
Dhravya Jun 23, 2024
fff8b7a
added backend route for telegram bot and others to be possible
Dhravya Jun 23, 2024
51dd5ec
made and documented the telegram bot (HYPE)
Dhravya Jun 24, 2024
75585fd
some important housekeeping, crushed all build errors
Dhravya Jun 24, 2024
4c86f1e
ts-ignore at the right place
Dhravya Jun 24, 2024
cd304b3
reduced db calls here, we don't need that complex logic, can just do …
Dhravya Jun 24, 2024
4581b2c
Merge pull request #80 from Dhravya/telegram-bot
Dhravya Jun 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions apps/an-extension/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# an-extension

> This project was bootstrapped using the Extension.js React-TypeScript template.

## Scripts Available

In the project directory, you can run:

### npm dev

```
// Runs the app in the development mode.
// Will open a new browser instance with your extension loaded.
// The page will reload when you make changes.
npm dev
```

### npm start

```
// Runs the app in the production mode.
// Will open a new browser instance with your extension loaded.
// This is how your browser extension will work once published.
npm start
```

### npm build

```
// Builds the app for production.
// Bundles your browser extension in production mode for the target browser.
npm run build
```

## Learn More

You can learn more in the [Extension.js](https://extension.js.org) documentation.
25 changes: 25 additions & 0 deletions apps/an-extension/background.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
chrome.runtime.onInstalled.addListener(function () {
let context = 'selection';
let title = "Supermemory - Save Highlight";
chrome.contextMenus.create({
title: title,
contexts: ['selection'],
id: context,
});
});

chrome.contextMenus.onClicked.addListener(function (info, tab) {
if (info.menuItemId === 'selection') {
// you can add a link to a cf worker or whatever u want
// fetch("", {
// method: "POST",
// headers: { "Content-Type": "application/json" },
// body: JSON.stringify({
// data: info.selectionText,
// }),
// });

//so you first save it and then send the reponse to the screen
chrome.tabs.sendMessage(tab?.id || 1, info.selectionText);
}
});
45 changes: 45 additions & 0 deletions apps/an-extension/content/ContentApp.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import React, { useEffect } from "react";

export default function ContentApp() {
const [text, setText] = React.useState("");
const [hover, setHover] = React.useState(false);

useEffect(() => {
const messageListener = (message: any) => {
setText(message);
setTimeout(() => setText(""), 2000);
};
chrome.runtime.onMessage.addListener(messageListener);

document.addEventListener('mousemove', (e)=> {
const percentageX = (e.clientX / window.innerWidth) * 100;
const percentageY = (e.clientY / window.innerHeight) * 100;

if (percentageX > 75 && percentageY > 75){
setHover(true)
} else {
setHover(false)
}
})
return () => {
chrome.runtime.onMessage.removeListener(messageListener);
};
}, []);

return (
<div className="pointer-events-none flex justify-end items-end h-screen w-full absolute z-99999">
<div className="h-[30vh] absolute flex justify-end items-center">
<div
className={`${hover && "opacity-100 "} transition bg-red-600 opacity-0 h-12 w-12 `}
></div>
</div>

<div
className={`mx-4 my-2 flex flex-col gap-3 rounded-3xl bg-gray-900 text-xl py-4 px-6 overflow-hidden min-w-[20vw] min-h-24 max-w-96 max-h-40 ${text ? "translate-y-0 opacity-100" : "translate-y-[15%] opacity-0"} transition`}
>
<h2 className="text-2xl font-extrabold text-white">Saved!</h2>
<h2 className="text-lg font-medium text-white">{text}</h2>
</div>
</div>
);
}
3 changes: 3 additions & 0 deletions apps/an-extension/content/base.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
9 changes: 9 additions & 0 deletions apps/an-extension/content/content.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#extension-root {
pointer-events: none;
position: fixed;
top: 0;
left: 0;
height: 100vh;
width: 100%;
z-index: 999999;
}
15 changes: 15 additions & 0 deletions apps/an-extension/content/content.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import ReactDOM from 'react-dom/client'
import ContentApp from './ContentApp'
import('./base.css')
import('./content.css')

setTimeout(initial, 1000)

function initial() {
const rootDiv = document.createElement('div')
rootDiv.id = 'extension-root'
document.body.appendChild(rootDiv)

const root = ReactDOM.createRoot(rootDiv)
root.render(<><ContentApp /></>)
}
9 changes: 9 additions & 0 deletions apps/an-extension/extension-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Required Extension.js types for TypeScript projects.
// This file auto-generated and should not be excluded.
// If you need extra types, consider creating a new *.d.ts and
// referencing it in the "include" array in your tsconfig.json file.
// See https://www.typescriptlang.org/tsconfig#include for info.
/// <reference types="@extension-create/develop/dist/types/index.d.ts" />

// Polyfill types for browser.* APIs.
/// <reference types="@extension-create/develop/dist/types/polyfill.d.ts" />
11 changes: 11 additions & 0 deletions apps/an-extension/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>God Bless Vanilla JavaScript!!!</title>
</head>
<body>
<h1>hello World! Follow <a href="https://x.com/supermemoryai">@supermemoryai</a></h1>
</body>
</html>
29 changes: 29 additions & 0 deletions apps/an-extension/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "Supermemory.ai-Extension",
"description": "Uses the chrome.contextMenus API to customize the context menu.",
"version": "0.1",
"permissions": [
"contextMenus"
],
"manifest_version": 3,
"action": {
"default_popup": "index.html"
},
"background": {
"service_worker": "./background.ts"
},
"content_scripts": [
{
"matches": [
"<all_urls>"
],
"js": [
"./content/content.tsx"
]
}
],
"icons": {
"16": "public/icon/logo(16).png",
"48": "public/icon/logo(48).png"
}
}
20 changes: 20 additions & 0 deletions apps/an-extension/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"devDependencies": {
"@types/react": "^18.0.9",
"@types/react-dom": "^18.0.5",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"tailwindcss": "^3.4.1",
"typescript": "5.3.3",
"extension": "latest"
},
"scripts": {
"dev": "extension dev",
"start": "extension start",
"build": "extension build"
},
"dependencies": {},
"name": "an-extension",
"private": true,
"version": "0.0.0"
}
6 changes: 6 additions & 0 deletions apps/an-extension/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
}
Binary file added apps/an-extension/public/icon/logo(16).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/an-extension/public/icon/logo(48).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions apps/an-extension/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['**/*.html', '**/*.tsx'],
theme: {
extend: {}
},
plugins: []
}
module.exports = require("@repo/tailwind-config/tailwind.config");
19 changes: 19 additions & 0 deletions apps/an-extension/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "@repo/typescript-config/nextjs.json",
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": false,
"jsx": "react-jsx",
"lib": ["dom", "dom.iterable", "esnext"],
"moduleResolution": "node",
"module": "esnext",
"resolveJsonModule": true,
"strict": true,
"target": "esnext"
},
"include": ["./"],
"exclude": ["node_modules", "dist"]
}
Loading