touchy upy
This commit is contained in:
@@ -27,6 +27,7 @@ router.get('/', async (req, res) => {
|
||||
router.post('/cluster', async (req, res) => {
|
||||
try {
|
||||
const notes = await loadNotes();
|
||||
console.log('notes returned from loadNotes', notes)
|
||||
const clusters = await clusterNotes(notes);
|
||||
res.json(clusters);
|
||||
} catch (err) {
|
||||
|
||||
@@ -34,7 +34,7 @@ ${notesJson}`;
|
||||
|
||||
export const clusterNotes = async (notes) => {
|
||||
const response = await client.messages.create({
|
||||
model: "claude-opus-4-6",
|
||||
model: "claude-sonnet-4-20250514",
|
||||
max_tokens: 4096,
|
||||
messages: [
|
||||
{ role: "user", content: buildPrompt(notes) },
|
||||
|
||||
@@ -49,7 +49,7 @@ const Stickies = () => {
|
||||
return (
|
||||
<div>
|
||||
<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 className="stickies-grid">
|
||||
{stickies?.map((sticky) => (
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
color: #6dd6f4;
|
||||
border: 1px solid rgb(92, 0, 91);
|
||||
width: 16rem;
|
||||
height: 2.5rem;
|
||||
height: 3rem;
|
||||
margin-top: 14px;
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
.stickies-container {
|
||||
margin: 36px 0px 36px 0px;
|
||||
}
|
||||
|
||||
.clusters-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -17,7 +18,7 @@
|
||||
}
|
||||
|
||||
.cluster-group {
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border: 1px solid #6dd6f4;
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user