Skip to content

Commit

Permalink
Full refactor of synergy processing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jhweir committed Jan 17, 2025
1 parent 7c1a52c commit 5720911
Show file tree
Hide file tree
Showing 3 changed files with 621 additions and 291 deletions.
23 changes: 21 additions & 2 deletions app/src/views/community/CommunityView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

<script lang="ts">
import SidebarLayout from "@/layout/SidebarLayout.vue";
import { defineComponent, ref } from "vue";
import { defineComponent, ref, watch, onUnmounted } from "vue";
import { useRoute } from "vue-router";
import CommunitySidebar from "./community-sidebar/CommunitySidebar.vue";
Expand All @@ -107,7 +107,7 @@ import ChannelView from "@/views/channel/ChannelView.vue";
import { useAppStore } from "@/store/app";
import { ModalsState } from "@/store/types";
import { PerspectiveState } from "@coasys/ad4m";
import { PerspectiveState, PerspectiveProxy } from "@coasys/ad4m";
import { getAd4mClient } from "@coasys/ad4m-connect/utils";
import {
usePerspective,
Expand All @@ -117,6 +117,10 @@ import {
import { Channel, Community } from "@coasys/flux-api";
import { useCommunities } from "@coasys/flux-vue";
import { mapActions } from "pinia";
import {
addSynergySignalHandler,
removeSynergySignalHandler,
} from "@coasys/flux-utils";
type LoadedChannels = {
[channelId: string]: boolean;
Expand Down Expand Up @@ -145,6 +149,21 @@ export default defineComponent({
subject: Channel,
});
// add synergy signal handler for each perspective (used to check if agents capable of processing conversation data)
watch(
() => data.value.perspective,
async (newPerspective: PerspectiveProxy | null) => {
if (newPerspective) await addSynergySignalHandler(newPerspective);
},
{ immediate: true }
);
// remove synergy signal handler when component unmounts
onUnmounted(() => {
if (data.value.perspective)
removeSynergySignalHandler(data.value.perspective);
});
return {
communities,
channels,
Expand Down
8 changes: 8 additions & 0 deletions packages/api/src/conversation-subgroup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,12 @@ export default class ConversationSubgroup extends SubjectEntity {
required: false,
})
summary: string;

@SubjectProperty({
through: "flux://has_position_timestamp",
writable: true,
resolveLanguage: "literal",
required: false,
})
positionTimestamp: string;
}
Loading

0 comments on commit 5720911

Please sign in to comment.