* Agents streaming * Fix bug and lint * Add reasoning summaries to mobile agents * Add tool call approval UI for mobile agents * Add citations and annotations support for mobile agents Implements Phase 4 from the agents mobile plan: - WebSocket event handling for annotations control signal - CitationsList component displaying sources below agent responses - Collapsible sources section with source count - Each citation shows title, domain, and opens URL on tap - Citations persisted in post.props.annotations - Touch-optimized UI with 44pt minimum tap targets * Add stop and regenerate controls for mobile agents * Add tests * Fix tool approval buttons not updating after accept/reject - Remove optimistic WebSocket event approach that didn't work - Clear component streaming state on ENDED event to force switch to persisted data - Remove delays in streaming store cleanup (500ms and 100ms) - POST_EDITED event now properly updates UI for both accept and reject - Remove debug console.log statements - Fix ESLint issues (unused vars, nested callbacks, nested ternary) * Refactor agents code: remove unused client mixin, fix bugs, and simplify logic * Fixes * Add CLAUDE.md * Review feedback. * Review feedback inline functions * Learnings * Address review feedback: StyleSheet.create, parent mount checks, utils * Move to observables * Last style fix * Style tweaks
33 lines
816 B
TypeScript
33 lines
816 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
/**
|
|
* Agent post types
|
|
*/
|
|
export const AGENT_POST_TYPES = {
|
|
LLMBOT: 'custom_llmbot',
|
|
LLM_POSTBACK: 'custom_llm_postback',
|
|
} as const;
|
|
|
|
/**
|
|
* Minimum touch target size for accessibility (44pt per iOS HIG)
|
|
*/
|
|
export const TOUCH_TARGET_SIZE = 44;
|
|
|
|
/**
|
|
* WebSocket event name for agent post updates
|
|
*/
|
|
export const AGENT_WEBSOCKET_EVENT = 'custom_mattermost-ai_postupdate';
|
|
|
|
/**
|
|
* Control signal values from WebSocket messages
|
|
*/
|
|
export const CONTROL_SIGNALS = {
|
|
START: 'start',
|
|
END: 'end',
|
|
CANCEL: 'cancel',
|
|
REASONING_SUMMARY: 'reasoning_summary',
|
|
REASONING_SUMMARY_DONE: 'reasoning_summary_done',
|
|
TOOL_CALL: 'tool_call',
|
|
ANNOTATIONS: 'annotations',
|
|
} as const;
|