nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: stateful/vscode-runme
Pull request #728 (2023-07-26 22:37:49)

Handle specific endpoint
Easier remote dev for localhost.


Patch:
diff --git a/src/utils/configuration.ts b/src/utils/configuration.ts
index 848b090e..dc8961ca 100644
--- a/src/utils/configuration.ts
+++ b/src/utils/configuration.ts
@@ -20,6 +20,7 @@ export const OpenViewInEditorAction = z.enum(['split', 'toggle'])
 const DEFAULT_WORKSPACE_FILE_ORDER = ['.env.local', '.env']
 const DEFAULT_RUNME_APP_API_URL = 'https://api.runme.dev'
 const DEFAULT_RUNME_BASE_DOMAIN = 'runme.dev'
+const DEFAULT_RUNME_REMOTE_DEV = 'staging.runme.dev'
 const APP_LOOPBACKS = ['127.0.0.1', 'localhost']
 const APP_LOOPBACK_MAPPING = new Map<string, string>([
   ['api.', ':4000'],
@@ -273,8 +274,24 @@ const getCLIUseIntegratedRunme = (): boolean => {
   return getCLIConfigurationValue('useIntegratedRunme', false)
 }
 
+const getRemoteDev = (baseDomain: string): boolean => {
+  const localDev = APP_LOOPBACKS.map((host) =>
+    Uri.from({ scheme: 'http', authority: host }).toString().slice(0, -1)
+  )
+  return localDev.map((uri) => baseDomain.startsWith(uri)).reduce((p, c) => p || c)
+}
+
 const getRunmeAppUrl = (subdomains: string[]): string => {
-  const base = getRunmeBaseDomain()
+  let base = getRunmeBaseDomain()
+  const isRemoteDev = getRemoteDev(base)
+  if (isRemoteDev) {
+    if (subdomains.length === 1 && subdomains?.[0] === 'app') {
+      return base
+    } else {
+      base = DEFAULT_RUNME_REMOTE_DEV
+    }
+  }
+
   const isLoopback = APP_LOOPBACKS.map((host) => base.includes(host)).reduce((p, c) => p || c)
   const scheme = isLoopback ? 'http' : 'https'
 
@@ -289,8 +306,8 @@ const getRunmeAppUrl = (subdomains: string[]): string => {
     sub = ''
   }
 
-  const url = Uri.parse(`${scheme}://${sub}${base}${port}`, true)
-  return url.toString()
+  const endpoint = Uri.parse(`${scheme}://${sub}${base}${port}`, true)
+  return endpoint.toString()
 }
 
 const getRunmeBaseDomain = (): string => {


Test patch:
diff --git a/tests/extension/configuration.test.ts b/tests/extension/configuration.test.ts
index 5dbd2940..89482b2a 100644
--- a/tests/extension/configuration.test.ts
+++ b/tests/extension/configuration.test.ts
@@ -254,5 +254,13 @@ suite('Configuration', () => {
         const url = getRunmeAppUrl([])
         expect(url).toStrictEqual('http://localhost/')
       })
+
+      test('should allow specific app URL for remote dev returning staging-based domains', async () => {
+        SETTINGS_MOCK.baseDomain = 'http://localhost:4001'
+        const app = getRunmeAppUrl(['app'])
+        expect(app).toStrictEqual('http://localhost:4001')
+        const api = getRunmeAppUrl(['api'])
+        expect(api).toStrictEqual('https://api.staging.runme.dev/')
+      })
     })
 })
Repository: stateful/vscode-runme
Pull request #729 (2023-07-27 15:14:33)

feat: adding mimeType to the telemetry
Adding mime-type metadata to events for telemetry

duvanmonsa: Solving https://github.com/stateful/vscode-runme/issues/691

Patch:
diff --git a/package-lock.json b/package-lock.json
index b9115d04..a7644f68 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "runme",
-  "version": "1.9.0-edge.1",
+  "version": "1.9.0-edge.2",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
       "name": "runme",
-      "version": "1.9.0-edge.1",
+      "version": "1.9.0-edge.2",
       "hasInstallScript": true,
       "license": "Apache-2.0",
       "dependencies": {
diff --git a/package.json b/package.json
index 236a2a44..5e942c4f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "runme",
-  "version": "1.9.0-edge.1",
+  "version": "1.9.0-edge.2",
   "publisher": "stateful",
   "displayName": "Runme runs Markdown",
   "description": "Execute commands inside your runbooks, docs, and READMEs.",
diff --git a/src/extension/kernel.ts b/src/extension/kernel.ts
index bfe75ec6..00e5b85a 100644
--- a/src/extension/kernel.ts
+++ b/src/extension/kernel.ts
@@ -540,9 +540,11 @@ export class Kernel implements Disposable {
 
       successfulCellExecution = false
     }
+    const annotations = getAnnotations(cell)
 
     TelemetryReporter.sendTelemetryEvent('cell.endExecute', {
       'cell.success': successfulCellExecution?.toString(),
+      'cell.mimeType': annotations.mimeType,
     })
     runmeExec.end(successfulCellExecution)
   }


Test patch:
diff --git a/tests/extension/kernel.test.ts b/tests/extension/kernel.test.ts
index 7437f196..72edcc33 100644
--- a/tests/extension/kernel.test.ts
+++ b/tests/extension/kernel.test.ts
@@ -204,7 +204,7 @@ suite('_doExecuteCell', () => {
     )
     expect(TelemetryReporter.sendTelemetryEvent).toHaveBeenCalledWith(
       'cell.endExecute',
-      { 'cell.success': undefined }
+      { 'cell.success': undefined, 'cell.mimeType': undefined }
     )
   })
 
@@ -226,7 +226,7 @@ suite('_doExecuteCell', () => {
     try {
       await k['_doExecuteCell']({
         document: { uri: { fsPath: '/foo/bar' } },
-        metadata: { 'runme.dev/uuid': '849448b2-3c41-4323-920e-3098e71302ce' }
+        metadata: { 'runme.dev/uuid': '849448b2-3c41-4323-920e-3098e71302ce', mimeType: 'text/plain' }
       } as any)
     } catch(e) {
 
@@ -237,7 +237,7 @@ suite('_doExecuteCell', () => {
     )
     expect(TelemetryReporter.sendTelemetryEvent).toHaveBeenCalledWith(
       'cell.endExecute',
-      { 'cell.success': 'false' }
+      { 'cell.success': 'false', 'cell.mimeType': 'text/plain' }
     )
   })
 })
Repository: stateful/vscode-runme
Pull request #1090 (2024-02-01 19:33:14)

Use the gif for the new video

admc: @sourishkrout think this makes sense?
sonarcloud[bot]: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=stateful_vscode-runme&pullRequest=1090) **Quality Gate passed**  
Kudos, no new issues were introduced!

[0 New issues](https://sonarcloud.io/project/issues?id=stateful_vscode-runme&pullRequest=1090&resolved=false&inNewCodePeriod=true)  
[0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=stateful_vscode-runme&pullRequest=1090&resolved=false&inNewCodePeriod=true)  
No data about Coverage  
No data about Duplication  
  
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=stateful_vscode-runme&pullRequest=1090)



Patch:
diff --git a/README.md b/README.md
index 36b40eb6..7fa8ece7 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ This VS Code extension transparently opens markdown files (i.e. README.md) as ru
 
 > 💡 If you don't want the runme notebook, you can always right click on the .md file, click `Open With...` and select the text editor. To make your choice permanent pick "Configure default editor for...".
 
-![Text and notebook view side-by-side](https://runme.dev/img/short.gif)
+![Text and notebook view side-by-side](https://runme.dev/img/intro.gif)
 
 ## Documentation
 


Test patch:
diff --git a/tests/e2e/wdio.conf.ts b/tests/e2e/wdio.conf.ts
index a2383bfa..92d3e94d 100644
--- a/tests/e2e/wdio.conf.ts
+++ b/tests/e2e/wdio.conf.ts
@@ -93,7 +93,7 @@ export const config: Options.Testrunner = {
   capabilities: [
     {
       browserName: 'vscode',
-      browserVersion: 'stable',
+      browserVersion: '1.85.2',
       'wdio:vscodeOptions': {
         extensionPath,
         workspacePath: extensionPath,