Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

detox-copilot

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detox-copilot - npm Package Compare versions

Comparing version 0.0.15 to 0.0.17

11

dist/actions/StepPerformer.js

@@ -92,7 +92,6 @@ "use strict";

promptResult = await this.promptHandler.runPrompt(prompt, snapshot);
const result = await this.codeEvaluator.evaluate(promptResult, this.context);
// Cache the result
this.cache.set(cacheKey, promptResult);
this.saveCacheToFile();
return result;
return await this.codeEvaluator.evaluate(promptResult, this.context);
}

@@ -109,15 +108,9 @@ catch (error) {

}];
const retryCacheKey = this.generateCacheKey(step, newPrevious, viewHierarchy);
if (this.cache.has(retryCacheKey)) {
const cachedRetryPromptResult = this.cache.get(retryCacheKey);
return this.codeEvaluator.evaluate(cachedRetryPromptResult, this.context);
}
const retryPrompt = this.promptCreator.createPrompt(step, viewHierarchy, isSnapshotImageAttached, newPrevious);
try {
const retryPromptResult = await this.promptHandler.runPrompt(retryPrompt, snapshot);
const retryResult = await this.codeEvaluator.evaluate(retryPromptResult, this.context);
// Cache the result under the original cache key
this.cache.set(cacheKey, retryPromptResult);
this.saveCacheToFile();
return retryResult;
return await this.codeEvaluator.evaluate(retryPromptResult, this.context);
}

@@ -124,0 +117,0 @@ catch (retryError) {

2

dist/actions/StepPerformer.test.js

@@ -147,3 +147,3 @@ "use strict";

await expect(stepPerformer.perform(intent)).rejects.toThrow('Evaluation failed');
expect(fs.writeFileSync).not.toHaveBeenCalled(); // Cache should not be saved
expect(fs.writeFileSync).toHaveBeenCalled(); // Cache should be saved
});

@@ -150,0 +150,0 @@ it('should use cached prompt result if available', async () => {

@@ -25,2 +25,3 @@ "use strict";

"Please generate the minimal executable code to perform the desired intent based on the given information and context.",
"If generating the relevant code is not possible due to ambiguity, invalid intent, or inability to find the desired element, return code that throws an informative error explaining the problem in one sentence.",
""

@@ -27,0 +28,0 @@ ];

{
"name": "detox-copilot",
"version": "0.0.15",
"version": "0.0.17",
"description": "A flexible plugin that drives your tests with human-written commands, enhanced by the power of large language models (LLMs)",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc