Fix calendar routing and user-local time context (#408)
* fix(chat): add user-local time context * fix(chat): route calendar follow-up phrasing * refactor(chat): log tool intent routing reasons * test(chat): align user time prompt shim --------- Co-authored-by: Alex Kenley <Alex.Kenley@threatvectorsecurity.com>
This commit is contained in:
@@ -1876,11 +1876,12 @@ function _wireAll(body) {
|
||||
}
|
||||
try {
|
||||
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone || '';
|
||||
const tzOffset = -new Date().getTimezoneOffset();
|
||||
const res = await fetch(`${API_BASE}/api/calendar/quick-parse`, {
|
||||
method: 'POST',
|
||||
credentials: 'same-origin',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ text, tz }),
|
||||
body: JSON.stringify({ text, tz, tz_offset: tzOffset }),
|
||||
});
|
||||
const data = await res.json().catch(() => ({}));
|
||||
if (!res.ok || !data.ok) {
|
||||
|
||||
Reference in New Issue
Block a user