Skip to content

Instantly share code, notes, and snippets.

@dejanr
Last active November 4, 2024 12:12
Show Gist options
  • Save dejanr/a214229ac9ab99516a7eb8650b7c8d3a to your computer and use it in GitHub Desktop.
Save dejanr/a214229ac9ab99516a7eb8650b7c8d3a to your computer and use it in GitHub Desktop.
Moved all tasks to today's date.

TODOMVC

04.11. MON

  • Work on second brain
  • Prepare GPT's for AC Germany
  • Test 1
  • Test 2
@dejanr
Copy link
Author

dejanr commented Oct 25, 2024

GPT Setup:

===========================================

Instructions:

You are my task manager and assistant.

When I ask you to create a new task, you should save it in a GitHub Gist. When I inquire about my tasks, you should retrieve all tasks and provide a clear response. Your sole focus is managing and responding to requests about my tasks.

All tasks are stored in a bullet point list, and you need to parse and update the list whenever a task is modified.

For completed tasks, the format is:

  • Buy groceries

For task still in progress, the format is:

  • Buy groceries

Tasks should be organized by their creation date, with the latest date at the top. The format is:

25.10. FRI

  • Buy groceries after work

24.10. THU

  • Prepare GPT Demo

If you create a new task on a date that doesn't yet exist in the list, add a new date header and place the task under it.

When I request to move unfinished tasks from a previous day, remove those tasks from the old date's list and add them under the current date.

Always keep the todos groups ordered by date e.g. 24.10. is 24 of october, so it should be after 25.10.

When generating a graph of completed tasks for each day, use the created_at and updated_at fields to accurately count the tasks, and only include tasks marked as done.

At the top of gist there should be a title followed by empty line:

TODOMVC

===========================================
Action schema for github gist api:

openapi: 3.1.0
info:
  title: GitHub Gist To-Do API - Corrected Payload
  description: This API reads and updates a GitHub Gist with to-do items, with the correct structure for the PATCH request.
  version: 1.0.0
servers:
  - url: https://api.github.com
    description: GitHub API
paths:
  /gists/a214229ac9ab99516a7eb8650b7c8d3a:
    get:
      operationId: readTodosFromGist
      summary: Retrieve the to-do items from the specific GitHub Gist.
      x-openai-isConsequential: false
      responses:
        '200':
          description: Successfully retrieved the gist content.
          content:
            application/json:
              schema:
                type: object
                properties:
                  tasks:
                    type: array
                    items:
                      type: object
                      properties:
                        description:
                          type: string
                        status:
                          type: string
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
        '404':
          description: Gist not found.
    patch:
      operationId: updateGistWithNewParams
      summary: Update the to-do list in the gist with the correct description and JSON content.
      x-openai-isConsequential: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain:
                  type: string
                  example: "api.github.com"
                method:
                  type: string
                  example: "patch"
                path:
                  type: string
                  example: "/gists/a214229ac9ab99516a7eb8650b7c8d3a"
                is_consequential:
                  type: boolean
                  example: true
                description:
                  type: string
                  example: "Added an empty todo"
                files:
                  type: object
                  properties:
                    todomvc.md:
                      type: object
                      properties:
                        content:
                          type: string
                          example: |
                            {
                              "tasks": [
                                {
                                  "description": "Buy groceries",
                                  "status": "done",
                                  "created_at": "2024-10-23T14:30:00Z",
                                  "updated_at": "2024-10-23T18:30:00Z"
                                },
                                {
                                  "description": "Finish project report",
                                  "status": "done",
                                  "created_at": "2024-10-23T15:00:00Z",
                                  "updated_at": "2024-10-23T18:00:00Z"
                                },
                                {
                                  "description": "",
                                  "status": "pending",
                                  "created_at": "2024-10-23T19:00:00Z",
                                  "updated_at": "2024-10-23T19:00:00Z"
                                }
                              ]
                            }
      responses:
        '200':
          description: Successfully updated the gist with the new to-do items.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The unique ID of the gist.
                  html_url:
                    type: string
                    description: The URL to view the updated gist.
        '404':
          description: Gist not found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment