@xinleibird/bridge-opencode 0.2.5 → 0.2.6

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.
Files changed (2) hide show
  1. package/bridge.ts +6 -4
  2. package/package.json +1 -1
package/bridge.ts CHANGED
@@ -131,13 +131,15 @@ export const BridgePlugin: Plugin = async ({ directory }) => {
131
131
  }
132
132
  if (!s.startLine) continue;
133
133
 
134
- const filepath = s.filePath.startsWith(cwd + "/")
134
+ const filePath = s.filePath.startsWith(cwd + "/")
135
135
  ? "./" + s.filePath.slice(cwd.length + 1)
136
136
  : s.filePath;
137
137
 
138
- refs.push(filepath);
138
+ const fileRef = `${filePath}:${s.startLine}-${s.endLine}`;
139
139
 
140
- const filename = basename(s.filePath);
140
+ refs.push(fileRef);
141
+
142
+ const fileName = basename(s.filePath);
141
143
 
142
144
  output.parts.push({
143
145
  type: "file",
@@ -145,7 +147,7 @@ export const BridgePlugin: Plugin = async ({ directory }) => {
145
147
  sessionID: input.sessionID,
146
148
  messageID: input.messageID ?? "",
147
149
  mime: "text/plain",
148
- filename: filename,
150
+ filename: fileName,
149
151
  url: `file://${s.filePath}?start=${s.startLine}&end=${s.endLine}`,
150
152
  });
151
153
  attached++;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xinleibird/bridge-opencode",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",