-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into dependabot/npm_and_yarn/apps/api-gateway/…
…express-4.19.2
- Loading branch information
Showing
77 changed files
with
2,634 additions
and
4,520 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,3 +58,5 @@ litellm_uuid.txt | |
.space | ||
.makemd | ||
desktop.ini | ||
coverage/ | ||
/apps/js-examples/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const request = require('supertest'); | ||
const express = require('express'); | ||
const app = express(); | ||
const router = require('../index'); // replace with your router path | ||
|
||
app.use(express.json()); | ||
app.use('/', router); | ||
|
||
test('POST /users', async () => { | ||
const mockRequest = { | ||
uuid: 'test-uuid', // replace with your test uuid | ||
}; | ||
|
||
const response = await request(app) | ||
.post('/users') | ||
.send(mockRequest); | ||
|
||
expect(response.statusCode).toBe(200); | ||
// Add more assertions based on the expected response | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
function createChatWindow() { | ||
var chatWindow = document.createElement('div'); | ||
chatWindow.id = 'chat-window'; | ||
chatWindow.style.cssText = ` | ||
position: fixed; | ||
right: 20px; | ||
bottom: 80px; /* Adjusted to make room for the floating button */ | ||
width: 300px; | ||
height: 400px; | ||
border: 1px solid #ccc; | ||
z-index: 1000; | ||
box-shadow: 0 4px 8px rgba(0,0,0,0.1); | ||
display: none; /* Initially hidden */ | ||
`; | ||
document.body.appendChild(chatWindow); | ||
} | ||
|
||
// Function to open the chat iframe within the chat window | ||
function openChat() { | ||
var iframe = document.createElement('iframe'); | ||
iframe.src = "https://certainly-inspired-duck.ngrok-free.app/chat"; | ||
iframe.style.width = "100%"; | ||
iframe.style.height = "100%"; | ||
iframe.style.border = "none"; | ||
|
||
var chatWindow = document.getElementById('chat-window'); | ||
chatWindow.innerHTML = ""; // Clear the container | ||
chatWindow.appendChild(iframe); | ||
chatWindow.style.display = "block"; // Show the chat window | ||
} | ||
|
||
// Function to toggle the visibility of the chat window | ||
function toggleChat() { | ||
var chatWindow = document.getElementById('chat-window'); | ||
if (chatWindow.style.display === "none") { | ||
openChat(); | ||
} else { | ||
chatWindow.style.display = "none"; | ||
} | ||
} | ||
|
||
// Function to create and style the floating button | ||
function createFloatingButton() { | ||
var buttonImg = document.createElement('img'); | ||
buttonImg.src = "https://fdai.earth/wp-content/uploads/2024/03/robot-head.png"; | ||
buttonImg.style.cssText = ` | ||
position: fixed; | ||
right: 20px; | ||
bottom: 20px; | ||
width: 60px; /* Adjust the size as needed */ | ||
height: auto; | ||
cursor: pointer; | ||
z-index: 1001; /* Ensure it's above the chat window */ | ||
`; | ||
buttonImg.onclick = toggleChat; | ||
|
||
document.body.appendChild(buttonImg); | ||
} | ||
|
||
// Initialize the chat window and floating button | ||
createChatWindow(); | ||
createFloatingButton(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.