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.20 to 0.0.21

23

dist/actions/StepPerformer.js

@@ -85,14 +85,17 @@ "use strict";

const cacheKey = this.generateCacheKey(step, previous, viewHierarchy);
if (this.cache.has(cacheKey)) {
const cachedCode = this.cache.get(cacheKey);
return this.codeEvaluator.evaluate(cachedCode, this.context);
}
const prompt = this.promptCreator.createPrompt(step, viewHierarchy, isSnapshotImageAttached, previous);
let code = undefined;
try {
const promptResult = await this.promptHandler.runPrompt(prompt, snapshot);
code = (0, extractCodeBlock_1.extractCodeBlock)(promptResult);
// Cache the result
this.cache.set(cacheKey, code);
this.saveCacheToFile();
if (this.cache.has(cacheKey)) {
code = this.cache.get(cacheKey);
}
else {
const prompt = this.promptCreator.createPrompt(step, viewHierarchy, isSnapshotImageAttached, previous);
const promptResult = await this.promptHandler.runPrompt(prompt, snapshot);
code = (0, extractCodeBlock_1.extractCodeBlock)(promptResult);
this.cache.set(cacheKey, code);
this.saveCacheToFile();
}
if (!code) {
throw new Error('Failed to generate code from intent');
}
return await this.codeEvaluator.evaluate(code, this.context);

@@ -99,0 +102,0 @@ }

{
"name": "detox-copilot",
"version": "0.0.20",
"version": "0.0.21",
"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