mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 06:02:42 +00:00
Add debug logging to RuntimeMessageRouter and increase API key validation tokens
- Add console.log for user script messages in RuntimeMessageRouter - Increase ProviderKeyInput maxTokens from 10 to 200 for better validation
This commit is contained in:
parent
c2793d8017
commit
b288cd9448
2 changed files with 4 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ export class ProviderKeyInput extends LitElement {
|
|||
|
||||
const result = await complete(model, context, {
|
||||
apiKey,
|
||||
maxTokens: 10,
|
||||
maxTokens: 200,
|
||||
} as any);
|
||||
|
||||
return result.stopReason === "stop";
|
||||
|
|
|
|||
|
|
@ -183,6 +183,8 @@ export class RuntimeMessageRouter {
|
|||
const context = this.sandboxes.get(sandboxId);
|
||||
if (!context) return false;
|
||||
|
||||
console.log("Router received user script message for sandbox:", sandboxId, message);
|
||||
|
||||
const respond = (response: any) => {
|
||||
sendResponse({
|
||||
...response,
|
||||
|
|
@ -210,6 +212,7 @@ export class RuntimeMessageRouter {
|
|||
};
|
||||
|
||||
chrome.runtime.onUserScriptMessage.addListener(this.userScriptMessageListener);
|
||||
console.log("[RuntimeMessageRouter] Registered chrome.runtime.onUserScriptMessage listener");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue