linkedin-relay-mcp 2.0.1 → 2.1.0
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/dist/cli.js +12 -6
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1739,13 +1739,16 @@ async function fetchCommentMenu(ref, trackingId, client) {
|
|
|
1739
1739
|
const stream = result.classification.raw ?? "";
|
|
1740
1740
|
return { ok: true, stream };
|
|
1741
1741
|
}
|
|
1742
|
-
function
|
|
1743
|
-
const
|
|
1744
|
-
const
|
|
1745
|
-
|
|
1742
|
+
function textStates(payload, text2) {
|
|
1743
|
+
const keyOf = (...names) => {
|
|
1744
|
+
for (const n of names) {
|
|
1745
|
+
const slot = payload[n];
|
|
1746
|
+
if (typeof slot?.key === "string") return slot.key;
|
|
1747
|
+
}
|
|
1748
|
+
return null;
|
|
1746
1749
|
};
|
|
1747
|
-
const plain =
|
|
1748
|
-
const rich =
|
|
1750
|
+
const plain = keyOf("commentary", "commentFieldBinding");
|
|
1751
|
+
const rich = keyOf("richTextCommentary", "richCommentFieldBinding");
|
|
1749
1752
|
if (plain === null || rich === null) return [];
|
|
1750
1753
|
const entry2 = (key, value, protoCase) => ({
|
|
1751
1754
|
key,
|
|
@@ -1759,6 +1762,9 @@ function editStates(payload, text2) {
|
|
|
1759
1762
|
entry2(rich, { text: text2, attribute: [], $type: "TextModel", source: "local" }, "textModelForWrite")
|
|
1760
1763
|
];
|
|
1761
1764
|
}
|
|
1765
|
+
function editStates(payload, text2) {
|
|
1766
|
+
return textStates(payload, text2);
|
|
1767
|
+
}
|
|
1762
1768
|
async function runCommentAction(ref, operation, trackingId, client, newText) {
|
|
1763
1769
|
const menu = await fetchCommentMenu(ref, trackingId, client);
|
|
1764
1770
|
if (!menu.ok) return { ok: false, code: menu.code, message: menu.message };
|