@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.
- package/bridge.ts +6 -4
- 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
|
|
134
|
+
const filePath = s.filePath.startsWith(cwd + "/")
|
|
135
135
|
? "./" + s.filePath.slice(cwd.length + 1)
|
|
136
136
|
: s.filePath;
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
const fileRef = `${filePath}:${s.startLine}-${s.endLine}`;
|
|
139
139
|
|
|
140
|
-
|
|
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:
|
|
150
|
+
filename: fileName,
|
|
149
151
|
url: `file://${s.filePath}?start=${s.startLine}&end=${s.endLine}`,
|
|
150
152
|
});
|
|
151
153
|
attached++;
|