add add contact mock messages
This commit is contained in:
parent
aa53013cc4
commit
f0a89bd5e4
5 changed files with 24 additions and 20 deletions
|
|
@ -19,10 +19,10 @@ export async function main() {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Instantiate socket session with crimata-platorm.
|
// Instantiate socket session with crimata-platorm.
|
||||||
if (!socket) initSession();
|
// if (!socket) initSession();
|
||||||
socket = true;
|
// socket = true;
|
||||||
|
|
||||||
// Begin audio stream.
|
// Begin audio stream.
|
||||||
initRecorder();
|
// initRecorder();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,9 +51,9 @@ export default defineComponent({
|
||||||
|
|
||||||
emitter.on("animateSend", async (message) => {
|
emitter.on("animateSend", async (message) => {
|
||||||
try {
|
try {
|
||||||
renderArr.push(message)
|
renderArr.push(message)
|
||||||
// await invoke(message);
|
// await invoke(message);
|
||||||
//renderArr.push(data.value);
|
// renderArr.push(data.value);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("No response. Do not render.");
|
console.log("No response. Do not render.");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,12 @@ export default function useMessageView(): {
|
||||||
}
|
}
|
||||||
if (el) {
|
if (el) {
|
||||||
if (shift) {
|
if (shift) {
|
||||||
|
|
||||||
shiftOffset -= el.getBBox().height + messagePadding;
|
shiftOffset -= el.getBBox().height + messagePadding;
|
||||||
|
// if (messageOffset.y < 445) {
|
||||||
|
// shiftOffset -= 15;
|
||||||
|
// } else {
|
||||||
|
// shiftOffset -= el.getBBox().height + messagePadding;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
animateMessage(el);
|
animateMessage(el);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@ export default defineComponent({
|
||||||
|
|
||||||
const emittMessage = () => {
|
const emittMessage = () => {
|
||||||
console.log('testing')
|
console.log('testing')
|
||||||
counter.value++;
|
|
||||||
emitter.emit('animateSend', Messages[counter.value])
|
emitter.emit('animateSend', Messages[counter.value])
|
||||||
|
counter.value++;
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
emittMessage
|
emittMessage
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ import { Message } from "@/types/message/index";
|
||||||
|
|
||||||
export const Messages: Message[] = [
|
export const Messages: Message[] = [
|
||||||
{
|
{
|
||||||
content: "Welcome",
|
content: "Good morning Dave",
|
||||||
context: "ai",
|
context: "launch",
|
||||||
subContext: "",
|
subContext: "",
|
||||||
modifier: "ai",
|
modifier: "ai",
|
||||||
id: "2",
|
id: "2",
|
||||||
|
|
@ -11,15 +11,15 @@ export const Messages: Message[] = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
content:
|
content:
|
||||||
"add friend",
|
"add contact",
|
||||||
context: "launch",
|
context: "addcontact",
|
||||||
subContext: "",
|
subContext: "",
|
||||||
modifier: "sf",
|
modifier: "sf",
|
||||||
id: "1",
|
id: "1",
|
||||||
time: ""
|
time: ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
content: "Did you mean to addcontact?",
|
content: "I'm looking for name, crimata_idto addcontact. Feel free toenter only a subset of thisinformation, but then let meknow when you are done",
|
||||||
context: "addcontact",
|
context: "addcontact",
|
||||||
subContext: "",
|
subContext: "",
|
||||||
modifier: "ai",
|
modifier: "ai",
|
||||||
|
|
@ -27,8 +27,8 @@ export const Messages: Message[] = [
|
||||||
time: ""
|
time: ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
content: "yes",
|
content: "andrew gundersen",
|
||||||
context: "fulfill",
|
context: "addcontact",
|
||||||
subContext: "",
|
subContext: "",
|
||||||
modifier: "sf",
|
modifier: "sf",
|
||||||
id: "6",
|
id: "6",
|
||||||
|
|
@ -36,16 +36,16 @@ export const Messages: Message[] = [
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
content: "Hey Anna, did you get the paper done?",
|
content: "gundersena@xavier.edu",
|
||||||
context: "Mesage from Tommy McConville",
|
context: "addcontact",
|
||||||
subContext: "New Conversation",
|
subContext: "",
|
||||||
modifier: "ai",
|
modifier: "sf",
|
||||||
id: "3",
|
id: "3",
|
||||||
time: ""
|
time: ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
content: "Hey do you know Enrique Hernandez?",
|
content: "I already have a contact forandrew gundersen. Are you sureyou want this?",
|
||||||
context: "Message from Crimata",
|
context: "addcontact",
|
||||||
subContext: "",
|
subContext: "",
|
||||||
modifier: "ai",
|
modifier: "ai",
|
||||||
id: "7",
|
id: "7",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue