summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src/components/text-utils.ts
diff options
context:
space:
mode:
authorAdam <[email protected]>2026-03-09 07:36:39 -0500
committerGitHub <[email protected]>2026-03-09 07:36:39 -0500
commitc71d1bde5e8dcc8be49c15697ad2e5d0f2607e5e (patch)
treea30482cedb38dc24cad70e24ad717817065620d6 /packages/ui/src/components/text-utils.ts
parentf27ef595f65aa719be3f8d08665d683e95083ed3 (diff)
downloadopencode-c71d1bde5e8dcc8be49c15697ad2e5d0f2607e5e.tar.gz
opencode-c71d1bde5e8dcc8be49c15697ad2e5d0f2607e5e.zip
revert(app): "STUPID SEXY TIMELINE (#16420)" (#16745)
Diffstat (limited to 'packages/ui/src/components/text-utils.ts')
-rw-r--r--packages/ui/src/components/text-utils.ts17
1 files changed, 0 insertions, 17 deletions
diff --git a/packages/ui/src/components/text-utils.ts b/packages/ui/src/components/text-utils.ts
deleted file mode 100644
index c094b5e65..000000000
--- a/packages/ui/src/components/text-utils.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/** Find the longest common character prefix between two strings. */
-export function commonPrefix(a: string, b: string) {
- const ac = Array.from(a)
- const bc = Array.from(b)
- let i = 0
- while (i < ac.length && i < bc.length && ac[i] === bc[i]) i++
- return {
- prefix: ac.slice(0, i).join(""),
- aSuffix: ac.slice(i).join(""),
- bSuffix: bc.slice(i).join(""),
- }
-}
-
-export function list<T>(value: T[] | undefined | null, fallback: T[]): T[] {
- if (Array.isArray(value)) return value
- return fallback
-}