diff --git a/refact-agent/gui/generated/documents.ts b/refact-agent/gui/generated/documents.ts index 199a4c760..1fd943af9 100644 --- a/refact-agent/gui/generated/documents.ts +++ b/refact-agent/gui/generated/documents.ts @@ -407,6 +407,30 @@ export type FPersonaPatch = { persona_setup?: InputMaybe; }; +export type FPersonaScheduleListOutput = { + __typename?: 'FPersonaScheduleListOutput'; + scheds: Array; + ws_timezone: Scalars['String']['output']; +}; + +export type FPersonaScheduleOutput = { + __typename?: 'FPersonaScheduleOutput'; + sched_first_question: Scalars['String']['output']; + sched_id: Scalars['String']['output']; + sched_last_run_ts: Scalars['Float']['output']; + sched_persona_id: Scalars['String']['output']; + sched_rrule: Scalars['String']['output']; + sched_start_ts: Scalars['Float']['output']; +}; + +export type FPersonaScheduleUpsertInput = { + sched_first_question: Scalars['String']['input']; + sched_id?: InputMaybe; + sched_persona_id: Scalars['String']['input']; + sched_rrule: Scalars['String']['input']; + sched_start_ts: Scalars['Float']['input']; +}; + export type FPersonaSubs = { __typename?: 'FPersonaSubs'; news_action: Scalars['String']['output']; @@ -654,6 +678,8 @@ export type Mutation = { persona_create: FPersonaOutput; persona_delete: Scalars['Boolean']['output']; persona_patch: FPersonaOutput; + persona_schedule_delete: FPersonaScheduleOutput; + persona_schedule_upsert: FPersonaScheduleOutput; reset_password_execute: Scalars['Boolean']['output']; reset_password_start: Scalars['Boolean']['output']; session_open: Scalars['String']['output']; @@ -922,6 +948,16 @@ export type MutationPersona_PatchArgs = { }; +export type MutationPersona_Schedule_DeleteArgs = { + sched_id: Scalars['String']['input']; +}; + + +export type MutationPersona_Schedule_UpsertArgs = { + input: FPersonaScheduleUpsertInput; +}; + + export type MutationReset_Password_ExecuteArgs = { new_password: Scalars['String']['input']; token: Scalars['String']['input']; @@ -981,6 +1017,7 @@ export type MutationThread_Mass_Group_PatchArgs = { export type MutationThread_Messages_Create_MultipleArgs = { delete_negative?: InputMaybe>; input: FThreadMultipleMessagesInput; + mission_accomplished_adv_worker?: InputMaybe; }; @@ -1078,6 +1115,7 @@ export type Query = { persona_get: FPersonaOutput; persona_list: Array; persona_opened_in_ui: FPersonaOutput; + persona_schedule_list: FPersonaScheduleListOutput; query_basic_stuff: BasicStuffResult; reset_password_token_info: PasswordResetTokenInfo; stats_query: Array; @@ -1237,6 +1275,11 @@ export type QueryPersona_Opened_In_UiArgs = { }; +export type QueryPersona_Schedule_ListArgs = { + persona_id: Scalars['String']['input']; +}; + + export type QueryQuery_Basic_StuffArgs = { want_invitations?: Scalars['Boolean']['input']; }; @@ -1460,7 +1503,7 @@ export type MessagesSubscriptionSubscriptionVariables = Exact<{ }>; -export type MessagesSubscriptionSubscription = { __typename?: 'Subscription', comprehensive_thread_subs: { __typename?: 'FThreadMessageSubs', news_action: string, news_payload_id: string, news_payload_thread_message?: { __typename?: 'FThreadMessageOutput', ft_app_specific?: any | null, ftm_belongs_to_ft_id: string, ftm_alt: number, ftm_num: number, ftm_prev_alt: number, ftm_role: string, ftm_content?: any | null, ftm_tool_calls?: any | null, ftm_call_id: string, ftm_usage?: any | null, ftm_created_ts: number, ftm_user_preferences?: any | null } | null, stream_delta?: { __typename?: 'FThreadDelta', ftm_role: string, ftm_content: any } | null, news_payload_thread?: { __typename?: 'FThreadOutput', located_fgroup_id: string, ft_id: string, ft_need_user: number, ft_need_assistant: number, ft_fexp_id: string, ft_confirmation_request?: any | null, ft_confirmation_response?: any | null, ft_title: string } | null } }; +export type MessagesSubscriptionSubscription = { __typename?: 'Subscription', comprehensive_thread_subs: { __typename?: 'FThreadMessageSubs', news_action: string, news_payload_id: string, news_payload_thread_message?: { __typename?: 'FThreadMessageOutput', ft_app_specific?: any | null, ftm_belongs_to_ft_id: string, ftm_alt: number, ftm_num: number, ftm_prev_alt: number, ftm_role: string, ftm_content?: any | null, ftm_tool_calls?: any | null, ftm_call_id: string, ftm_usage?: any | null, ftm_created_ts: number, ftm_user_preferences?: any | null } | null, stream_delta?: { __typename?: 'FThreadDelta', ftm_role: string, ftm_content: any } | null, news_payload_thread?: { __typename?: 'FThreadOutput', located_fgroup_id: string, ft_id: string, ft_need_user: number, ft_need_assistant: number, ft_fexp_id: string, ft_confirmation_request?: any | null, ft_confirmation_response?: any | null, ft_title: string, ft_toolset?: any | null } | null } }; export type MessageCreateMultipleMutationVariables = Exact<{ input: FThreadMultipleMessagesInput; @@ -1531,7 +1574,7 @@ export type WorkspaceTreeSubscription = { __typename?: 'Subscription', tree_subs export const ThreadsPageSubsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"ThreadsPageSubs"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"located_fgroup_id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"threads_in_group"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"located_fgroup_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"located_fgroup_id"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"news_action"}},{"kind":"Field","name":{"kind":"Name","value":"news_payload_id"}},{"kind":"Field","name":{"kind":"Name","value":"news_payload"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"owner_fuser_id"}},{"kind":"Field","name":{"kind":"Name","value":"owner_shared"}},{"kind":"Field","name":{"kind":"Name","value":"ft_id"}},{"kind":"Field","name":{"kind":"Name","value":"ft_title"}},{"kind":"Field","name":{"kind":"Name","value":"ft_error"}},{"kind":"Field","name":{"kind":"Name","value":"ft_updated_ts"}},{"kind":"Field","name":{"kind":"Name","value":"ft_locked_by"}},{"kind":"Field","name":{"kind":"Name","value":"ft_need_assistant"}},{"kind":"Field","name":{"kind":"Name","value":"ft_need_tool_calls"}},{"kind":"Field","name":{"kind":"Name","value":"ft_archived_ts"}},{"kind":"Field","name":{"kind":"Name","value":"ft_created_ts"}}]}}]}}]}}]} as unknown as DocumentNode; export const DeleteThreadDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteThread"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"thread_delete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}]}]}}]} as unknown as DocumentNode; export const CreateThreadDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateThread"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"FThreadInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"thread_create"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ft_id"}}]}}]}}]} as unknown as DocumentNode; -export const MessagesSubscriptionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"MessagesSubscription"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"ft_id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"want_deltas"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"comprehensive_thread_subs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ft_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"ft_id"}}},{"kind":"Argument","name":{"kind":"Name","value":"want_deltas"},"value":{"kind":"Variable","name":{"kind":"Name","value":"want_deltas"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"news_action"}},{"kind":"Field","name":{"kind":"Name","value":"news_payload_id"}},{"kind":"Field","name":{"kind":"Name","value":"news_payload_thread_message"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ft_app_specific"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_belongs_to_ft_id"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_alt"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_num"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_prev_alt"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_role"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_content"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_tool_calls"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_call_id"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_usage"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_created_ts"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_user_preferences"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stream_delta"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ftm_role"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"news_payload_thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"located_fgroup_id"}},{"kind":"Field","name":{"kind":"Name","value":"ft_id"}},{"kind":"Field","name":{"kind":"Name","value":"ft_need_user"}},{"kind":"Field","name":{"kind":"Name","value":"ft_need_assistant"}},{"kind":"Field","name":{"kind":"Name","value":"ft_fexp_id"}},{"kind":"Field","name":{"kind":"Name","value":"ft_confirmation_request"}},{"kind":"Field","name":{"kind":"Name","value":"ft_confirmation_response"}},{"kind":"Field","name":{"kind":"Name","value":"ft_title"}}]}}]}}]}}]} as unknown as DocumentNode; +export const MessagesSubscriptionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"MessagesSubscription"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"ft_id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"want_deltas"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"comprehensive_thread_subs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ft_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"ft_id"}}},{"kind":"Argument","name":{"kind":"Name","value":"want_deltas"},"value":{"kind":"Variable","name":{"kind":"Name","value":"want_deltas"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"news_action"}},{"kind":"Field","name":{"kind":"Name","value":"news_payload_id"}},{"kind":"Field","name":{"kind":"Name","value":"news_payload_thread_message"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ft_app_specific"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_belongs_to_ft_id"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_alt"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_num"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_prev_alt"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_role"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_content"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_tool_calls"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_call_id"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_usage"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_created_ts"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_user_preferences"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stream_delta"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ftm_role"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"news_payload_thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"located_fgroup_id"}},{"kind":"Field","name":{"kind":"Name","value":"ft_id"}},{"kind":"Field","name":{"kind":"Name","value":"ft_need_user"}},{"kind":"Field","name":{"kind":"Name","value":"ft_need_assistant"}},{"kind":"Field","name":{"kind":"Name","value":"ft_fexp_id"}},{"kind":"Field","name":{"kind":"Name","value":"ft_confirmation_request"}},{"kind":"Field","name":{"kind":"Name","value":"ft_confirmation_response"}},{"kind":"Field","name":{"kind":"Name","value":"ft_title"}},{"kind":"Field","name":{"kind":"Name","value":"ft_toolset"}}]}}]}}]}}]} as unknown as DocumentNode; export const MessageCreateMultipleDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"MessageCreateMultiple"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"FThreadMultipleMessagesInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"thread_messages_create_multiple"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]} as unknown as DocumentNode; export const ThreadPatchDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ThreadPatch"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"message"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"thread_patch"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"Argument","name":{"kind":"Name","value":"patch"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"ft_error"},"value":{"kind":"Variable","name":{"kind":"Name","value":"message"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ft_id"}}]}}]}}]} as unknown as DocumentNode; export const ExpertsForGroupDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ExpertsForGroup"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"located_fgroup_id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"experts_effective_list"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"located_fgroup_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"located_fgroup_id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fexp_id"}},{"kind":"Field","name":{"kind":"Name","value":"fexp_name"}}]}}]}}]} as unknown as DocumentNode; @@ -1690,6 +1733,16 @@ export function FPersonaPatchSchema(): z.ZodObject> { }) } +export function FPersonaScheduleUpsertInputSchema(): z.ZodObject> { + return z.object({ + sched_first_question: z.string(), + sched_id: z.string().nullish(), + sched_persona_id: z.string(), + sched_rrule: z.string(), + sched_start_ts: z.number() + }) +} + export function FStatsAddInputSchema(): z.ZodObject> { return z.object({ fgroup_id: z.string().default(""), diff --git a/refact-agent/gui/generated/graphql/gql.ts b/refact-agent/gui/generated/graphql/gql.ts index ba4653472..b2028b478 100644 --- a/refact-agent/gui/generated/graphql/gql.ts +++ b/refact-agent/gui/generated/graphql/gql.ts @@ -14,10 +14,10 @@ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document- * Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size */ type Documents = { - "subscription ThreadsPageSubs($located_fgroup_id: String!, $limit: Int!) {\n threads_in_group(located_fgroup_id: $located_fgroup_id, limit: $limit) {\n news_action\n news_payload_id\n news_payload {\n owner_fuser_id\n owner_shared\n ft_id\n ft_title\n ft_error\n ft_updated_ts\n ft_locked_by\n ft_need_assistant\n ft_need_tool_calls\n ft_archived_ts\n ft_created_ts\n }\n }\n}\n\nmutation DeleteThread($id: String!) {\n thread_delete(id: $id)\n}\n\nmutation CreateThread($input: FThreadInput!) {\n thread_create(input: $input) {\n ft_id\n }\n}\n\nsubscription MessagesSubscription($ft_id: String!, $want_deltas: Boolean!) {\n comprehensive_thread_subs(ft_id: $ft_id, want_deltas: $want_deltas) {\n news_action\n news_payload_id\n news_payload_thread_message {\n ft_app_specific\n ftm_belongs_to_ft_id\n ftm_alt\n ftm_num\n ftm_prev_alt\n ftm_role\n ftm_content\n ftm_tool_calls\n ftm_call_id\n ftm_usage\n ftm_created_ts\n ftm_user_preferences\n }\n stream_delta {\n ftm_role\n ftm_content\n }\n news_payload_thread {\n located_fgroup_id\n ft_id\n ft_need_user\n ft_need_assistant\n ft_fexp_id\n ft_confirmation_request\n ft_confirmation_response\n ft_title\n }\n }\n}\n\nmutation MessageCreateMultiple($input: FThreadMultipleMessagesInput!) {\n thread_messages_create_multiple(input: $input)\n}\n\nmutation ThreadPatch($id: String!, $message: String!) {\n thread_patch(id: $id, patch: {ft_error: $message}) {\n ft_id\n }\n}\n\nquery ExpertsForGroup($located_fgroup_id: String!) {\n experts_effective_list(located_fgroup_id: $located_fgroup_id) {\n fexp_id\n fexp_name\n }\n}\n\nquery ModelsForExpert($fexp_id: String!, $inside_fgroup_id: String!) {\n expert_choice_consequences(\n fexp_id: $fexp_id\n inside_fgroup_id: $inside_fgroup_id\n ) {\n models {\n provm_name\n provm_caps\n }\n }\n}\n\nquery ToolsForGroup($located_fgroup_id: String!) {\n cloud_tools_list(located_fgroup_id: $located_fgroup_id, include_offline: false) {\n ctool_confirmed_exists_ts\n ctool_description\n ctool_id\n ctool_name\n ctool_parameters\n located_fgroup_id\n owner_fuser_id\n }\n}\n\nmutation ThreadConfirmationResponse($confirmation_response: String = \"\", $ft_id: String = \"\") {\n thread_set_confirmation_response(\n ft_id: $ft_id\n confirmation_response: $confirmation_response\n )\n}\n\nquery BasicStuff {\n query_basic_stuff {\n fuser_id\n my_own_ws_id\n workspaces {\n ws_id\n ws_owner_fuser_id\n ws_root_group_id\n root_group_name\n have_coins_exactly\n have_coins_enough\n have_admin\n }\n }\n}\n\nmutation CreateWorkSpaceGroup($fgroup_name: String!, $fgroup_parent_id: String!) {\n group_create(\n input: {fgroup_name: $fgroup_name, fgroup_parent_id: $fgroup_parent_id}\n ) {\n fgroup_id\n fgroup_name\n ws_id\n fgroup_parent_id\n fgroup_created_ts\n }\n}\n\nsubscription WorkspaceTree($ws_id: String!) {\n tree_subscription(ws_id: $ws_id) {\n treeupd_action\n treeupd_id\n treeupd_path\n treeupd_type\n treeupd_title\n }\n}": typeof types.ThreadsPageSubsDocument, + "subscription ThreadsPageSubs($located_fgroup_id: String!, $limit: Int!) {\n threads_in_group(located_fgroup_id: $located_fgroup_id, limit: $limit) {\n news_action\n news_payload_id\n news_payload {\n owner_fuser_id\n owner_shared\n ft_id\n ft_title\n ft_error\n ft_updated_ts\n ft_locked_by\n ft_need_assistant\n ft_need_tool_calls\n ft_archived_ts\n ft_created_ts\n }\n }\n}\n\nmutation DeleteThread($id: String!) {\n thread_delete(id: $id)\n}\n\nmutation CreateThread($input: FThreadInput!) {\n thread_create(input: $input) {\n ft_id\n }\n}\n\nsubscription MessagesSubscription($ft_id: String!, $want_deltas: Boolean!) {\n comprehensive_thread_subs(ft_id: $ft_id, want_deltas: $want_deltas) {\n news_action\n news_payload_id\n news_payload_thread_message {\n ft_app_specific\n ftm_belongs_to_ft_id\n ftm_alt\n ftm_num\n ftm_prev_alt\n ftm_role\n ftm_content\n ftm_tool_calls\n ftm_call_id\n ftm_usage\n ftm_created_ts\n ftm_user_preferences\n }\n stream_delta {\n ftm_role\n ftm_content\n }\n news_payload_thread {\n located_fgroup_id\n ft_id\n ft_need_user\n ft_need_assistant\n ft_fexp_id\n ft_confirmation_request\n ft_confirmation_response\n ft_title\n ft_toolset\n }\n }\n}\n\nmutation MessageCreateMultiple($input: FThreadMultipleMessagesInput!) {\n thread_messages_create_multiple(input: $input)\n}\n\nmutation ThreadPatch($id: String!, $message: String!) {\n thread_patch(id: $id, patch: {ft_error: $message}) {\n ft_id\n }\n}\n\nquery ExpertsForGroup($located_fgroup_id: String!) {\n experts_effective_list(located_fgroup_id: $located_fgroup_id) {\n fexp_id\n fexp_name\n }\n}\n\nquery ModelsForExpert($fexp_id: String!, $inside_fgroup_id: String!) {\n expert_choice_consequences(\n fexp_id: $fexp_id\n inside_fgroup_id: $inside_fgroup_id\n ) {\n models {\n provm_name\n provm_caps\n }\n }\n}\n\nquery ToolsForGroup($located_fgroup_id: String!) {\n cloud_tools_list(located_fgroup_id: $located_fgroup_id, include_offline: false) {\n ctool_confirmed_exists_ts\n ctool_description\n ctool_id\n ctool_name\n ctool_parameters\n located_fgroup_id\n owner_fuser_id\n }\n}\n\nmutation ThreadConfirmationResponse($confirmation_response: String = \"\", $ft_id: String = \"\") {\n thread_set_confirmation_response(\n ft_id: $ft_id\n confirmation_response: $confirmation_response\n )\n}\n\nquery BasicStuff {\n query_basic_stuff {\n fuser_id\n my_own_ws_id\n workspaces {\n ws_id\n ws_owner_fuser_id\n ws_root_group_id\n root_group_name\n have_coins_exactly\n have_coins_enough\n have_admin\n }\n }\n}\n\nmutation CreateWorkSpaceGroup($fgroup_name: String!, $fgroup_parent_id: String!) {\n group_create(\n input: {fgroup_name: $fgroup_name, fgroup_parent_id: $fgroup_parent_id}\n ) {\n fgroup_id\n fgroup_name\n ws_id\n fgroup_parent_id\n fgroup_created_ts\n }\n}\n\nsubscription WorkspaceTree($ws_id: String!) {\n tree_subscription(ws_id: $ws_id) {\n treeupd_action\n treeupd_id\n treeupd_path\n treeupd_type\n treeupd_title\n }\n}": typeof types.ThreadsPageSubsDocument, }; const documents: Documents = { - "subscription ThreadsPageSubs($located_fgroup_id: String!, $limit: Int!) {\n threads_in_group(located_fgroup_id: $located_fgroup_id, limit: $limit) {\n news_action\n news_payload_id\n news_payload {\n owner_fuser_id\n owner_shared\n ft_id\n ft_title\n ft_error\n ft_updated_ts\n ft_locked_by\n ft_need_assistant\n ft_need_tool_calls\n ft_archived_ts\n ft_created_ts\n }\n }\n}\n\nmutation DeleteThread($id: String!) {\n thread_delete(id: $id)\n}\n\nmutation CreateThread($input: FThreadInput!) {\n thread_create(input: $input) {\n ft_id\n }\n}\n\nsubscription MessagesSubscription($ft_id: String!, $want_deltas: Boolean!) {\n comprehensive_thread_subs(ft_id: $ft_id, want_deltas: $want_deltas) {\n news_action\n news_payload_id\n news_payload_thread_message {\n ft_app_specific\n ftm_belongs_to_ft_id\n ftm_alt\n ftm_num\n ftm_prev_alt\n ftm_role\n ftm_content\n ftm_tool_calls\n ftm_call_id\n ftm_usage\n ftm_created_ts\n ftm_user_preferences\n }\n stream_delta {\n ftm_role\n ftm_content\n }\n news_payload_thread {\n located_fgroup_id\n ft_id\n ft_need_user\n ft_need_assistant\n ft_fexp_id\n ft_confirmation_request\n ft_confirmation_response\n ft_title\n }\n }\n}\n\nmutation MessageCreateMultiple($input: FThreadMultipleMessagesInput!) {\n thread_messages_create_multiple(input: $input)\n}\n\nmutation ThreadPatch($id: String!, $message: String!) {\n thread_patch(id: $id, patch: {ft_error: $message}) {\n ft_id\n }\n}\n\nquery ExpertsForGroup($located_fgroup_id: String!) {\n experts_effective_list(located_fgroup_id: $located_fgroup_id) {\n fexp_id\n fexp_name\n }\n}\n\nquery ModelsForExpert($fexp_id: String!, $inside_fgroup_id: String!) {\n expert_choice_consequences(\n fexp_id: $fexp_id\n inside_fgroup_id: $inside_fgroup_id\n ) {\n models {\n provm_name\n provm_caps\n }\n }\n}\n\nquery ToolsForGroup($located_fgroup_id: String!) {\n cloud_tools_list(located_fgroup_id: $located_fgroup_id, include_offline: false) {\n ctool_confirmed_exists_ts\n ctool_description\n ctool_id\n ctool_name\n ctool_parameters\n located_fgroup_id\n owner_fuser_id\n }\n}\n\nmutation ThreadConfirmationResponse($confirmation_response: String = \"\", $ft_id: String = \"\") {\n thread_set_confirmation_response(\n ft_id: $ft_id\n confirmation_response: $confirmation_response\n )\n}\n\nquery BasicStuff {\n query_basic_stuff {\n fuser_id\n my_own_ws_id\n workspaces {\n ws_id\n ws_owner_fuser_id\n ws_root_group_id\n root_group_name\n have_coins_exactly\n have_coins_enough\n have_admin\n }\n }\n}\n\nmutation CreateWorkSpaceGroup($fgroup_name: String!, $fgroup_parent_id: String!) {\n group_create(\n input: {fgroup_name: $fgroup_name, fgroup_parent_id: $fgroup_parent_id}\n ) {\n fgroup_id\n fgroup_name\n ws_id\n fgroup_parent_id\n fgroup_created_ts\n }\n}\n\nsubscription WorkspaceTree($ws_id: String!) {\n tree_subscription(ws_id: $ws_id) {\n treeupd_action\n treeupd_id\n treeupd_path\n treeupd_type\n treeupd_title\n }\n}": types.ThreadsPageSubsDocument, + "subscription ThreadsPageSubs($located_fgroup_id: String!, $limit: Int!) {\n threads_in_group(located_fgroup_id: $located_fgroup_id, limit: $limit) {\n news_action\n news_payload_id\n news_payload {\n owner_fuser_id\n owner_shared\n ft_id\n ft_title\n ft_error\n ft_updated_ts\n ft_locked_by\n ft_need_assistant\n ft_need_tool_calls\n ft_archived_ts\n ft_created_ts\n }\n }\n}\n\nmutation DeleteThread($id: String!) {\n thread_delete(id: $id)\n}\n\nmutation CreateThread($input: FThreadInput!) {\n thread_create(input: $input) {\n ft_id\n }\n}\n\nsubscription MessagesSubscription($ft_id: String!, $want_deltas: Boolean!) {\n comprehensive_thread_subs(ft_id: $ft_id, want_deltas: $want_deltas) {\n news_action\n news_payload_id\n news_payload_thread_message {\n ft_app_specific\n ftm_belongs_to_ft_id\n ftm_alt\n ftm_num\n ftm_prev_alt\n ftm_role\n ftm_content\n ftm_tool_calls\n ftm_call_id\n ftm_usage\n ftm_created_ts\n ftm_user_preferences\n }\n stream_delta {\n ftm_role\n ftm_content\n }\n news_payload_thread {\n located_fgroup_id\n ft_id\n ft_need_user\n ft_need_assistant\n ft_fexp_id\n ft_confirmation_request\n ft_confirmation_response\n ft_title\n ft_toolset\n }\n }\n}\n\nmutation MessageCreateMultiple($input: FThreadMultipleMessagesInput!) {\n thread_messages_create_multiple(input: $input)\n}\n\nmutation ThreadPatch($id: String!, $message: String!) {\n thread_patch(id: $id, patch: {ft_error: $message}) {\n ft_id\n }\n}\n\nquery ExpertsForGroup($located_fgroup_id: String!) {\n experts_effective_list(located_fgroup_id: $located_fgroup_id) {\n fexp_id\n fexp_name\n }\n}\n\nquery ModelsForExpert($fexp_id: String!, $inside_fgroup_id: String!) {\n expert_choice_consequences(\n fexp_id: $fexp_id\n inside_fgroup_id: $inside_fgroup_id\n ) {\n models {\n provm_name\n provm_caps\n }\n }\n}\n\nquery ToolsForGroup($located_fgroup_id: String!) {\n cloud_tools_list(located_fgroup_id: $located_fgroup_id, include_offline: false) {\n ctool_confirmed_exists_ts\n ctool_description\n ctool_id\n ctool_name\n ctool_parameters\n located_fgroup_id\n owner_fuser_id\n }\n}\n\nmutation ThreadConfirmationResponse($confirmation_response: String = \"\", $ft_id: String = \"\") {\n thread_set_confirmation_response(\n ft_id: $ft_id\n confirmation_response: $confirmation_response\n )\n}\n\nquery BasicStuff {\n query_basic_stuff {\n fuser_id\n my_own_ws_id\n workspaces {\n ws_id\n ws_owner_fuser_id\n ws_root_group_id\n root_group_name\n have_coins_exactly\n have_coins_enough\n have_admin\n }\n }\n}\n\nmutation CreateWorkSpaceGroup($fgroup_name: String!, $fgroup_parent_id: String!) {\n group_create(\n input: {fgroup_name: $fgroup_name, fgroup_parent_id: $fgroup_parent_id}\n ) {\n fgroup_id\n fgroup_name\n ws_id\n fgroup_parent_id\n fgroup_created_ts\n }\n}\n\nsubscription WorkspaceTree($ws_id: String!) {\n tree_subscription(ws_id: $ws_id) {\n treeupd_action\n treeupd_id\n treeupd_path\n treeupd_type\n treeupd_title\n }\n}": types.ThreadsPageSubsDocument, }; /** @@ -37,7 +37,7 @@ export function graphql(source: string): unknown; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "subscription ThreadsPageSubs($located_fgroup_id: String!, $limit: Int!) {\n threads_in_group(located_fgroup_id: $located_fgroup_id, limit: $limit) {\n news_action\n news_payload_id\n news_payload {\n owner_fuser_id\n owner_shared\n ft_id\n ft_title\n ft_error\n ft_updated_ts\n ft_locked_by\n ft_need_assistant\n ft_need_tool_calls\n ft_archived_ts\n ft_created_ts\n }\n }\n}\n\nmutation DeleteThread($id: String!) {\n thread_delete(id: $id)\n}\n\nmutation CreateThread($input: FThreadInput!) {\n thread_create(input: $input) {\n ft_id\n }\n}\n\nsubscription MessagesSubscription($ft_id: String!, $want_deltas: Boolean!) {\n comprehensive_thread_subs(ft_id: $ft_id, want_deltas: $want_deltas) {\n news_action\n news_payload_id\n news_payload_thread_message {\n ft_app_specific\n ftm_belongs_to_ft_id\n ftm_alt\n ftm_num\n ftm_prev_alt\n ftm_role\n ftm_content\n ftm_tool_calls\n ftm_call_id\n ftm_usage\n ftm_created_ts\n ftm_user_preferences\n }\n stream_delta {\n ftm_role\n ftm_content\n }\n news_payload_thread {\n located_fgroup_id\n ft_id\n ft_need_user\n ft_need_assistant\n ft_fexp_id\n ft_confirmation_request\n ft_confirmation_response\n ft_title\n }\n }\n}\n\nmutation MessageCreateMultiple($input: FThreadMultipleMessagesInput!) {\n thread_messages_create_multiple(input: $input)\n}\n\nmutation ThreadPatch($id: String!, $message: String!) {\n thread_patch(id: $id, patch: {ft_error: $message}) {\n ft_id\n }\n}\n\nquery ExpertsForGroup($located_fgroup_id: String!) {\n experts_effective_list(located_fgroup_id: $located_fgroup_id) {\n fexp_id\n fexp_name\n }\n}\n\nquery ModelsForExpert($fexp_id: String!, $inside_fgroup_id: String!) {\n expert_choice_consequences(\n fexp_id: $fexp_id\n inside_fgroup_id: $inside_fgroup_id\n ) {\n models {\n provm_name\n provm_caps\n }\n }\n}\n\nquery ToolsForGroup($located_fgroup_id: String!) {\n cloud_tools_list(located_fgroup_id: $located_fgroup_id, include_offline: false) {\n ctool_confirmed_exists_ts\n ctool_description\n ctool_id\n ctool_name\n ctool_parameters\n located_fgroup_id\n owner_fuser_id\n }\n}\n\nmutation ThreadConfirmationResponse($confirmation_response: String = \"\", $ft_id: String = \"\") {\n thread_set_confirmation_response(\n ft_id: $ft_id\n confirmation_response: $confirmation_response\n )\n}\n\nquery BasicStuff {\n query_basic_stuff {\n fuser_id\n my_own_ws_id\n workspaces {\n ws_id\n ws_owner_fuser_id\n ws_root_group_id\n root_group_name\n have_coins_exactly\n have_coins_enough\n have_admin\n }\n }\n}\n\nmutation CreateWorkSpaceGroup($fgroup_name: String!, $fgroup_parent_id: String!) {\n group_create(\n input: {fgroup_name: $fgroup_name, fgroup_parent_id: $fgroup_parent_id}\n ) {\n fgroup_id\n fgroup_name\n ws_id\n fgroup_parent_id\n fgroup_created_ts\n }\n}\n\nsubscription WorkspaceTree($ws_id: String!) {\n tree_subscription(ws_id: $ws_id) {\n treeupd_action\n treeupd_id\n treeupd_path\n treeupd_type\n treeupd_title\n }\n}"): (typeof documents)["subscription ThreadsPageSubs($located_fgroup_id: String!, $limit: Int!) {\n threads_in_group(located_fgroup_id: $located_fgroup_id, limit: $limit) {\n news_action\n news_payload_id\n news_payload {\n owner_fuser_id\n owner_shared\n ft_id\n ft_title\n ft_error\n ft_updated_ts\n ft_locked_by\n ft_need_assistant\n ft_need_tool_calls\n ft_archived_ts\n ft_created_ts\n }\n }\n}\n\nmutation DeleteThread($id: String!) {\n thread_delete(id: $id)\n}\n\nmutation CreateThread($input: FThreadInput!) {\n thread_create(input: $input) {\n ft_id\n }\n}\n\nsubscription MessagesSubscription($ft_id: String!, $want_deltas: Boolean!) {\n comprehensive_thread_subs(ft_id: $ft_id, want_deltas: $want_deltas) {\n news_action\n news_payload_id\n news_payload_thread_message {\n ft_app_specific\n ftm_belongs_to_ft_id\n ftm_alt\n ftm_num\n ftm_prev_alt\n ftm_role\n ftm_content\n ftm_tool_calls\n ftm_call_id\n ftm_usage\n ftm_created_ts\n ftm_user_preferences\n }\n stream_delta {\n ftm_role\n ftm_content\n }\n news_payload_thread {\n located_fgroup_id\n ft_id\n ft_need_user\n ft_need_assistant\n ft_fexp_id\n ft_confirmation_request\n ft_confirmation_response\n ft_title\n }\n }\n}\n\nmutation MessageCreateMultiple($input: FThreadMultipleMessagesInput!) {\n thread_messages_create_multiple(input: $input)\n}\n\nmutation ThreadPatch($id: String!, $message: String!) {\n thread_patch(id: $id, patch: {ft_error: $message}) {\n ft_id\n }\n}\n\nquery ExpertsForGroup($located_fgroup_id: String!) {\n experts_effective_list(located_fgroup_id: $located_fgroup_id) {\n fexp_id\n fexp_name\n }\n}\n\nquery ModelsForExpert($fexp_id: String!, $inside_fgroup_id: String!) {\n expert_choice_consequences(\n fexp_id: $fexp_id\n inside_fgroup_id: $inside_fgroup_id\n ) {\n models {\n provm_name\n provm_caps\n }\n }\n}\n\nquery ToolsForGroup($located_fgroup_id: String!) {\n cloud_tools_list(located_fgroup_id: $located_fgroup_id, include_offline: false) {\n ctool_confirmed_exists_ts\n ctool_description\n ctool_id\n ctool_name\n ctool_parameters\n located_fgroup_id\n owner_fuser_id\n }\n}\n\nmutation ThreadConfirmationResponse($confirmation_response: String = \"\", $ft_id: String = \"\") {\n thread_set_confirmation_response(\n ft_id: $ft_id\n confirmation_response: $confirmation_response\n )\n}\n\nquery BasicStuff {\n query_basic_stuff {\n fuser_id\n my_own_ws_id\n workspaces {\n ws_id\n ws_owner_fuser_id\n ws_root_group_id\n root_group_name\n have_coins_exactly\n have_coins_enough\n have_admin\n }\n }\n}\n\nmutation CreateWorkSpaceGroup($fgroup_name: String!, $fgroup_parent_id: String!) {\n group_create(\n input: {fgroup_name: $fgroup_name, fgroup_parent_id: $fgroup_parent_id}\n ) {\n fgroup_id\n fgroup_name\n ws_id\n fgroup_parent_id\n fgroup_created_ts\n }\n}\n\nsubscription WorkspaceTree($ws_id: String!) {\n tree_subscription(ws_id: $ws_id) {\n treeupd_action\n treeupd_id\n treeupd_path\n treeupd_type\n treeupd_title\n }\n}"]; +export function graphql(source: "subscription ThreadsPageSubs($located_fgroup_id: String!, $limit: Int!) {\n threads_in_group(located_fgroup_id: $located_fgroup_id, limit: $limit) {\n news_action\n news_payload_id\n news_payload {\n owner_fuser_id\n owner_shared\n ft_id\n ft_title\n ft_error\n ft_updated_ts\n ft_locked_by\n ft_need_assistant\n ft_need_tool_calls\n ft_archived_ts\n ft_created_ts\n }\n }\n}\n\nmutation DeleteThread($id: String!) {\n thread_delete(id: $id)\n}\n\nmutation CreateThread($input: FThreadInput!) {\n thread_create(input: $input) {\n ft_id\n }\n}\n\nsubscription MessagesSubscription($ft_id: String!, $want_deltas: Boolean!) {\n comprehensive_thread_subs(ft_id: $ft_id, want_deltas: $want_deltas) {\n news_action\n news_payload_id\n news_payload_thread_message {\n ft_app_specific\n ftm_belongs_to_ft_id\n ftm_alt\n ftm_num\n ftm_prev_alt\n ftm_role\n ftm_content\n ftm_tool_calls\n ftm_call_id\n ftm_usage\n ftm_created_ts\n ftm_user_preferences\n }\n stream_delta {\n ftm_role\n ftm_content\n }\n news_payload_thread {\n located_fgroup_id\n ft_id\n ft_need_user\n ft_need_assistant\n ft_fexp_id\n ft_confirmation_request\n ft_confirmation_response\n ft_title\n ft_toolset\n }\n }\n}\n\nmutation MessageCreateMultiple($input: FThreadMultipleMessagesInput!) {\n thread_messages_create_multiple(input: $input)\n}\n\nmutation ThreadPatch($id: String!, $message: String!) {\n thread_patch(id: $id, patch: {ft_error: $message}) {\n ft_id\n }\n}\n\nquery ExpertsForGroup($located_fgroup_id: String!) {\n experts_effective_list(located_fgroup_id: $located_fgroup_id) {\n fexp_id\n fexp_name\n }\n}\n\nquery ModelsForExpert($fexp_id: String!, $inside_fgroup_id: String!) {\n expert_choice_consequences(\n fexp_id: $fexp_id\n inside_fgroup_id: $inside_fgroup_id\n ) {\n models {\n provm_name\n provm_caps\n }\n }\n}\n\nquery ToolsForGroup($located_fgroup_id: String!) {\n cloud_tools_list(located_fgroup_id: $located_fgroup_id, include_offline: false) {\n ctool_confirmed_exists_ts\n ctool_description\n ctool_id\n ctool_name\n ctool_parameters\n located_fgroup_id\n owner_fuser_id\n }\n}\n\nmutation ThreadConfirmationResponse($confirmation_response: String = \"\", $ft_id: String = \"\") {\n thread_set_confirmation_response(\n ft_id: $ft_id\n confirmation_response: $confirmation_response\n )\n}\n\nquery BasicStuff {\n query_basic_stuff {\n fuser_id\n my_own_ws_id\n workspaces {\n ws_id\n ws_owner_fuser_id\n ws_root_group_id\n root_group_name\n have_coins_exactly\n have_coins_enough\n have_admin\n }\n }\n}\n\nmutation CreateWorkSpaceGroup($fgroup_name: String!, $fgroup_parent_id: String!) {\n group_create(\n input: {fgroup_name: $fgroup_name, fgroup_parent_id: $fgroup_parent_id}\n ) {\n fgroup_id\n fgroup_name\n ws_id\n fgroup_parent_id\n fgroup_created_ts\n }\n}\n\nsubscription WorkspaceTree($ws_id: String!) {\n tree_subscription(ws_id: $ws_id) {\n treeupd_action\n treeupd_id\n treeupd_path\n treeupd_type\n treeupd_title\n }\n}"): (typeof documents)["subscription ThreadsPageSubs($located_fgroup_id: String!, $limit: Int!) {\n threads_in_group(located_fgroup_id: $located_fgroup_id, limit: $limit) {\n news_action\n news_payload_id\n news_payload {\n owner_fuser_id\n owner_shared\n ft_id\n ft_title\n ft_error\n ft_updated_ts\n ft_locked_by\n ft_need_assistant\n ft_need_tool_calls\n ft_archived_ts\n ft_created_ts\n }\n }\n}\n\nmutation DeleteThread($id: String!) {\n thread_delete(id: $id)\n}\n\nmutation CreateThread($input: FThreadInput!) {\n thread_create(input: $input) {\n ft_id\n }\n}\n\nsubscription MessagesSubscription($ft_id: String!, $want_deltas: Boolean!) {\n comprehensive_thread_subs(ft_id: $ft_id, want_deltas: $want_deltas) {\n news_action\n news_payload_id\n news_payload_thread_message {\n ft_app_specific\n ftm_belongs_to_ft_id\n ftm_alt\n ftm_num\n ftm_prev_alt\n ftm_role\n ftm_content\n ftm_tool_calls\n ftm_call_id\n ftm_usage\n ftm_created_ts\n ftm_user_preferences\n }\n stream_delta {\n ftm_role\n ftm_content\n }\n news_payload_thread {\n located_fgroup_id\n ft_id\n ft_need_user\n ft_need_assistant\n ft_fexp_id\n ft_confirmation_request\n ft_confirmation_response\n ft_title\n ft_toolset\n }\n }\n}\n\nmutation MessageCreateMultiple($input: FThreadMultipleMessagesInput!) {\n thread_messages_create_multiple(input: $input)\n}\n\nmutation ThreadPatch($id: String!, $message: String!) {\n thread_patch(id: $id, patch: {ft_error: $message}) {\n ft_id\n }\n}\n\nquery ExpertsForGroup($located_fgroup_id: String!) {\n experts_effective_list(located_fgroup_id: $located_fgroup_id) {\n fexp_id\n fexp_name\n }\n}\n\nquery ModelsForExpert($fexp_id: String!, $inside_fgroup_id: String!) {\n expert_choice_consequences(\n fexp_id: $fexp_id\n inside_fgroup_id: $inside_fgroup_id\n ) {\n models {\n provm_name\n provm_caps\n }\n }\n}\n\nquery ToolsForGroup($located_fgroup_id: String!) {\n cloud_tools_list(located_fgroup_id: $located_fgroup_id, include_offline: false) {\n ctool_confirmed_exists_ts\n ctool_description\n ctool_id\n ctool_name\n ctool_parameters\n located_fgroup_id\n owner_fuser_id\n }\n}\n\nmutation ThreadConfirmationResponse($confirmation_response: String = \"\", $ft_id: String = \"\") {\n thread_set_confirmation_response(\n ft_id: $ft_id\n confirmation_response: $confirmation_response\n )\n}\n\nquery BasicStuff {\n query_basic_stuff {\n fuser_id\n my_own_ws_id\n workspaces {\n ws_id\n ws_owner_fuser_id\n ws_root_group_id\n root_group_name\n have_coins_exactly\n have_coins_enough\n have_admin\n }\n }\n}\n\nmutation CreateWorkSpaceGroup($fgroup_name: String!, $fgroup_parent_id: String!) {\n group_create(\n input: {fgroup_name: $fgroup_name, fgroup_parent_id: $fgroup_parent_id}\n ) {\n fgroup_id\n fgroup_name\n ws_id\n fgroup_parent_id\n fgroup_created_ts\n }\n}\n\nsubscription WorkspaceTree($ws_id: String!) {\n tree_subscription(ws_id: $ws_id) {\n treeupd_action\n treeupd_id\n treeupd_path\n treeupd_type\n treeupd_title\n }\n}"]; export function graphql(source: string) { return (documents as any)[source] ?? {}; diff --git a/refact-agent/gui/generated/graphql/graphql.ts b/refact-agent/gui/generated/graphql/graphql.ts index 5925720e3..ac4291759 100644 --- a/refact-agent/gui/generated/graphql/graphql.ts +++ b/refact-agent/gui/generated/graphql/graphql.ts @@ -409,6 +409,30 @@ export type FPersonaPatch = { persona_setup?: InputMaybe; }; +export type FPersonaScheduleListOutput = { + __typename?: 'FPersonaScheduleListOutput'; + scheds: Array; + ws_timezone: Scalars['String']['output']; +}; + +export type FPersonaScheduleOutput = { + __typename?: 'FPersonaScheduleOutput'; + sched_first_question: Scalars['String']['output']; + sched_id: Scalars['String']['output']; + sched_last_run_ts: Scalars['Float']['output']; + sched_persona_id: Scalars['String']['output']; + sched_rrule: Scalars['String']['output']; + sched_start_ts: Scalars['Float']['output']; +}; + +export type FPersonaScheduleUpsertInput = { + sched_first_question: Scalars['String']['input']; + sched_id?: InputMaybe; + sched_persona_id: Scalars['String']['input']; + sched_rrule: Scalars['String']['input']; + sched_start_ts: Scalars['Float']['input']; +}; + export type FPersonaSubs = { __typename?: 'FPersonaSubs'; news_action: Scalars['String']['output']; @@ -656,6 +680,8 @@ export type Mutation = { persona_create: FPersonaOutput; persona_delete: Scalars['Boolean']['output']; persona_patch: FPersonaOutput; + persona_schedule_delete: FPersonaScheduleOutput; + persona_schedule_upsert: FPersonaScheduleOutput; reset_password_execute: Scalars['Boolean']['output']; reset_password_start: Scalars['Boolean']['output']; session_open: Scalars['String']['output']; @@ -924,6 +950,16 @@ export type MutationPersona_PatchArgs = { }; +export type MutationPersona_Schedule_DeleteArgs = { + sched_id: Scalars['String']['input']; +}; + + +export type MutationPersona_Schedule_UpsertArgs = { + input: FPersonaScheduleUpsertInput; +}; + + export type MutationReset_Password_ExecuteArgs = { new_password: Scalars['String']['input']; token: Scalars['String']['input']; @@ -983,6 +1019,7 @@ export type MutationThread_Mass_Group_PatchArgs = { export type MutationThread_Messages_Create_MultipleArgs = { delete_negative?: InputMaybe>; input: FThreadMultipleMessagesInput; + mission_accomplished_adv_worker?: InputMaybe; }; @@ -1080,6 +1117,7 @@ export type Query = { persona_get: FPersonaOutput; persona_list: Array; persona_opened_in_ui: FPersonaOutput; + persona_schedule_list: FPersonaScheduleListOutput; query_basic_stuff: BasicStuffResult; reset_password_token_info: PasswordResetTokenInfo; stats_query: Array; @@ -1239,6 +1277,11 @@ export type QueryPersona_Opened_In_UiArgs = { }; +export type QueryPersona_Schedule_ListArgs = { + persona_id: Scalars['String']['input']; +}; + + export type QueryQuery_Basic_StuffArgs = { want_invitations?: Scalars['Boolean']['input']; }; @@ -1462,7 +1505,7 @@ export type MessagesSubscriptionSubscriptionVariables = Exact<{ }>; -export type MessagesSubscriptionSubscription = { __typename?: 'Subscription', comprehensive_thread_subs: { __typename?: 'FThreadMessageSubs', news_action: string, news_payload_id: string, news_payload_thread_message?: { __typename?: 'FThreadMessageOutput', ft_app_specific?: any | null, ftm_belongs_to_ft_id: string, ftm_alt: number, ftm_num: number, ftm_prev_alt: number, ftm_role: string, ftm_content?: any | null, ftm_tool_calls?: any | null, ftm_call_id: string, ftm_usage?: any | null, ftm_created_ts: number, ftm_user_preferences?: any | null } | null, stream_delta?: { __typename?: 'FThreadDelta', ftm_role: string, ftm_content: any } | null, news_payload_thread?: { __typename?: 'FThreadOutput', located_fgroup_id: string, ft_id: string, ft_need_user: number, ft_need_assistant: number, ft_fexp_id: string, ft_confirmation_request?: any | null, ft_confirmation_response?: any | null, ft_title: string } | null } }; +export type MessagesSubscriptionSubscription = { __typename?: 'Subscription', comprehensive_thread_subs: { __typename?: 'FThreadMessageSubs', news_action: string, news_payload_id: string, news_payload_thread_message?: { __typename?: 'FThreadMessageOutput', ft_app_specific?: any | null, ftm_belongs_to_ft_id: string, ftm_alt: number, ftm_num: number, ftm_prev_alt: number, ftm_role: string, ftm_content?: any | null, ftm_tool_calls?: any | null, ftm_call_id: string, ftm_usage?: any | null, ftm_created_ts: number, ftm_user_preferences?: any | null } | null, stream_delta?: { __typename?: 'FThreadDelta', ftm_role: string, ftm_content: any } | null, news_payload_thread?: { __typename?: 'FThreadOutput', located_fgroup_id: string, ft_id: string, ft_need_user: number, ft_need_assistant: number, ft_fexp_id: string, ft_confirmation_request?: any | null, ft_confirmation_response?: any | null, ft_title: string, ft_toolset?: any | null } | null } }; export type MessageCreateMultipleMutationVariables = Exact<{ input: FThreadMultipleMessagesInput; @@ -1533,7 +1576,7 @@ export type WorkspaceTreeSubscription = { __typename?: 'Subscription', tree_subs export const ThreadsPageSubsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"ThreadsPageSubs"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"located_fgroup_id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"threads_in_group"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"located_fgroup_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"located_fgroup_id"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"news_action"}},{"kind":"Field","name":{"kind":"Name","value":"news_payload_id"}},{"kind":"Field","name":{"kind":"Name","value":"news_payload"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"owner_fuser_id"}},{"kind":"Field","name":{"kind":"Name","value":"owner_shared"}},{"kind":"Field","name":{"kind":"Name","value":"ft_id"}},{"kind":"Field","name":{"kind":"Name","value":"ft_title"}},{"kind":"Field","name":{"kind":"Name","value":"ft_error"}},{"kind":"Field","name":{"kind":"Name","value":"ft_updated_ts"}},{"kind":"Field","name":{"kind":"Name","value":"ft_locked_by"}},{"kind":"Field","name":{"kind":"Name","value":"ft_need_assistant"}},{"kind":"Field","name":{"kind":"Name","value":"ft_need_tool_calls"}},{"kind":"Field","name":{"kind":"Name","value":"ft_archived_ts"}},{"kind":"Field","name":{"kind":"Name","value":"ft_created_ts"}}]}}]}}]}}]} as unknown as DocumentNode; export const DeleteThreadDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteThread"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"thread_delete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}]}]}}]} as unknown as DocumentNode; export const CreateThreadDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateThread"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"FThreadInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"thread_create"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ft_id"}}]}}]}}]} as unknown as DocumentNode; -export const MessagesSubscriptionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"MessagesSubscription"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"ft_id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"want_deltas"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"comprehensive_thread_subs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ft_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"ft_id"}}},{"kind":"Argument","name":{"kind":"Name","value":"want_deltas"},"value":{"kind":"Variable","name":{"kind":"Name","value":"want_deltas"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"news_action"}},{"kind":"Field","name":{"kind":"Name","value":"news_payload_id"}},{"kind":"Field","name":{"kind":"Name","value":"news_payload_thread_message"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ft_app_specific"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_belongs_to_ft_id"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_alt"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_num"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_prev_alt"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_role"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_content"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_tool_calls"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_call_id"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_usage"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_created_ts"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_user_preferences"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stream_delta"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ftm_role"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"news_payload_thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"located_fgroup_id"}},{"kind":"Field","name":{"kind":"Name","value":"ft_id"}},{"kind":"Field","name":{"kind":"Name","value":"ft_need_user"}},{"kind":"Field","name":{"kind":"Name","value":"ft_need_assistant"}},{"kind":"Field","name":{"kind":"Name","value":"ft_fexp_id"}},{"kind":"Field","name":{"kind":"Name","value":"ft_confirmation_request"}},{"kind":"Field","name":{"kind":"Name","value":"ft_confirmation_response"}},{"kind":"Field","name":{"kind":"Name","value":"ft_title"}}]}}]}}]}}]} as unknown as DocumentNode; +export const MessagesSubscriptionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"MessagesSubscription"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"ft_id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"want_deltas"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"comprehensive_thread_subs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"ft_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"ft_id"}}},{"kind":"Argument","name":{"kind":"Name","value":"want_deltas"},"value":{"kind":"Variable","name":{"kind":"Name","value":"want_deltas"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"news_action"}},{"kind":"Field","name":{"kind":"Name","value":"news_payload_id"}},{"kind":"Field","name":{"kind":"Name","value":"news_payload_thread_message"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ft_app_specific"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_belongs_to_ft_id"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_alt"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_num"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_prev_alt"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_role"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_content"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_tool_calls"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_call_id"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_usage"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_created_ts"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_user_preferences"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stream_delta"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ftm_role"}},{"kind":"Field","name":{"kind":"Name","value":"ftm_content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"news_payload_thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"located_fgroup_id"}},{"kind":"Field","name":{"kind":"Name","value":"ft_id"}},{"kind":"Field","name":{"kind":"Name","value":"ft_need_user"}},{"kind":"Field","name":{"kind":"Name","value":"ft_need_assistant"}},{"kind":"Field","name":{"kind":"Name","value":"ft_fexp_id"}},{"kind":"Field","name":{"kind":"Name","value":"ft_confirmation_request"}},{"kind":"Field","name":{"kind":"Name","value":"ft_confirmation_response"}},{"kind":"Field","name":{"kind":"Name","value":"ft_title"}},{"kind":"Field","name":{"kind":"Name","value":"ft_toolset"}}]}}]}}]}}]} as unknown as DocumentNode; export const MessageCreateMultipleDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"MessageCreateMultiple"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"FThreadMultipleMessagesInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"thread_messages_create_multiple"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]} as unknown as DocumentNode; export const ThreadPatchDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ThreadPatch"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"message"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"thread_patch"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"Argument","name":{"kind":"Name","value":"patch"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"ft_error"},"value":{"kind":"Variable","name":{"kind":"Name","value":"message"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ft_id"}}]}}]}}]} as unknown as DocumentNode; export const ExpertsForGroupDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ExpertsForGroup"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"located_fgroup_id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"experts_effective_list"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"located_fgroup_id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"located_fgroup_id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"fexp_id"}},{"kind":"Field","name":{"kind":"Name","value":"fexp_name"}}]}}]}}]} as unknown as DocumentNode; diff --git a/refact-agent/gui/generated/schema.graphql b/refact-agent/gui/generated/schema.graphql index caa7223bb..52adcc603 100644 --- a/refact-agent/gui/generated/schema.graphql +++ b/refact-agent/gui/generated/schema.graphql @@ -366,6 +366,28 @@ input FPersonaPatch { persona_setup: String = null } +type FPersonaScheduleListOutput { + scheds: [FPersonaScheduleOutput!]! + ws_timezone: String! +} + +type FPersonaScheduleOutput { + sched_first_question: String! + sched_id: String! + sched_last_run_ts: Float! + sched_persona_id: String! + sched_rrule: String! + sched_start_ts: Float! +} + +input FPersonaScheduleUpsertInput { + sched_first_question: String! + sched_id: String = null + sched_persona_id: String! + sched_rrule: String! + sched_start_ts: Float! +} + type FPersonaSubs { news_action: String! news_payload: FPersonaOutput @@ -606,6 +628,8 @@ type Mutation { persona_create(input: FPersonaInput!): FPersonaOutput! persona_delete(id: String!): Boolean! persona_patch(id: String!, patch: FPersonaPatch!): FPersonaOutput! + persona_schedule_delete(sched_id: String!): FPersonaScheduleOutput! + persona_schedule_upsert(input: FPersonaScheduleUpsertInput!): FPersonaScheduleOutput! reset_password_execute(new_password: String!, token: String!): Boolean! reset_password_start(username: String!): Boolean! session_open(password: String!, username: String!): String! @@ -617,7 +641,7 @@ type Mutation { thread_delete(id: String!): Boolean! thread_lock(ft_id: String!, worker_name: String!): Boolean! thread_mass_group_patch(dst_group_id: String!, src_group_id: String!): Int! - thread_messages_create_multiple(delete_negative: [Int!] = null, input: FThreadMultipleMessagesInput!): Int! + thread_messages_create_multiple(delete_negative: [Int!] = null, input: FThreadMultipleMessagesInput!, mission_accomplished_adv_worker: String = null): Int! thread_patch(id: String!, patch: FThreadPatch!): FThreadOutput! thread_reset_error(ft_error: String!, ft_id: String!): Boolean! thread_reset_title(ft_id: String!, ft_title: String!): Boolean! @@ -662,6 +686,7 @@ type Query { persona_get(id: String!): FPersonaOutput! persona_list(limit: Int!, located_fgroup_id: String!, skip: Int!, sort_by: String! = ""): [FPersonaOutput!]! persona_opened_in_ui(persona_id: String!): FPersonaOutput! + persona_schedule_list(persona_id: String!): FPersonaScheduleListOutput! query_basic_stuff(want_invitations: Boolean! = false): BasicStuffResult! reset_password_token_info(token: String!): PasswordResetTokenInfo! stats_query(breakdown_fexp_name: [String!]!, breakdown_fuser_id: [String!]!, breakdown_model: [String!]!, fgroup_id: String! = "", filter_fexp_id: [String!]! = [], filter_fuser_id: [String!]! = [], filter_model: [String!]! = [], filter_thing: [String!]! = [], st_chart: Int!, st_span: String!, timekey_from: String!, timekey_to: String!, ws_id: String! = ""): [FStatsOutput!]! diff --git a/refact-agent/gui/src/components/Chat/Chat.stories.tsx b/refact-agent/gui/src/components/Chat/Chat.stories.tsx index 88f55a299..8687dc105 100644 --- a/refact-agent/gui/src/components/Chat/Chat.stories.tsx +++ b/refact-agent/gui/src/components/Chat/Chat.stories.tsx @@ -39,6 +39,7 @@ const Template: React.FC<{ endAlt: 0, endPrevAlt: 0, thread: null, + loading: false, messages: messages.reduce((acc, message) => { return { ...acc, diff --git a/refact-agent/gui/src/components/Chat/Chat.tsx b/refact-agent/gui/src/components/Chat/Chat.tsx index 0d85ee1fa..46cc46bf2 100644 --- a/refact-agent/gui/src/components/Chat/Chat.tsx +++ b/refact-agent/gui/src/components/Chat/Chat.tsx @@ -1,9 +1,20 @@ -import React, { useCallback, useMemo, useState } from "react"; +import React, { + useCallback, + // useMemo, + useState, +} from "react"; import { ChatForm, ChatFormProps } from "../ChatForm"; import { ChatContent } from "../ChatContent"; import { Flex } from "@radix-ui/themes"; -import { useAppDispatch, useAppSelector, useSendMessages } from "../../hooks"; -import { selectConfig, type Config } from "../../features/Config/configSlice"; +import { + // useAppDispatch, + useAppSelector, + useSendMessages, +} from "../../hooks"; +import { + // selectConfig, + type Config, +} from "../../features/Config/configSlice"; import { DropzoneProvider } from "../Dropzone"; import { useCheckpoints } from "../../hooks/useCheckpoints"; @@ -11,13 +22,13 @@ import { Checkpoints } from "../../features/Checkpoints"; import { useMessageSubscription } from "./useMessageSubscription"; import { - selectIsStreaming, - selectIsWaiting, + // selectIsStreaming, + // selectIsWaiting, selectThreadId, - selectTotalMessagesInThread, + // selectTotalMessagesInThread, } from "../../features/ThreadMessages"; -import { ThreadHistoryButton } from "../Buttons"; -import { push } from "../../features/Pages/pagesSlice"; +// import { ThreadHistoryButton } from "../Buttons"; +// import { push } from "../../features/Pages/pagesSlice"; export type ChatProps = { host: Config["host"]; @@ -29,31 +40,31 @@ export type ChatProps = { }; export const Chat: React.FC = ({ style, maybeSendToSidebar }) => { - const dispatch = useAppDispatch(); + // const dispatch = useAppDispatch(); // const unCalledTools = useAppSelector(selectBranchHasUncalledTools); const [isViewingRawJSON, setIsViewingRawJSON] = useState(false); - const isStreaming = useAppSelector(selectIsStreaming); - const isWaiting = useAppSelector(selectIsWaiting); + // const isStreaming = useAppSelector(selectIsStreaming); + // const isWaiting = useAppSelector(selectIsWaiting); useMessageSubscription(); const { sendMessage } = useSendMessages(); - const totalMessages = useAppSelector(selectTotalMessagesInThread, { - devModeChecks: { stabilityCheck: "never" }, - }); - - const config = useAppSelector(selectConfig); - - const canShowDebugButton = useMemo(() => { - if (config.host === "web") return true; - if (config.features?.connections) return true; - return !isWaiting && !isStreaming && totalMessages > 0; - }, [ - config.features?.connections, - config.host, - isStreaming, - isWaiting, - totalMessages, - ]); + // const totalMessages = useAppSelector(selectTotalMessagesInThread, { + // devModeChecks: { stabilityCheck: "never" }, + // }); + + // const config = useAppSelector(selectConfig); + + // const canShowDebugButton = useMemo(() => { + // if (config.host === "web") return true; + // if (!config.features?.connections) return false; + // return !isWaiting && !isStreaming && totalMessages > 0; + // }, [ + // config.features?.connections, + // config.host, + // isStreaming, + // isWaiting, + // totalMessages, + // ]); const chatId = useAppSelector(selectThreadId); @@ -71,9 +82,9 @@ export const Chat: React.FC = ({ style, maybeSendToSidebar }) => { ); // TODO: this - const handleThreadHistoryPage = useCallback(() => { - dispatch(push({ name: "thread history page", chatId: chatId ?? "" })); - }, [chatId, dispatch]); + // const handleThreadHistoryPage = useCallback(() => { + // dispatch(push({ name: "thread history page", chatId: chatId ?? "" })); + // }, [chatId, dispatch]); return ( @@ -98,7 +109,8 @@ export const Chat: React.FC = ({ style, maybeSendToSidebar }) => { {/* Two flexboxes are left for the future UI element on the right side */} - {canShowDebugButton && ( + {/* TODO: move this */} + {/* {canShowDebugButton && ( = ({ style, maybeSendToSidebar }) => { onClick={handleThreadHistoryPage} /> - )} + )} */} diff --git a/refact-agent/gui/src/components/ChatContent/ChatContent.stories.tsx b/refact-agent/gui/src/components/ChatContent/ChatContent.stories.tsx index c09acc812..43d9b6ff4 100644 --- a/refact-agent/gui/src/components/ChatContent/ChatContent.stories.tsx +++ b/refact-agent/gui/src/components/ChatContent/ChatContent.stories.tsx @@ -32,6 +32,7 @@ import { const TEXT_DOC_UPDATE = { waitingBranches: [], streamingBranches: [], + loading: false, messages: { "J7CJxOiP5F:100:1:100": { ft_app_specific: null, @@ -805,6 +806,7 @@ const MockedStore: React.FC<{ endAlt: 0, endPrevAlt: 0, thread: null, + loading: false, messages: messages ? messages.reduce((acc, cur) => { return { ...acc, [cur.ftm_call_id]: cur }; diff --git a/refact-agent/gui/src/components/ChatContent/ChatContent.tsx b/refact-agent/gui/src/components/ChatContent/ChatContent.tsx index 46b495674..5361d5016 100644 --- a/refact-agent/gui/src/components/ChatContent/ChatContent.tsx +++ b/refact-agent/gui/src/components/ChatContent/ChatContent.tsx @@ -128,8 +128,6 @@ export const ChatContent: React.FC = () => { direction="column" className={styles.content} data-element="ChatContent" - p="2" - gap="1" > {isEmptyNode(threadMessageTrie) ? ( diff --git a/refact-agent/gui/src/components/ChatForm/useCommandCompletionAndPreviewFiles.ts b/refact-agent/gui/src/components/ChatForm/useCommandCompletionAndPreviewFiles.ts index d1ad9731b..e6803ae5f 100644 --- a/refact-agent/gui/src/components/ChatForm/useCommandCompletionAndPreviewFiles.ts +++ b/refact-agent/gui/src/components/ChatForm/useCommandCompletionAndPreviewFiles.ts @@ -10,6 +10,7 @@ import { ChatContextFile } from "../../services/refact/types"; import { selectIsStreaming, selectIsWaiting, + selectLoading, selectMessagesFromEndNode, } from "../../features/ThreadMessages"; import { formatMessagesForLsp } from "../../services/refact/links"; @@ -81,6 +82,7 @@ function useGetCommandPreviewQuery( const messagesToSend = formatMessagesForLsp(messages); const isWaiting = useAppSelector(selectIsWaiting); const isStreaming = useAppSelector(selectIsStreaming); + const isLoading = useAppSelector(selectLoading); // TODO: attach images const { data } = commandsApi.useGetCommandPreviewQuery( @@ -91,7 +93,7 @@ function useGetCommandPreviewQuery( ], }, { - skip: isWaiting || isStreaming, + skip: isLoading || isWaiting || isStreaming || query.trim().length === 0, }, ); if (!data) return []; diff --git a/refact-agent/gui/src/components/MessageNode/MessageNode.tsx b/refact-agent/gui/src/components/MessageNode/MessageNode.tsx index fe592006a..6e6ba336f 100644 --- a/refact-agent/gui/src/components/MessageNode/MessageNode.tsx +++ b/refact-agent/gui/src/components/MessageNode/MessageNode.tsx @@ -16,8 +16,7 @@ import { GroupedDiffs } from "../ChatContent/DiffContent"; import { FTMMessageNode as FTMessageNode } from "../../features/ThreadMessages/makeMessageTrie"; import { - selectIsStreaming, - selectIsWaiting, + selectLoading, selectMessageIsLastOfType, selectThreadMessageTopAltNumber, setThreadEnd, @@ -81,8 +80,8 @@ export const MessageNode: React.FC = ({ const isLastOfRole = useAppSelector((state) => selectMessageIsLastOfType(state, children.value), ); - const isWaiting = useAppSelector(selectIsWaiting); - const isStreaming = useAppSelector(selectIsStreaming); + + const isLoading = useAppSelector(selectLoading); useEffect(() => { if (children.children.length === 0) { @@ -104,58 +103,15 @@ export const MessageNode: React.FC = ({ return ( <> {/**TODO: this could be put at the end of the assistant message */} - {!isWaiting && - !isStreaming && - children.value.ftm_role === "user" && - isLastOfRole && } + {!isLoading && children.value.ftm_role === "user" && isLastOfRole && ( + + )} {children.children} ); }; -// type NodeSelectButtonsProps = { -// onForward: () => void; -// onBackward: () => void; -// currentNode: number; -// totalNodes: number; -// }; - -// const NodeSelectButtons: React.FC = ({ -// onForward, -// onBackward, -// currentNode, -// totalNodes, -// }) => { -// return ( -// -// -// -// -// -// -// {currentNode + 1} / {totalNodes} -// -// -// -// -// -// -// ); -// }; - function makeDummyNode( ft_id?: string, lastMessageNumber?: number, diff --git a/refact-agent/gui/src/components/UsageCounter/UsageCounter.stories.tsx b/refact-agent/gui/src/components/UsageCounter/UsageCounter.stories.tsx index f232420f2..81533c7d9 100644 --- a/refact-agent/gui/src/components/UsageCounter/UsageCounter.stories.tsx +++ b/refact-agent/gui/src/components/UsageCounter/UsageCounter.stories.tsx @@ -30,6 +30,7 @@ const MockedStore: React.FC<{ lspPort: 8001, }, threadMessages: { + loading: false, thread: { ft_id: "foo", ft_need_user: -1, diff --git a/refact-agent/gui/src/features/ThreadList/ThreadList.tsx b/refact-agent/gui/src/features/ThreadList/ThreadList.tsx index 9f4beae2a..f5735dd2c 100644 --- a/refact-agent/gui/src/features/ThreadList/ThreadList.tsx +++ b/refact-agent/gui/src/features/ThreadList/ThreadList.tsx @@ -5,7 +5,7 @@ import { selectThreadList, selectThreadListError, selectThreadListLoading, - ThreadListItem, + type ThreadListItem, } from "./threadListSlice"; import { graphqlQueriesAndMutations, @@ -79,7 +79,7 @@ export const ThreadList: React.FC = () => { gap="1" > {threads.map((thread) => ( - void; }; -const ThreadLustItem: React.FC = ({ thread, onOpen }) => { +const ThreadListItem: React.FC = ({ thread, onOpen }) => { // TODO: handel updating state // TODO: handle read state // TODO: change this to created at - const dateCreated = new Date(thread.ft_created_ts); + const dateCreated = new Date(thread.ft_created_ts * 1000); const dateTimeString = dateCreated.toLocaleString(); const [deleteThread, deleteThreadRequest] = graphqlQueriesAndMutations.useDeleteThreadMutation(); diff --git a/refact-agent/gui/src/features/ThreadMessages/threadMessagesSlice.ts b/refact-agent/gui/src/features/ThreadMessages/threadMessagesSlice.ts index ec3bd8a74..df7896680 100644 --- a/refact-agent/gui/src/features/ThreadMessages/threadMessagesSlice.ts +++ b/refact-agent/gui/src/features/ThreadMessages/threadMessagesSlice.ts @@ -7,7 +7,10 @@ import { MessagesSubscriptionSubscription } from "../../../generated/documents"; import { makeMessageTrie, getAncestorsForNode } from "./makeMessageTrie"; import type { BaseMessage } from "../../services/refact/types"; import { pagesSlice } from "../Pages/pagesSlice"; -import { graphqlQueriesAndMutations } from "../../services/graphql"; +import { + graphqlQueriesAndMutations, + messagesSub, +} from "../../services/graphql"; import { isDiffMessage, @@ -100,6 +103,7 @@ export type MessagesInitialState = { endAlt: number; endPrevAlt: number; thread: Thread | null; + loading: boolean; }; const initialState: MessagesInitialState = { @@ -111,6 +115,7 @@ const initialState: MessagesInitialState = { endAlt: 0, endPrevAlt: 0, thread: null, + loading: false, }; const ID_REGEXP = /^(.*):(\d+):(\d+):(\d+)$/; @@ -304,6 +309,14 @@ export const threadMessagesSlice = createSlice({ ) => { state.ft_id = action.payload; }, + + setLoading: ( + state, + action: PayloadAction<{ ft_id: string; loading: boolean }>, + ) => { + if (action.payload.ft_id !== state.ft_id) return; + state.loading = action.payload.loading; + }, }, selectors: { selectThreadMessages: (state) => Object.values(state.messages), @@ -322,6 +335,7 @@ export const threadMessagesSlice = createSlice({ ); return !!maybeBranch; }, + selectLoading: (state) => state.loading, selectThreadMessageTrie: createSelector(selectMessagesValues, (messages) => makeMessageTrie(messages), ), @@ -581,6 +595,12 @@ export const threadMessagesSlice = createSlice({ ); }, ); + + builder.addMatcher(messagesSub.pending.match, (state, action) => { + if (action.meta.arg.ft_id === state.ft_id) { + state.loading = true; + } + }); }, }); @@ -592,6 +612,7 @@ export const { setThreadEnd, resetThread, setThreadFtId, + setLoading, } = threadMessagesSlice.actions; export const { selectThreadMessages, @@ -619,4 +640,5 @@ export const { selectManyDiffMessageByIds, selectIntegrationMeta, selectMessageIsLastOfType, + selectLoading, } = threadMessagesSlice.selectors; diff --git a/refact-agent/gui/src/hooks/useSendMessages.ts b/refact-agent/gui/src/hooks/useSendMessages.ts index 417f7b67e..dff8319d6 100644 --- a/refact-agent/gui/src/hooks/useSendMessages.ts +++ b/refact-agent/gui/src/hooks/useSendMessages.ts @@ -2,10 +2,7 @@ import { useCallback } from "react"; import { useAppSelector } from "./useAppSelector"; import { useGetToolsLazyQuery } from "./useGetToolGroupsQuery"; import { FThreadMessageInput } from "../../generated/documents"; -import { - selectThreadEnd, - selectAppSpecific, -} from "../features/ThreadMessages/threadMessagesSlice"; +import { selectThreadEnd } from "../features/ThreadMessages/threadMessagesSlice"; import { selectCurrentExpert, selectCurrentModel, @@ -23,13 +20,9 @@ export function useSendMessages() { }); const maybeFtId = useIdForThread(); - const appSpecific = useAppSelector(selectAppSpecific, { - devModeChecks: { stabilityCheck: "never" }, - }); const selectedExpert = useAppSelector(selectCurrentExpert); const selectedModel = useAppSelector(selectCurrentModel); - // const attachedImages = useAppSelector(selectAllImages); const [sendMessages, _sendMessagesResult] = graphqlQueriesAndMutations.useSendMessagesMutation(); @@ -67,7 +60,6 @@ export function useSendMessages() { const inputMessages = maybeMessageWithImages.map((message, index) => { return { ftm_alt: leafMessage.endAlt, - ftm_app_specific: JSON.stringify(appSpecific), ftm_belongs_to_ft_id: maybeFtId ?? "", // ftId.ft_id, ftm_call_id: "", ftm_content: JSON.stringify(message.ftm_content), @@ -79,7 +71,6 @@ export function useSendMessages() { ftm_usage: "null", // optional ftm_user_preferences: JSON.stringify({ model: selectedModel ?? "", - tools: specs, }), }; }); @@ -92,7 +83,6 @@ export function useSendMessages() { }); }, [ - appSpecific, createThreadWitMultipleMessages, getTools, leafMessage.endAlt, @@ -128,7 +118,6 @@ export function useSendMessages() { } const input: FThreadMessageInput = { ftm_alt: leafMessage.endAlt, - ftm_app_specific: JSON.stringify(appSpecific), ftm_belongs_to_ft_id: maybeFtId ?? "", // ftId.ft_id, ftm_call_id: "", ftm_content: JSON.stringify(contentWithImage), @@ -140,7 +129,6 @@ export function useSendMessages() { ftm_usage: "null", // optional ftm_user_preferences: JSON.stringify({ model: selectedModel ?? "", - tools: specs, }), }; // TODO: this will need more info @@ -152,7 +140,6 @@ export function useSendMessages() { }); }, [ - appSpecific, createThreadWithMessage, getTools, leafMessage.endAlt, @@ -169,6 +156,5 @@ export function useSendMessages() { return { sendMessage, sendMultipleMessages, - // maybeAddImagesToQuestion }; } diff --git a/refact-agent/gui/src/services/graphql/flexus.graphql b/refact-agent/gui/src/services/graphql/flexus.graphql index 7f30b81e9..06090933b 100644 --- a/refact-agent/gui/src/services/graphql/flexus.graphql +++ b/refact-agent/gui/src/services/graphql/flexus.graphql @@ -65,6 +65,8 @@ subscription MessagesSubscription($ft_id: String!, $want_deltas: Boolean!) { ft_confirmation_request ft_confirmation_response ft_title + ft_toolset + ## ft_need_tool_calls ## This might be useful for tool confirmation? } } } diff --git a/refact-agent/gui/src/services/graphql/queriesAndMutationsApi.ts b/refact-agent/gui/src/services/graphql/queriesAndMutationsApi.ts index 4d10a5b50..bad437512 100644 --- a/refact-agent/gui/src/services/graphql/queriesAndMutationsApi.ts +++ b/refact-agent/gui/src/services/graphql/queriesAndMutationsApi.ts @@ -211,6 +211,7 @@ export const graphqlQueriesAndMutations = createApi({ located_fgroup_id: workspace, owner_shared: false, ft_app_searchable: appIdQuery.data?.app_searchable_id, + ft_toolset: JSON.stringify(args.tools), }; const threadQuery = await client.mutation< CreateThreadMutation, @@ -239,9 +240,6 @@ export const graphqlQueriesAndMutations = createApi({ const createMessageArgs: FThreadMessageInput[] = args.messages.map( (message, index) => { return { - ftm_app_specific: JSON.stringify( - appIdQuery.data?.app_searchable_id ?? "", - ), ftm_belongs_to_ft_id: threadQuery.data?.thread_create.ft_id ?? "", ftm_alt: 100, ftm_num: index + 1, @@ -254,7 +252,6 @@ export const graphqlQueriesAndMutations = createApi({ ftm_usage: "null", // optional ftm_user_preferences: JSON.stringify({ model: args.model, - tools: args.tools, ...(args.integration ? { integration: args.integration } : {}), }), }; @@ -318,6 +315,7 @@ export const graphqlQueriesAndMutations = createApi({ located_fgroup_id: workspace, owner_shared: false, ft_app_searchable: appIdQuery.data?.app_searchable_id, + ft_toolset: JSON.stringify(args.tools), }; const threadQuery = await client.mutation< CreateThreadMutation, @@ -351,9 +349,6 @@ export const graphqlQueriesAndMutations = createApi({ // Note: ftm_num, ftm_alt, and ftm_prev_alt are also hard coded for tracking waiting state const createMessageArgs: FThreadMessageInput = { - ftm_app_specific: JSON.stringify( - appIdQuery.data?.app_searchable_id ?? "", - ), ftm_belongs_to_ft_id: threadQuery.data.thread_create.ft_id, ftm_alt: 100, ftm_num: 1, @@ -366,7 +361,6 @@ export const graphqlQueriesAndMutations = createApi({ ftm_usage: "null", // optional ftm_user_preferences: JSON.stringify({ model: args.model, - tools: args.tools, }), }; diff --git a/refact-agent/gui/src/services/graphql/subscriptions.ts b/refact-agent/gui/src/services/graphql/subscriptions.ts index d3f938480..fcfc6c451 100644 --- a/refact-agent/gui/src/services/graphql/subscriptions.ts +++ b/refact-agent/gui/src/services/graphql/subscriptions.ts @@ -20,6 +20,7 @@ import { receiveThread, receiveThreadMessages, removeMessage, + setLoading, } from "../../features/ThreadMessages"; import { receiveWorkspace, receiveWorkspaceError } from "../../features/Groups"; @@ -153,6 +154,14 @@ export const messagesSub = createAsyncThunk< }), ); } + + if ( + result.data?.comprehensive_thread_subs.news_action === + "INITIAL_UPDATES_OVER" + ) { + const action = setLoading({ ft_id: args.ft_id, loading: false }); + thunkApi.dispatch(action); + } }, { connecting: () => {