mattermost-mobile/app/constants/database.ts
Christopher Speller 6000e69886
Agents "RHS" view (#9318)
* Add agents RHS functionality for mobile

Implements a dedicated agents interface accessible from the home screen, featuring:
- Agent chat screen with bot selector and message input
- Thread list screen showing all agent conversations
- Remote actions for fetching bots and threads from plugin API
- Navigation between chat, threads, and individual conversations
- Integration with plus menu for easy access

Follows similar pattern to playbooks with modal screens and navigation helpers.

* Fix icon name for agents menu item

Change robot-happy-outline to robot-happy to resolve PropType validation error.

* Add agents button to sidebar and fix agent chat issues

- Add AgentsButton component to channel list sidebar below Drafts
- Fix thread navigation to use fetchAndSwitchToThread instead of switchToChannelById
- Replace custom TextInput with PostDraft component in agent_chat
- Fix icon name from message-reply-text-outline to reply-outline
- Add missing i18n translations for agents UI

* Implement automatic navigation to thread after sending agent message

* Implement bot selector bottom sheet with avatars. Replace click-and-cycle behavior with a proper bottom sheet menu showing all available agents with their profile pictures. Add bot avatar display to the dropdown button for better visual identification.

* Top bar design modifications.

* Add intro graphic and text

* Fix autocomplete not working

* Tweak styles and icons.

* Remove unused

* Add version/enabled check

* Remove excessive agent button

* Style fixes

* Use non-blocking then() for onPostCreated callback in send message hook

* Add unit tests for agents product components and actions

* Review feedback, offline support

* I18n

* Tests

* Address PR review feedback: deletion handling, UI fixes, schema docs

* Remove unnecessary deleteNotPresent flag from agents handlers

* Fix agents archived channel, empty data guard, and stale relative time

* Add smoke test for AgentChat and extend ToolCard test coverage

* Fix test quality issues: remove useless tests, strengthen assertions

* Address PR review: remove barrel file, add version comment

* Mock reanimated in CitationsList test to fix CI failure

* Fix CitationsList tests after always-mounted animation change

* Address PR review: typography, Pressable, FormattedText, schema bump, and cleanup

* Apply CLAUDE.md patterns across agents codebase: Pressable, typography, FormattedText, logDebug

* Fix schema test to expect version 19
2026-03-16 09:48:32 -07:00

113 lines
3.4 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import keyMirror from '@utils/key_mirror';
export const MM_TABLES = {
APP: {
INFO: 'Info',
GLOBAL: 'Global',
SERVERS: 'Servers',
},
SERVER: {
CATEGORY: 'Category',
CATEGORY_CHANNEL: 'CategoryChannel',
CHANNEL: 'Channel',
CHANNEL_BOOKMARK: 'ChannelBookmark',
CHANNEL_INFO: 'ChannelInfo',
CHANNEL_MEMBERSHIP: 'ChannelMembership',
CONFIG: 'Config',
CUSTOM_EMOJI: 'CustomEmoji',
CUSTOM_PROFILE_FIELD: 'CustomProfileField',
CUSTOM_PROFILE_ATTRIBUTE: 'CustomProfileAttribute',
DRAFT: 'Draft',
FILE: 'File',
GROUP: 'Group',
GROUP_CHANNEL: 'GroupChannel',
GROUP_MEMBERSHIP: 'GroupMembership',
GROUP_TEAM: 'GroupTeam',
MY_CHANNEL: 'MyChannel',
MY_CHANNEL_SETTINGS: 'MyChannelSettings',
MY_TEAM: 'MyTeam',
POST: 'Post',
POSTS_IN_CHANNEL: 'PostsInChannel',
POSTS_IN_THREAD: 'PostsInThread',
PREFERENCE: 'Preference',
REACTION: 'Reaction',
ROLE: 'Role',
SCHEDULED_POST: 'ScheduledPost',
SYSTEM: 'System',
TEAM: 'Team',
TEAM_CHANNEL_HISTORY: 'TeamChannelHistory',
TEAM_MEMBERSHIP: 'TeamMembership',
TEAM_SEARCH_HISTORY: 'TeamSearchHistory',
THREAD: 'Thread',
THREADS_IN_TEAM: 'ThreadsInTeam',
THREAD_PARTICIPANT: 'ThreadParticipant',
TEAM_THREADS_SYNC: 'TeamThreadsSync',
USER: 'User',
},
};
export const MIGRATION_EVENTS = keyMirror({
MIGRATION_ERROR: null,
MIGRATION_STARTED: null,
MIGRATION_SUCCESS: null,
});
export const SYSTEM_IDENTIFIERS = {
CURRENT_CHANNEL_ID: 'currentChannelId',
LAST_UNREAD_CHANNEL_ID: 'lastUnreadChannelId',
CURRENT_TEAM_ID: 'currentTeamId',
CURRENT_USER_ID: 'currentUserId',
DATA_RETENTION_POLICIES: 'dataRetentionPolicies',
EXPANDED_LINKS: 'expandedLinks',
GRANULAR_DATA_RETENTION_POLICIES: 'granularDataRetentionPolicies',
LAST_DATA_RETENTION_RUN: 'lastDataRetentionRun',
GLOBAL_THREADS_TAB: 'globalThreadsTab',
LAST_DISMISSED_BANNER: 'lastDismissedBanner',
LAST_SERVER_VERSION_CHECK: 'LastServerVersionCheck',
LICENSE: 'license',
ONLY_UNREADS: 'onlyUnreads',
PUSH_VERIFICATION_STATUS: 'pushVerificationStatus',
RECENT_CUSTOM_STATUS: 'recentCustomStatus',
RECENT_MENTIONS: 'recentMentions',
RECENT_REACTIONS: 'recentReactions',
SESSION_EXPIRATION: 'sessionExpiration',
TEAM_HISTORY: 'teamHistory',
WEBSOCKET: 'WebSocket',
PLAYBOOKS_VERSION: 'playbooks_version',
AGENTS_VERSION: 'agents_version',
LAST_BOR_POST_CLEANUP_RUN: 'lastBoRPostCleanupRun',
};
export const GLOBAL_IDENTIFIERS = {
DEVICE_TOKEN: 'deviceToken',
DONT_ASK_FOR_REVIEW: 'dontAskForReview',
FIRST_LAUNCH: 'firstLaunch',
LAST_ASK_FOR_REVIEW: 'lastAskForReview',
ONBOARDING: 'onboarding',
LAST_VIEWED_CHANNEL: 'lastViewedChannel',
LAST_VIEWED_THREAD: 'lastViewedThread',
PUSH_DISABLED_ACK: 'pushDisabledAck',
CACHE_MIGRATION: 'cacheMigration',
};
export enum OperationType {
CREATE = 'CREATE',
UPDATE = 'UPDATE',
DELETE = 'DELETE',
}
// The only two types of databases in the app
export enum DatabaseType {
DEFAULT,
SERVER,
}
export default {
GLOBAL_IDENTIFIERS,
MM_TABLES,
MIGRATION_EVENTS,
SYSTEM_IDENTIFIERS,
};