Skip to content

Commit 87faa43

Browse files
committed
added show dialogue and pro-tip pop-up
1 parent 68e08a8 commit 87faa43

7 files changed

Lines changed: 266 additions & 118 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ Here are some of the many commands you can use with EchoTasks:
123123
- "Delete all overdue tasks"
124124
- "Clear my to-do list"
125125

126-
**Sorting**
126+
**Viewing & Sorting**
127127
- "Sort my list by due date"
128128
- "Sort by priority from high to low"
129+
- "Show me my grocery related tasks"
130+
- "Show me tasks to be done this week"

public/echotasks_preview.png

-155 KB
Loading

src/ai/flows/analyze-task-details.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type TaskInfo = {
2121
};
2222

2323
export type AnalyzeTaskDetailsOutput = {
24-
intent: 'ADD_TASK' | 'DELETE_TASK' | 'UPDATE_TASK' | 'MARK_COMPLETED' | 'DELETE_ALL' | 'DELETE_OVERDUE' | 'SORT_BY' | 'UNKNOWN';
24+
intent: 'ADD_TASK' | 'DELETE_TASK' | 'UPDATE_TASK' | 'MARK_COMPLETED' | 'DELETE_ALL' | 'DELETE_OVERDUE' | 'SORT_BY' | 'SHOW_TASKS' | 'UNKNOWN';
2525
tasks?: TaskInfo[]; // For ADD_TASK, now an array of objects
2626
filter?: { // For targeting tasks in DELETE, UPDATE, MARK_COMPLETED
2727
positions?: (number | 'last')[];
@@ -35,13 +35,14 @@ export type AnalyzeTaskDetailsOutput = {
3535
location?: string;
3636
};
3737
sortOption?: 'creationDate' | 'dueDate' | 'lastUpdated' | 'priorityHighToLow' | 'priorityLowToHigh'; // For SORT_BY
38+
searchQuery?: string; // For SHOW_TASKS
3839
};
3940

4041
const systemPrompt = `You are a sophisticated personal task assistant command parser. Your job is to analyze a transcribed voice command and determine the user's intent and the entities associated with that intent.
4142
4243
Your output MUST be a JSON object with the following structure:
4344
{
44-
"intent": "ADD_TASK" | "DELETE_TASK" | "UPDATE_TASK" | "MARK_COMPLETED" | "DELETE_ALL" | "DELETE_OVERDUE" | "SORT_BY" | "UNKNOWN",
45+
"intent": "ADD_TASK" | "DELETE_TASK" | "UPDATE_TASK" | "MARK_COMPLETED" | "DELETE_ALL" | "DELETE_OVERDUE" | "SORT_BY" | "SHOW_TASKS" | "UNKNOWN",
4546
"tasks": [{ "text": "string", "location": "string" | null }, ...],
4647
"filter": {
4748
"positions": ["last" | number],
@@ -54,7 +55,8 @@ Your output MUST be a JSON object with the following structure:
5455
"dueDate": "string, e.g., 'tomorrow', 'next Friday'",
5556
"location": "string"
5657
},
57-
"sortOption": "creationDate" | "dueDate" | "lastUpdated" | "priorityHighToLow" | "priorityLowToHigh"
58+
"sortOption": "creationDate" | "dueDate" | "lastUpdated" | "priorityHighToLow" | "priorityLowToHigh",
59+
"searchQuery": "string"
5860
}
5961
6062
- "intent": The primary action.
@@ -65,6 +67,7 @@ Your output MUST be a JSON object with the following structure:
6567
- "status": Filter by whether tasks are done or not.
6668
- "updates": For UPDATE_TASK, specifies what to change. The AI should extract what the new value should be.
6769
- "sortOption": For SORT_BY, extract the sorting criteria. Map user phrases to the allowed values. e.g., "due date" -> "dueDate", "priority" -> "priorityHighToLow".
70+
- "searchQuery": For SHOW_TASKS, this should be the keyword or phrase the user wants to filter by (e.g., "administrative", "grocery", "this week").
6871
6972
Examples:
7073
- Input: "Remind me to buy milk by this Friday and it's super important"
@@ -97,6 +100,12 @@ Examples:
97100
Output: { "intent": "SORT_BY", "sortOption": "dueDate" }
98101
- Input: "sort by priority high to low"
99102
Output: { "intent": "SORT_BY", "sortOption": "priorityHighToLow" }
103+
- Input: "show me all administrative tasks"
104+
Output: { "intent": "SHOW_TASKS", "searchQuery": "administrative" }
105+
- Input: "show me my grocery list"
106+
Output: { "intent": "SHOW_TASKS", "searchQuery": "grocery" }
107+
- Input: "what do I have to do this week"
108+
Output: { "intent": "SHOW_TASKS", "searchQuery": "this week" }
100109
- Input: "what's the weather"
101110
Output: { "intent": "UNKNOWN" }
102111

src/app/layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
import type {Metadata} from 'next';
23
import './globals.css';
34
import { Toaster } from "@/components/ui/toaster"
@@ -11,7 +12,7 @@ export const metadata: Metadata = {
1112
description: 'Manage your tasks entirely through voice commands. Fast, intuitive, and powered by AI.',
1213
images: [
1314
{
14-
url: '/echotasks_preview.png',
15+
url: 'https://studio--studio-6766374493-7e412.us-central1.hosted.app/echotasks_preview.png', // Use an absolute URL
1516
width: 1200,
1617
height: 630,
1718
alt: 'EchoTasks Application Preview',

0 commit comments

Comments
 (0)