-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remind contexts and apply to time refs #82
base: main
Are you sure you want to change the base?
Remind contexts and apply to time refs #82
Conversation
Problem: Sometimes, context of a time reference can be spread over one sentence, several different sentences or even several different messages. Solution: Parse contexts alone, remind them and apply to context-free time references when encountered; track a context during thread evolution.
b390131
to
ec5c7ca
Compare
2dcf198
to
461920b
Compare
Problem: when a user writes "10am-11am UTC ...", context is not shared between times, and second time can be skipped because every time should go after a space. Solution: Parse time references that are grouped via hyphen, slash, "and", "or" sharing their context: date ref, location ref, am/pm.
461920b
to
148360b
Compare
Problem: Sometimes, context of a time reference can be spread over one sentence, several different sentences or even several different messages. Solution: Parse contexts alone, remind them and apply to context-free time references when encountered; track a context during thread evolution.
ec5c7ca
to
9d9bfde
Compare
Problem: Sometimes, context of a time reference can be spread over one sentence, several different sentences or even several different messages. Solution: Parse contexts alone, remind them and apply to context-free time references when encountered; track a context during thread evolution.
9d9bfde
to
e32b0bf
Compare
@@ -92,8 +92,12 @@ run opts = do | |||
managed $ withTzCacheDefault defaultMessageInfoCachingTime | |||
bsReportEntries <- | |||
managed $ withTzCacheDefault cCacheReportDialog | |||
-- auto-acknowledge received messages | |||
|
|||
let defaultConversationStateCachingTime = hour 12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ideally should be in the config
Cache.insert getMessageThreadId (msgId, newState) convStateCache | ||
asks bsMessageCache >>= Cache.insert msgId (timeRefs, conversationState) | ||
|
||
withNonEmptyTimeRefs timeRefs $ \neTimeRefs -> do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that we will eventually rewrite this logic using some abstracting technique and write some tests, it gets a bit tricky as more internal state is kept.
Problem: Sometimes, context of a time reference can be spread over one sentence, several different sentences or even several different messages. Solution: Parse contexts alone, remind them and apply to context-free time references when encountered; track a context during thread evolution.
e32b0bf
to
aa1eb6f
Compare
e3cc9f3
to
fff943d
Compare
369fbef
to
4756b9b
Compare
Description
Problem: Sometimes, context of a time reference can be spread over one sentence, several different sentences or even several different messages.
Solution: Parse contexts alone, remind them and apply to context-free time references when encountered; track a context during thread evolution.
Related issue(s)
Part of #16
✅ Checklist for your Pull Request
Related changes (conditional)
Tests
silently reappearing again.
Documentation
Stylistic guide (mandatory)