-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ts' into fixing-retell
- Loading branch information
Showing
13 changed files
with
175 additions
and
185 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
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
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 |
---|---|---|
|
@@ -28,4 +28,4 @@ npm install | |
npm run start | ||
``` | ||
|
||
>>>>>>> 100bddc3 (fixing-example) | ||
> > > > > > > 100bddc3 (fixing-example) |
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 |
---|---|---|
@@ -1,39 +1,37 @@ | ||
import 'htmx.org'; | ||
import "htmx.org"; | ||
import { RetellWebClient } from "@arakoodev/edgechains.js/ai"; | ||
import './style.css'; | ||
import "./style.css"; | ||
|
||
// Create a single instance | ||
const retellWebClient = new RetellWebClient(); | ||
|
||
async function startCall(access_token) { | ||
try { | ||
|
||
const callResponse = await retellWebClient.startCall({ | ||
accessToken: access_token, | ||
}); | ||
|
||
console.log('Call started:', callResponse); | ||
document.getElementById('callStatus').textContent = 'Call in progress...'; | ||
|
||
console.log("Call started:", callResponse); | ||
document.getElementById("callStatus").textContent = "Call in progress..."; | ||
} catch (error) { | ||
console.error('Failed to start call:', error); | ||
document.getElementById('error').textContent = `Failed to start call: ${error.message}`; | ||
console.error("Failed to start call:", error); | ||
document.getElementById("error").textContent = `Failed to start call: ${error.message}`; | ||
} | ||
} | ||
|
||
async function endCall() { | ||
try { | ||
await retellWebClient.stopCall(); | ||
console.log('Call ended successfully'); | ||
document.getElementById('callStatus').textContent = 'Call ended'; | ||
console.log("Call ended successfully"); | ||
document.getElementById("callStatus").textContent = "Call ended"; | ||
} catch (error) { | ||
console.error('Failed to end call:', error); | ||
document.getElementById('error').textContent = `Failed to end call: ${error.message}`; | ||
console.error("Failed to end call:", error); | ||
document.getElementById("error").textContent = `Failed to end call: ${error.message}`; | ||
} | ||
} | ||
|
||
// Expose functions to be used with hyperscript or other event handlers | ||
window.startCall = startCall; | ||
window.endCall = endCall; | ||
|
||
console.log('Client-side code initialized'); | ||
console.log("Client-side code initialized"); |
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 |
---|---|---|
@@ -1,67 +1,67 @@ | ||
{ | ||
"name": "htmx-webpack-demo", | ||
"version": "1.0.0", | ||
"scripts": { | ||
"build": "webpack", | ||
"dev": "webpack --watch", | ||
"start": "node --experimental-wasm-modules ./server/index.js" | ||
}, | ||
"dependencies": { | ||
"@arakoodev/edgechains.js": "file:../../arakoodev", | ||
"@arakoodev/jsonnet": "^0.25.0", | ||
"@hono/node-server": "^1.13.4", | ||
"browserify-zlib": "^0.2.0", | ||
"buffer": "^6.0.3", | ||
"crypto": "^1.0.1", | ||
"crypto-browserify": "^3.12.1", | ||
"file-uri-to-path": "^2.0.0", | ||
"html-webpack-plugin": "^5.6.3", | ||
"htmx.org": "^1.9.10", | ||
"hyperscript": "^2.0.2", | ||
"hyperscript.org": "^0.9.13", | ||
"mini-css-extract-plugin": "^2.9.2", | ||
"process": "^0.11.10", | ||
"retell-client-js-sdk": "^2.0.4", | ||
"retell-sdk": "^4.8.0", | ||
"stream-browserify": "^3.0.0", | ||
"stream-http": "^3.2.0", | ||
"util": "^0.12.5", | ||
"vm-browserify": "^1.1.2", | ||
"vue": "^3.5.12", | ||
"vue-loader": "^17.4.2", | ||
"webpack-node-externals": "^3.0.0", | ||
"workbox-webpack-plugin": "^7.3.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.26.0", | ||
"@babel/plugin-transform-runtime": "^7.25.9", | ||
"@babel/preset-env": "^7.26.0", | ||
"assert": "^2.1.0", | ||
"babel-loader": "^9.2.1", | ||
"css-loader": "^7.1.2", | ||
"node-polyfill-webpack-plugin": "^4.0.0", | ||
"os-browserify": "^0.3.0", | ||
"path-browserify": "^1.0.1", | ||
"postcss": "^8.4.47", | ||
"postcss-loader": "^8.1.1", | ||
"postcss-preset-env": "^10.0.9", | ||
"style-loader": "^4.0.0", | ||
"tailwindcss": "^3.4.14", | ||
"url": "^0.11.4", | ||
"webpack": "^5.96.1", | ||
"webpack-cli": "^5.1.4", | ||
"webpack-dev-server": "^5.1.0" | ||
}, | ||
"browser": { | ||
"crypto": "crypto-browserify", | ||
"stream": "stream-browserify", | ||
"http": "stream-http", | ||
"util": "util", | ||
"buffer": "buffer", | ||
"node:crypto": "crypto-browserify", | ||
"node:stream": "stream-browserify", | ||
"node:http": "stream-http", | ||
"node:buffer": "buffer", | ||
"node:util": "util" | ||
} | ||
"name": "htmx-webpack-demo", | ||
"version": "1.0.0", | ||
"scripts": { | ||
"build": "webpack", | ||
"dev": "webpack --watch", | ||
"start": "node --experimental-wasm-modules ./server/index.js" | ||
}, | ||
"dependencies": { | ||
"@arakoodev/edgechains.js": "file:../../arakoodev", | ||
"@arakoodev/jsonnet": "^0.25.0", | ||
"@hono/node-server": "^1.13.4", | ||
"browserify-zlib": "^0.2.0", | ||
"buffer": "^6.0.3", | ||
"crypto": "^1.0.1", | ||
"crypto-browserify": "^3.12.1", | ||
"file-uri-to-path": "^2.0.0", | ||
"html-webpack-plugin": "^5.6.3", | ||
"htmx.org": "^1.9.10", | ||
"hyperscript": "^2.0.2", | ||
"hyperscript.org": "^0.9.13", | ||
"mini-css-extract-plugin": "^2.9.2", | ||
"process": "^0.11.10", | ||
"retell-client-js-sdk": "^2.0.4", | ||
"retell-sdk": "^4.8.0", | ||
"stream-browserify": "^3.0.0", | ||
"stream-http": "^3.2.0", | ||
"util": "^0.12.5", | ||
"vm-browserify": "^1.1.2", | ||
"vue": "^3.5.12", | ||
"vue-loader": "^17.4.2", | ||
"webpack-node-externals": "^3.0.0", | ||
"workbox-webpack-plugin": "^7.3.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.26.0", | ||
"@babel/plugin-transform-runtime": "^7.25.9", | ||
"@babel/preset-env": "^7.26.0", | ||
"assert": "^2.1.0", | ||
"babel-loader": "^9.2.1", | ||
"css-loader": "^7.1.2", | ||
"node-polyfill-webpack-plugin": "^4.0.0", | ||
"os-browserify": "^0.3.0", | ||
"path-browserify": "^1.0.1", | ||
"postcss": "^8.4.47", | ||
"postcss-loader": "^8.1.1", | ||
"postcss-preset-env": "^10.0.9", | ||
"style-loader": "^4.0.0", | ||
"tailwindcss": "^3.4.14", | ||
"url": "^0.11.4", | ||
"webpack": "^5.96.1", | ||
"webpack-cli": "^5.1.4", | ||
"webpack-dev-server": "^5.1.0" | ||
}, | ||
"browser": { | ||
"crypto": "crypto-browserify", | ||
"stream": "stream-browserify", | ||
"http": "stream-http", | ||
"util": "util", | ||
"buffer": "buffer", | ||
"node:crypto": "crypto-browserify", | ||
"node:stream": "stream-browserify", | ||
"node:http": "stream-http", | ||
"node:buffer": "buffer", | ||
"node:util": "util" | ||
} | ||
} |
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 |
---|---|---|
@@ -1,7 +1,4 @@ | ||
const tailwindcss = require('tailwindcss'); | ||
const tailwindcss = require("tailwindcss"); | ||
module.exports = { | ||
plugins: [ | ||
'postcss-preset-env', | ||
tailwindcss | ||
], | ||
plugins: ["postcss-preset-env", tailwindcss], | ||
}; |
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.