touchy upy

This commit is contained in:
KS Jannette
2026-02-12 06:20:29 -05:00
parent 814e008b21
commit 33f62522b7
5 changed files with 9 additions and 7 deletions

View File

@@ -27,6 +27,7 @@ router.get('/', async (req, res) => {
router.post('/cluster', async (req, res) => { router.post('/cluster', async (req, res) => {
try { try {
const notes = await loadNotes(); const notes = await loadNotes();
console.log('notes returned from loadNotes', notes)
const clusters = await clusterNotes(notes); const clusters = await clusterNotes(notes);
res.json(clusters); res.json(clusters);
} catch (err) { } catch (err) {

View File

@@ -34,11 +34,11 @@ ${notesJson}`;
export const clusterNotes = async (notes) => { export const clusterNotes = async (notes) => {
const response = await client.messages.create({ const response = await client.messages.create({
model: "claude-opus-4-6", model: "claude-sonnet-4-20250514",
max_tokens: 4096, max_tokens: 4096,
messages: [ messages: [
{ role: "user", content: buildPrompt(notes) }, { role: "user", content: buildPrompt(notes) },
], ],
}); });
const raw = response.content[0].text; const raw = response.content[0].text;

View File

@@ -49,7 +49,7 @@ const Stickies = () => {
return ( return (
<div> <div>
<div className="stickies-container"> <div className="stickies-container">
<Button onClick={handleCluster} isLoading={isPending} label="Group Notes By Theme" /> <Button onClick={handleCluster} isLoading={isPending} label="Group Stickies By Topic" />
</div> </div>
<div className="stickies-grid"> <div className="stickies-grid">
{stickies?.map((sticky) => ( {stickies?.map((sticky) => (

View File

@@ -4,6 +4,6 @@
color: #6dd6f4; color: #6dd6f4;
border: 1px solid rgb(92, 0, 91); border: 1px solid rgb(92, 0, 91);
width: 16rem; width: 16rem;
height: 2.5rem; height: 3rem;
margin-top: 14px; margin-top: 14px;
} }

View File

@@ -9,6 +9,7 @@
.stickies-container { .stickies-container {
margin: 36px 0px 36px 0px; margin: 36px 0px 36px 0px;
} }
.clusters-container { .clusters-container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -17,7 +18,7 @@
} }
.cluster-group { .cluster-group {
border: 1px solid rgba(255, 255, 255, 0.1); border: 1px solid #6dd6f4;
border-radius: 8px; border-radius: 8px;
padding: 16px; padding: 16px;
} }