feat: support multiple event proposals in single AI response
- Change proposedChange to proposedChanges array in ChatMessage type - Add unique id and individual respondedAction to each ProposedEventChange - Implement arrow navigation UI for multiple proposals with "Event X von Y" counter - Add updateProposalResponse() method for per-proposal confirm/reject tracking - GPTAdapter now collects multiple tool call results into proposals array - Add RRULE documentation to system prompt (separate events for different times) - Fix RRULE parsing to strip RRULE: prefix if present - Add log summarization for large args (conversationHistory, existingEvents) - Keep proposedChanges logged in full for debugging AI issues
This commit is contained in:
@@ -27,7 +27,7 @@ const Header = (props: HeaderProps) => {
|
||||
{props.children}
|
||||
<Pressable
|
||||
onPress={handleLogout}
|
||||
className="absolute right-1 top-0 p-2"
|
||||
className="absolute left-1 bottom-0 p-2"
|
||||
hitSlop={8}
|
||||
>
|
||||
<Ionicons name="log-out-outline" size={24} color={currentTheme.primeFg} />
|
||||
|
||||
@@ -5,7 +5,6 @@ import { EventCardBase } from "./EventCardBase";
|
||||
|
||||
type ProposedEventCardProps = {
|
||||
proposedChange: ProposedEventChange;
|
||||
respondedAction?: "confirm" | "reject";
|
||||
onConfirm: () => void;
|
||||
onReject: () => void;
|
||||
};
|
||||
@@ -59,12 +58,12 @@ const ConfirmRejectButtons = ({
|
||||
|
||||
export const ProposedEventCard = ({
|
||||
proposedChange,
|
||||
respondedAction,
|
||||
onConfirm,
|
||||
onReject,
|
||||
}: ProposedEventCardProps) => {
|
||||
const event = proposedChange.event;
|
||||
const isDisabled = !!respondedAction;
|
||||
// respondedAction is now part of the proposedChange
|
||||
const isDisabled = !!proposedChange.respondedAction;
|
||||
|
||||
if (!event) {
|
||||
return null;
|
||||
@@ -82,7 +81,7 @@ export const ProposedEventCard = ({
|
||||
>
|
||||
<ConfirmRejectButtons
|
||||
isDisabled={isDisabled}
|
||||
respondedAction={respondedAction}
|
||||
respondedAction={proposedChange.respondedAction}
|
||||
onConfirm={onConfirm}
|
||||
onReject={onReject}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user