wave-code 0.5.0 → 0.5.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../src/components/Markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAKvC,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAmVD,eAAO,MAAM,QAAQ,2CAA6B,aAAa,6CAQ7D,CAAC"}
1
+ {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../src/components/Markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAKvC,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAoVD,eAAO,MAAM,QAAQ,2CAA6B,aAAa,6CAQ7D,CAAC"}
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import React, { useMemo } from "react";
3
3
  import { Box, Text, useStdout } from "ink";
4
4
  import { marked } from "marked";
5
- import { highlight } from "cli-highlight";
5
+ import { highlight, supportsLanguage } from "cli-highlight";
6
6
  const unescapeHtml = (html) => {
7
7
  return html
8
8
  .replace(/&/g, "&")
@@ -89,7 +89,7 @@ const BlockRenderer = ({ tokens }) => {
89
89
  const content = lines.slice(1, -1).join("\n");
90
90
  const highlighted = content
91
91
  ? highlight(unescapeHtml(content), {
92
- language: t.lang,
92
+ language: t.lang && supportsLanguage(t.lang) ? t.lang : undefined,
93
93
  ignoreIllegals: true,
94
94
  })
95
95
  : "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wave-code",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "CLI-based code assistant powered by AI, built with React and Ink",
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,7 +38,7 @@
38
38
  "react": "^19.2.4",
39
39
  "react-dom": "19.2.4",
40
40
  "yargs": "^17.7.2",
41
- "wave-agent-sdk": "0.5.0"
41
+ "wave-agent-sdk": "0.5.1"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/react": "^19.1.8",
@@ -1,7 +1,7 @@
1
1
  import React, { useMemo } from "react";
2
2
  import { Box, Text, useStdout } from "ink";
3
3
  import { marked, type Token, type Tokens } from "marked";
4
- import { highlight } from "cli-highlight";
4
+ import { highlight, supportsLanguage } from "cli-highlight";
5
5
 
6
6
  export interface MarkdownProps {
7
7
  children: string;
@@ -225,7 +225,8 @@ const BlockRenderer = ({ tokens }: { tokens: Token[] }) => {
225
225
  const content = lines.slice(1, -1).join("\n");
226
226
  const highlighted = content
227
227
  ? highlight(unescapeHtml(content), {
228
- language: t.lang,
228
+ language:
229
+ t.lang && supportsLanguage(t.lang) ? t.lang : undefined,
229
230
  ignoreIllegals: true,
230
231
  })
231
232
  : "";