@worktango/ai-assistant 0.0.51-ryantest → 0.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/express.js CHANGED
@@ -11193,7 +11193,9 @@ function setupAiAssistantRoutes(args) {
11193
11193
  const protocol = args.targetProtocol ?? "http";
11194
11194
  const bearerTokenMiddleware = (req, res, next) => {
11195
11195
  args.getBearerToken(req.headers).then((bearerToken) => {
11196
- req.headers.Authorization = `Bearer ${bearerToken}`;
11196
+ getRequestWithNewAuthHeader(
11197
+ req
11198
+ ).newAuthHeader = `Bearer ${bearerToken}`;
11197
11199
  next();
11198
11200
  }).catch((error) => {
11199
11201
  logger.error("Error getting bearer token:", error);
@@ -11211,12 +11213,11 @@ function setupAiAssistantRoutes(args) {
11211
11213
  },
11212
11214
  on: {
11213
11215
  proxyReq: (proxyReq, req) => {
11214
- args.getBearerToken(req.headers).then((bearerToken) => {
11215
- proxyReq.setHeader("Authorization", `Bearer ${bearerToken}`);
11216
- (0, import_http_proxy_middleware.fixRequestBody)(proxyReq, req);
11217
- }).catch((error) => {
11218
- logger.error("Error getting bearer token:", error);
11219
- });
11216
+ const newAuthHeader = getRequestWithNewAuthHeader(req).newAuthHeader;
11217
+ if (newAuthHeader) {
11218
+ proxyReq.setHeader("Authorization", newAuthHeader);
11219
+ }
11220
+ (0, import_http_proxy_middleware.fixRequestBody)(proxyReq, req);
11220
11221
  },
11221
11222
  proxyRes: (proxyRes, req, res) => {
11222
11223
  if (req.headers.accept === "text/event-stream") {
@@ -11246,6 +11247,9 @@ function setupAiAssistantRoutes(args) {
11246
11247
  proxy
11247
11248
  );
11248
11249
  }
11250
+ function getRequestWithNewAuthHeader(req) {
11251
+ return req;
11252
+ }
11249
11253
  // Annotate the CommonJS export names for ESM import in node:
11250
11254
  0 && (module.exports = {
11251
11255
  setupAiAssistantRoutes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worktango/ai-assistant",
3
- "version": "0.0.51-ryantest",
3
+ "version": "0.0.51",
4
4
  "files": [
5
5
  "dist",
6
6
  "express.d.ts",
package/react.d.ts CHANGED
@@ -61,7 +61,6 @@ export type AiAssistantProps = {
61
61
  hasChatHistory?: boolean;
62
62
  chatHistory?: ChatHistory;
63
63
  startingWidth?: ChatSizes;
64
- tools?: ToolDeclaration[];
65
64
  };
66
65
 
67
66
  export function AiAssistant({ tools }: AiAssistantProps): JSX.Element;