fix #1072: calendar event creation — natural phrasing, ordinal dates, calendar alias#1077
Open
lokhor wants to merge 5 commits into
Open
fix #1072: calendar event creation — natural phrasing, ordinal dates, calendar alias#1077lokhor wants to merge 5 commits into
lokhor wants to merge 5 commits into
Conversation
…roller When Android TTS drops an onDone/onError callback (audio routing interference, engine glitch), completePlaybackIfDrained waits forever with non-empty utteranceIds and never emits SpeakingStopped, leaving the UI stuck on 'Speaking response...'. Add a 30-second safety-net timeout that fires after the final chunk is queued. If TTS callbacks haven't drained all utterances by then, the timeout force-cleans the playback state and emits SpeakingStopped. Cancels automatically on natural completion or explicit stop().
…, calendar alias
- QIR regex: new pattern catches "add X to [my] calendar" for any noun X
- Date extraction: parse ordinal dates ("9th of June", "June 9th") in extractCalendarHints
- Title extraction: add to/in/into to title lookaheads; add "something" to generic titles
- resolveDate: strip ordinal suffixes before DateTimeFormatter parsing
- load_skill: redirect "calendar" alias to run_intent instructions
- Error message: hint that calendar/alarm/SMS use run_intent
Debug APK readyCommit: Updated on each push. Removed when PR is merged or closed. |
- "add lunch to my calendar on June 9th at 2pm" — month-first ordinal - "add lunch to my calendar on 9th of June" — ordinal-first with "of"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1072
Problem
"add something to the calendar for the 9th of june" failed in three ways:
add X to [my] calendarwhere X isn't a known event nounload_skill("calendar")which doesn't exist — calendar is an intent withinrun_intentChanges
QuickIntentRouter.kt
add/create/schedule/put/book X to/in/on my calendarextractCalendarHintsto|in|intototitleFromVerb/titleFromForlookaheads to prevent greedy capture reaching end-of-string"something"toGENERIC_CALENDAR_TITLES— triggers NeedsSlot for title instead of using it as event titleNativeIntentHandler.kt
resolveDatestrips ordinal suffixes (st|nd|rd|th) beforeDateTimeFormatterparsingLoadSkillSkill.kt
load_skill("calendar")redirects torun_intentinstructionsrun_intentTests
:core:skills:test— 1481 tests pass |:core:skills:lint— cleanManual Test Scenarios
Run on device via
adb logcat -s KernelAI. All queries assume an S23 Ultra with Google Calendar installed.Happy path — natural phrasing with relative dates
create_calendar_eventcreate_calendar_eventcreate_calendar_eventcreate_calendar_eventHappy path — ordinal dates
create_calendar_eventcreate_calendar_eventcreate_calendar_eventNeedsSlot — missing title
NeedsSlot — missing date
Fallback — E4B (LLM) path
Calendar alias verification
load_skill("calendar")run_intentinstructions withcreate_calendar_eventEdge cases